Questions tagged [rmarkdown]

Rmarkdown is a lightweight markup language with plain-text-formatting syntax. Its a variant of markdown syntax that allow inclusion of chunks of R code through knitr. The documents can be exported with pandoc to LaTeX, PDF (via LaTeX), Word, or HTML formats showing the output of R chunks (and/or de R code) including plots and tables.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Last pages numbering missing in R MarkDown

So I have finished this long R Markdown Document (645 pages in total) but I noticed that the last 6 do not number. Thus, my output shows "Page 639 of 639", then "Page 640 of 639" ...
0
votes
1answer
24 views

table of contents unnumbered because of the interference of a graphic algorithm displaying packages

Hi I am trying to compile the code that displays this algorithm below I copy and past the code after I have converted to latex from a Rmd file, but its not working, than I go back and add the ...
0
votes
1answer
25 views

Updating R Counter in for loop

I have written a for loop in LaTeX using the forloop package, and on each iteration, I would like to use a different subset of a vector that is defined in an R chunk above. However, each iteration of ...
0
votes
0answers
9 views

RMarkdown Multicol environment with ggplot

I'm looking to insert a ggplot in a multicol environment, but I'm running into some issues. Specifically, I'm receiving the following error when attempting to call R code within the multicol ...
1
vote
0answers
24 views

Getting Stuck when converting Rmd to beamer

I'm trying to make a beamer presentation using R Markdown. I was impressed by an article of Steve Miller (http://svmiller.com/blog/2015/02/moving-from-beamer-to-r-markdown/) and hence started using a ...
0
votes
1answer
32 views

How do I globally add a border to all inline code that uses /lstinline?

I am using R Markdown and Latex with memoir to compile a book to pdf. I am using lstsetfor the normal code blocks while the inline code is converter and uses \lstinline. I would like to globally add a ...
0
votes
0answers
18 views

How to cite the quote something like “…” (Lange, 1941. p.281, quoted in Kriesler, 1987, p.48)

I was wondering if there is a way to cite that may look like the following: ".................." (Lange, 1941. p.281, quoted in Kriesler, 1987, p.48) I am working with rmarkdown and ...
0
votes
0answers
48 views

Tex Template for markdown: Command \circledS already defined [duplicate]

I'm rewriting old latex code for my university's thesis template to make it work with R markdown. I want it to do as little as possible besides creating a title page, copyright page, English abstract ...
0
votes
1answer
28 views

How do I globally change the style of the horizontal rule when using RMarkdown to pdf?

I am using R Markdown and Latex with memoir to compile a book to pdf. The author has used the *** syntax for horizontal dividers. Checking the compiled .tex file I can see that the conversion from ...
0
votes
1answer
60 views

Manually numbering with \tag in double dollar signs

