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
1 answer
166 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 (...
1 vote
1 answer
148 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
1 answer
150 views

Changing default font size in Frankfurt Beamer slides without impacting the spacing on the navigation bar

I am trying to reduce the standard font size in a Beamer presentation, created in Rmarkdown, using the Frankfurt theme. When I set fontsize: 10pt (as desired) in the YAML it impacts the spacing in the ...
0 votes
0 answers
14 views

Rmarkdown citation fails in tablenotes environment

Rmarkdown citation @bibtexkey fails when used in the tablenotes environment. Is there a way to fix this? Bibtex source for the two citations in the upcoming MWE of the table @Article{Lundberg2017, ...
1 vote
2 answers
907 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
0 answers
22 views

Cross-reference latex table in rmarkdown

I try cross-reference latex tables in RMarkdown. The hyperlink is generated (clicking on ?? leads to the table) but the table number is not displayed, instead ?? is displayed. I tried a version with ...
1 vote
1 answer
108 views

Logo and Shortinstitute in beamer R Markdown

How do we add a logo on a beamer in R Markdown title page? Also, how do I add the shortinstitute function for the footline in beamer R Markdown? Can someone please help with the correct commands.
0 votes
1 answer
58 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
1 answer
328 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 ...
1 vote
1 answer
247 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
0 answers
26 views

How to include an algorithm in a Rmarkdown template

I have the following document. I am using the arxiv_article style. This is a predefined template that comes with the rticles package. I am trying to insert some Latex, but I am running into an error. ...
1 vote
0 answers
84 views

Using tikz with \pause command in rmarkdown or quarto presentation

I'm trying quarto for my slides and wondering how to use \pause in tkiz code. Minimum working example (Test.qmd) is below for reference. --- title: "Test Slides" format: revealjs: ...
1 vote
1 answer
79 views

\! math symbol in R markdown to beamer with xelatex and lualatex failing

The following minimal example works correctly within RStudio to generate a pdf beamer slide --- output: beamer_presentation: latex_engine: "pdflatex" --- ## \[ Z \not\!\perp\!\!\!\...
0 votes
0 answers
42 views

I am getting error "Missing \endcsname inserted." while compiling a latex document

I am trying to create an R Markdown template package so that I can prepare reports repeatedly in a consistent format. I prepared the R Markdown file, and the Latex file as well. I can compile the ...
0 votes
1 answer
40 views

Problem with footer in rmarkdown

I have been trying to add a footer to this report, generated with rmarkdown; however, whatever I do, it just doesn't work for me. --- header-includes: \usepackage{fancyhdr} \usepackage{graphicx}...
1 vote
1 answer
33 views

the text is cut in the rmarkdown pdf file [closed]

As you can see in the picture, the text is cut off at the end of the page. What could done to prevent this? I have executed the following code and attached a pic for a better explanation. I would like ...
0 votes
0 answers
27 views

Issue with & for latex and eulerr

I'm having some issues with rmarkdown, where I can't generate a pdf because I use "&" when I build a eulerr diagram. The error is : ! Misplaced alignment tab character &. I do use '&...
0 votes
1 answer
274 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
1 answer
47 views

Table caption misplaced and no list of tables generated

I am writing an APA-style document in RMarkdown using Papaya package, which compiles into LaTeX, and then to pdf, by pandoc. I know a small amout of LaTeX, and I am not familiar with RMarkdown, and ...
0 votes
1 answer
524 views

R Markdown failed to render PDF and render .tex instead

I have been using RMarkdown via R Studio to render PDF for a while but suddenly it failed to render PDF with the following error. Instead of PDF, it render a .tex file which I'm unsure why. "C:/...
0 votes
1 answer
186 views

Error while set language, despite package is already installed

I'm writing a document in R markdown and using latex for figures and tables. I need the captions in Portuguese, so I try this: R markdown file: --- output: pdf_document: includes: ...
2 votes
2 answers
146 views

Aligning columns of the matrix with the labels on r markdown

I am unable to align the columns of my matrix with the column labels. I have attached my code below along with the output. Can someone help me fix this pls ? I want to align 0, 1, 2, 3 to the ...
0 votes
1 answer
56 views

LaTeX adjustbox shrinks table

I've been having a strange issue with my LaTeX code with adjustbox. I'm currently using RMarkdown which converts markdown to LaTeX codes, and I'm having trouble narrowing down where it is causing the ...
0 votes
1 answer
36 views

How can I mark a portion of R code to be bold in Latex output?

Rmarkdown YAML output: pdf_document: latex_engine: xelatex classoption: x11names documentclass: article header-includes: - \PassOptionsToPackage{x11names}{xcolor} - \usepackage{eso-pic,...
0 votes
1 answer
68 views

How to add LaTeX to Rmarkdown to be within text rather than centered when knitted?

I am writing text in RMarkdown that includes equations that I type in LaTeX. However, rather than including them on the same line within the text, it breaks the line and centers the equation. How can ...
1 vote
1 answer
66 views

\renewcommand{\arraystretch}{1.3} makes ! LaTeX Error: \caption outside float in Rmarkdown

I'm writing my thesis and want to include several tables in Rmarkdown. The first table is long and includes several LaTeX symbols for regression parameters $\beta$. The rows seemed a bit squished so I ...
1 vote
0 answers
21 views

How do I assign these variables from Rmarkdown? [duplicate]

I have variables that are going to be dynamic in this document. How do I assign theme from Rmarkdown. Below is how my .tex file looks like So for example $District_Name$ is a dynamic variable. I want ...
1 vote
1 answer
362 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
1 answer
135 views

Generating fullwidth longtable in the tufte-latex style, when using Pandoc with Rmarkdown

I am writing a book in Rmarkdown using the tufte package; which uses tufte-latex for pdf output. My current issue is that I have not found a way to have a table extend wider than the normal margin of ...
0 votes
1 answer
91 views

Change author affiliation symbols to numbers in Rmarkdown rticles

For a manuscript I wrote using the rticles package in Rmarkdown, I am asked by the journal to change the reference to author affiliations from superscript symbols to superscript numbers. So in the ...
0 votes
1 answer
59 views

Adapting Latex class and template file to an Rmarkdown template

I'm trying to adapt an unofficial University of South Florida Latex document class and template file which are available from http://shell.cas.usf.edu/~saito/grad/ into an Rmarkdown template similar ...
0 votes
1 answer
122 views

how to reduce space between authors via header-includes?

I am using scholarly-metadata.lua and author-info-blocks.lua as per the example below in R Markdown: --- title: "My title" author: - Mario Modesto-Mata: email: paleomariomm@gmail.com ...
0 votes
2 answers
162 views

Missing number, treated as zero (\hspace, I think)

At the outset let me say I am not even a LaTeX beginner - I know almost nothing. I have an .tex file named title.tex which was developed on a Windows platform and is used in an R markdown document ...
2 votes
3 answers
537 views

R Markdown: BibLaTeX duplicate Bibliography When adding to ToC

an R markdown file index.rmd: --- title: title author: author bibliography: bib.bib output: pdf_document: latex_engine: xelatex toc: true pandoc_args: ["--biblatex"] header-includes: -...
2 votes
1 answer
86 views

Change the style of chapters (sections) of the .pdf document from rstudio with knitr package LATEX "titlesec"

I try to style the chapters (sections) of an article document (documentclass: article) using the latex titlesec package, but I don't get any results, I mean that when I configure the document there is ...
0 votes
1 answer
64 views

Tikz `regular polygon` in Rmarkdown

I am looking to produce a tikz figure with a node triangle. Most ressources I have found online use \usetikzlibrary{shapes} and its regular polygon. Rmarkdown seems unable to use it. This will work in ...
0 votes
1 answer
164 views

„Undefined Control sequence“ when changing to „et al“

I‘m very new to latex and try to write my bachelor thesis with Rmarkdown and tinytex (and got a Template from my Professor). My problem is, that I can‘t change the german u.a. To the latin „et al.“ in ...
0 votes
1 answer
122 views

How can I add a space between name and surname in a R markdown (Twenty seconds format)?

I have made a CV using a R markdown template called Twenty Seconds Format from the Vitae package. However I cannot add a space between name and surname so they run together. I am a real beginner and ...
0 votes
0 answers
65 views

Extract image from RMarkDown HTML

I often generate reports using RMarkDown. These include images based on analyses which are encoded in the knitted HTML file in URI scheme format. The following RMarkDown can be knitted to such a file. ...
1 vote
1 answer
272 views

Undefined control sequence in R Markdown from \frac{}{}

I am a beginner working in R markdown. I can compile the given minimally reproducible example below as an HTML. But, when I try to compile the RMD file as a PDF, I get the following error: ! Undefined ...
0 votes
0 answers
25 views

How to include a C plus plus file into rmarkdown while using the Rcpp engine to render the file's text content

So I have an rmd file which contains my analysis of some cpp source code which is in a file called twoSum.cc. I simply want to be able to edit this cpp seperately and the rmarkdown seperately. I do ...
0 votes
1 answer
44 views

awesome-cv indenting issue

I am using the awesome-cv template and after the first entry in some categories, the second entry has an indent. Here is my pared down code to illustrate the issue: --- name: name position: "...
0 votes
0 answers
22 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" ...
1 vote
1 answer
196 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
0 answers
20 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 ...
0 votes
1 answer
114 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 ...
1 vote
2 answers
2k views

How to keep a table on the same page?

I have a report with many summary tables of regression output and converted them into tables using pander in the Rmarkdown document. Even though all tables are less than one page, they sometimes break ...
1 vote
1 answer
504 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 ...
0 votes
0 answers
51 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
1 answer
89 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 ...