आर मार्कडाउन लॉन्गटेबल + लैंडस्केप केबिल कैप्शन की चौड़ाई सिकुड़ती है (अब पृष्ठ की चौड़ाई नहीं)

Dec 14 2020

मैं एक विस्तृत तालिका के लिए longtable और lanscape का उपयोग करने की कोशिश कर रहा हूं जो कई पृष्ठों तक फैला हुआ है। जब मैं ऐसा करता हूं, तो पृष्ठ के पूर्ण भाग से टेबल कैप्शन केवल पृष्ठ के मध्य में पूरा हो जाता है।

मैंने बिना किसी लाभ के निम्नलिखित सुझावों का उपयोग करने की कोशिश की है। केबिल और लॉन्गटेबल के साथ आर मार्कडाउन टेबल कैप्शन की चौड़ाई

मैं आर मार्कडाउन में नया हूं, और मैं लेटैक से बिल्कुल भी परिचित नहीं हूं, इसलिए उपरोक्त निर्देश मेरे लिए भ्रमित करने वाले हैं, हालांकि मैंने उन सभी विकल्पों की कोशिश की है जो मुझे लगता है कि सही हैं। क्या कोई मुझे इस मुद्दे को ठीक करने के लिए YAML में कहाँ और क्या डाल सकता है, इसके लिए बहुत स्पष्ट चरण-दर-चरण निर्देश दे सकता है? या किसी के पास कोई और काम है? आपके सहयोग के लिए धन्यवाद

test <- data.frame(col1=rep("MyLongWordsareLong",5),
               col2=rep("MyLongWordsareLong",5),
               col3=rep("MyLongWordsareLong",5),
               col4=rep("MyLongWordsareLong",5),
               col5=rep("MyLongWordsareLong",5),
               col6=rep("MyLongWordsareLong",5))

kable(test,format='latex',booktabs=TRUE,
caption="This is my example caption. See how, when I don't use 
longtable, it extends the full width of the table, but when I use the 
longtable option, it compresses down to only a portion of the table's width. 
Is this weird or is it just me?") %>% 
 landscape()

kable(test,longtable=TRUE,format='latex',booktabs=TRUE,caption="This is my 
example caption. See how, when I don't use longtable, it extends the full 
width of the table, but when I use the longtable option, it compresses down 
to only a portion of the table's width. Is this weird or is it just me?") 
%>% 
landscape()

** संपादित करें: मैं पीडीएफ के लिए बुनाई कर रहा हूँ !!

जवाब

1 Paul Dec 15 2020 at 06:11
---
title: "Untitled"
author: "anonymous"
date: "14/12/2020"
header-includes:
  - \usepackage{caption}
output:
  pdf_document:
    keep_tex: yes
  html_document: default
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(kableExtra)
```

```{r}
test <- data.frame(col1=rep("MyLongWordsareLong", 5),
               col2=rep("MyLongWordsareLong",5),
               col3=rep("MyLongWordsareLong",5),
               col4=rep("MyLongWordsareLong",5),
               col5=rep("MyLongWordsareLong",5),
               col6=rep("MyLongWordsareLong",5))

kable(test, booktabs=TRUE, caption="This is my example caption. See how, when I don't use  longtable, it extends the full width of the table, but when I use the longtable option, it compresses down to only a portion of the table's width.  Is this weird or is it just me?") %>% 
 landscape()

kable(test, longtable=TRUE, booktabs=TRUE, caption="This is my example caption. See how, when I don't use longtable, it extends the full  width of the table, but when I use the longtable option, it compresses down to only a portion of the table's width. Is this weird or is it just me?") %>% 
landscape()
```

केबिल और लॉन्गटेबल के साथ आर मार्कडाउन टेबल कैप्शन की चौड़ाई के अनुसार समाधान