I want to manually numbering in non-numbered displayed equation environment and try the following steps \documentclass{article} \usepackage{amsmath} \begin{document} \[ \bar{D}=\frac{1}{n} \sum_{j=1}^...
0
votes
0answers
33 views

How do I globally change the longtable font size?

I am using R Markdown and Latex with memoir to compile a book to pdf. There are tables in the book that are too wide and go into the margins. Checking the compiled .tex file I can see that the ...
0
votes
0answers
13 views

Replacing punctions breaks table

This question is related to How to replace all : with * or x in an ANOVA table? I want to replace all the ":" with "x" for journal requirements. Doing this break my table. library(...
0
votes
1answer
25 views

Tables appears in disorder in appendix section

I'm writing my Ms thesis with R markdown, and I have a problem with the Appendix section. I need to put some tables in the appendix section but when I render it the header of the subsection appears ...
1
vote
1answer
52 views

How to replace all : with * or x in an ANOVA table?

I am using bookdown::pdf_document2. Some journals require all the interaction terms to be formatted as Term A * Term B or Term A x Term B, not Term A : Term B as default in the R's ANOVA table. ...
0
votes
1answer
47 views

Error converting from Rmarkdown to PDF LaTeX

I am using Rmarkdown using Rstudio to generate PDF documents via tex. In the markdown, I write the python code chunk for reproducibility. However, I get the following error. Quitting from lines 23-30 (...
0
votes
0answers
24 views

Is there a way to automatically use minty for all code blocks?

I have been given a book in RMarkdown format and I am compiling it to pdf using RStudio. I want to use minted for the many code blocks included in the book. It works fine but I would like to apply a ...
0
votes
1answer
29 views

Using Memoir class with RMarkdown fails when trying to generate the table of contents

I am using RMarkdown in RStudio to compile a book written in Markdown. I am using the memoir class and it all works fine as long as I set toc: false. When I try to compile with toc I get the followin ...
2
votes
1answer
127 views

Citation within a Latex figure caption in rmarkdown

I'm struggling to put a citation inside a figure caption. I'm writing my document in rmarkdown using markdown citations i.e. [@bibtexCitationkey], but using LaTeX for figures and tables. I'd like to ...
1
vote
1answer
74 views

R Markdown LaTeX Tufte font cannot be found

I'm new to getting LaTeX working in R Markdown and have the following error when I tried to knit the tufte template from github: ! Package fontspec Error: The font "Kaiti SC" cannot be found....
0
votes
2answers
35 views

How to center and scale a tikz picture at the same time for beamer

I need to scale donw a Tikz picture and center it on my frame (I am using Rmarkdown). I have tried several options: scalebox, transform canvas, adjustbox, scale, begin{center}, centering, etc... But ...
0
votes
0answers
109 views

! Package inputenc Error: Unicode character μ (U+03BC) (inputenc) not set up for use with LaTeX

I'm using rmarkdown to knit a pdf. I get this error. ! Package inputenc Error: Unicode character μ (U+03BC) (inputenc) not set up for use with LaTeX. Googling tells me it refers to ...
1
vote
0answers
34 views

Error in trying to write $\bar{X}$ in R markdown [closed]

I want to write the distribution of the average of n i.i.D's. However I keep receiving the following error when I write the following in R markdown. $$\bar{X}\sim N(\mu_X,\frac{\sigma^2}{n})$$ Error: ...
1
vote
0answers
28 views

Illegal parameter number in definiton of beamer frame RMarkdown

While I want to render my Rmarkdown file as beamer pdf with Latex. I get the error: !Illegal parameter number in definiton of \beamer@doifinframe I get this only within the columns Tag. --- title: &...
0
votes
1answer
220 views

hyperref-langpatches.def file not found in rmarkdown pdf knitting

I tried to compile a pdf in rmarkdon but the error shows hyperref-langpatches.def file not found. However, I can generate the pdf using the .tex file generated during the process.
0
votes
1answer
90 views

How to put parentheses for multiline text in r markdown?

Could anybody help me to overcome this? I've tried several ways but it still didnt't work. I wanna put big parentheses for these three line texts like the image below but I couldn't do it. $$\left( ...
0
votes
0answers
25 views

Add line below slide header

I have trying to create a custom template to use in my rmarkdown presentations, a modification of this, but I can't add an horizontal line just below the slide header. Here is what I am trying to ...
0
votes
0answers
22 views

How increase the font size of an equation with begin{equation}?

I have the following code in RMarkdown that prints an equation like: # in a LaTeX environment I would write: \usepackage{amsmath} \begin{document} \begin{equation}\label{eq: eq1} \psi_{j} = \frac{\...
0
votes
0answers
189 views

Collapse line spacing between items in the preamble of an r markdown pdf output to single spacing

I'm starting to explore Latex right now, working with Rstudio and using an r markdown file to produce a report in pdf format. I would like to find a way to adjust the spaces between lines of the title,...
2
votes
1answer
98 views

LaTeX Error: File `underscore.sty' not found

In order to allow underscores in a R Markdown script (whose output is pdf_document, with latex_engine: xelatex), I've added \usepackage{underscore} and \usepackage[english]{babel} (https://tex....
1
vote
1answer
118 views

TeX capacity exceeded, sorry [parameter stack size=10000] [duplicate]

I am a Spanish linguist working on writing my dissertation using RMarkdown. My document was compiling fine into a pdf until I tried to add examples and glosses using the gb4e package. I am working on ...
0
votes
1answer
185 views

Tikz in RMarkdown

I have a diagram rendered using tikz and would like to include it at multiple places throughout my document. I have tried to define a command to insert this into the tikz environment, however I'm not ...
1
vote
0answers
24 views

Why I am getting full code of user defined command in rmarkdown?

--- documentclass: report classoption: twoside fontsize: 12pt output: pdf_document: latex_engine: xelatex keep_tex: true header-includes: | \usepackage{geometry} \usepackage{tikz} \...
0
votes
0answers
34 views

Apply specific format to word in rmarkdown

I am using rmarkdown and I want the Country "Afghanistan" to become HUGE, Center and in Oswald Regular I tried \Centering\Huge but I failed. --- documentclass: report classoption: twoside ...
1
vote
1answer
45 views

Question about using book down in R-do I need to load packages on each page? Help with basic understanding!

Please forgive the v basic question. I have recently started using R bookdown, to try write papers. I've read the cookbook and book down guide. I use rmardown, and understand that, but I don't ...
0
votes
0answers
27 views

backref with biblatex or hyperref in markdown, is it possible?

I use RStudio rmarkdown to write as this gives opportunity to have output in Word which some journals want [(:!)] I would like to use the backref feature in biblatex or hyperref for the bibliography. ...
1
vote
1answer
23 views

Fix cleveref ?? prefix with floatrow

I am following the solution in this answer to add captions and cross-references to code chunks in an .Rmd file. I would like to use cleveref to refer to these code chunks. However, currently my \cref'...
1
vote
0answers
72 views

Color change in beamer at R markdown

Esteemed, I'm having trouble putting together a beamer presentation. I would like to put the title, the footer and the items in green tones. I appreciate any help. title: "long title" date: &...
0
votes
0answers
306 views

Figures showing at the end of the document in R markdown

I have been working on this issue since yesterday and have checked almost all the solutions but I'm still not able to solve this issue. All the figures and tables I put in the document shows at the ...
0
votes
0answers
810 views

l3backend installed, but getting: “LaTeX Error: File `l3backend-pdfmode.def' not found” error

I am unable to knit a pdf in RStudio. I have had no issues previously, though did recently update my Xcode installation. I am working on a Mac OS Catalina 10.15.6. The problem seems to be related to ...
0
votes
1answer
91 views

theme: Szeged - how to edit header

I am using RMarkdown Beamer and I set the theme: Szeged in the YAML header as per: --- title: title author: name date: date output: beamer_presentation: theme: Szeged slide_level: 2 ...
1
vote
0answers
200 views

Rmarkdown chunk with xtable() stopped rendering LaTeX table

I have a data analysis Rmarkdown file that I will use to knit a .pdf results section for my thesis. I had beautiful working LaTeX table code when I knit a pdf together in Rstudio using the knit button ...
3
votes
5answers
348 views

Align inequalities in cases

Context I am using cases inside an R-Markdown document to display a formula (this for the context as I am not totally aware which tools Rmarkdown uses to typeset the formula eventually). But ...
1
vote
2answers
617 views

R markdown / Plotly R with LaTeX unable to generate plot and get error on a file name with hyphen

I am using LaTeX for some formatting, and trying to generate a PDF file with a plotly R plot as a png. The following piece of code gives me an error as show below. It seems like a problem with the ...
0
votes
0answers
631 views

Failure to knit using rmarkdown

I am using RStudio (version 1.2.5019) and have MiKTeX installed to my work laptop. When knitting to PDF using rmarkdown the .TEX file seems to be created ok but I get an error: Error: LaTeX failed to ...
0
votes
0answers
46 views

Correct syntax for using \setstretch{} \color{} \textit{} and scriptsize in same macro?

I am writing a custom macro to display text as footnotes for some custom figures and pictures in my R markdown code, using latex. I need to have scriptsize fontsize, decreased line spacing than rest ...
1
vote
0answers
45 views

Is it possible to attach a file to a beamer presentation? [closed]

I am familiar with the navigator package, which works flawlessly in long documents. However, I recently wanted to attach a file to a beamer presentation. I am not using LaTex, but rmarkdown to create ...
0
votes
1answer
161 views

Leave Header Blank Fancyhdr

I am new to coding and Latex so please forgive me as I'm sure this is a very straight forward solution. I am creating a PDF report using RMarkdown with a .tex file to control the header, margins, and ...
0
votes
0answers
427 views

How to indent a numbered list of references in R markdown as in latex?

I post this same question in stackoverflow (https://stackoverflow.com/questions/61060820/how-to-indent-a-numbered-list-of-references-in-r-markdown) and I was suggested to ask here. So, my problem is: ...
0
votes
0answers
538 views

Rmarkdown longtable in kable won't center

I am trying to get my kable table to align in the center of my pdf from RMarkdown. Currently, it is aligning very left of my page and the caption is awkwardly floating in the center (pic at bottom). I ...
1
vote
1answer
284 views

Rmarkdown, plot title font as latin modern

I have an knitr document with single plot. I want to use the original fonts of R in the plot except the axis labels which should come from latin modern. I can use latin modern for all the fonts in the ...