pandoc

How to cite within a figure caption w/ rmarkdown native citation?

随声附和 提交于 2020-01-11 04:08:31
问题 In R Markdown, I want a figure caption with a linked citation in R Markdown native citation style [@ref] . However, when I insert the [@hawking_thermodynamics_1983] snippet at the end into the caption, it's throwing just an error: ! Missing $ inserted. <inserted text> $ l.94 ...iontextfoo [@hawking_thermodynamics_1983]} pandoc.exe: Error producing PDF Error: pandoc document conversion failed with error 43 Example : This is my code: --- title: "Untitled" author: "Author" output: pdf_document #

knitr templating - Dynamic chunks issue

谁说胖子不能爱 提交于 2020-01-06 14:40:39
问题 The following code is a very simplified MRE for an issue I'm experiencing. I'm trying to avoid R template packages, such as brew , and only use knit_expand() to achieve my goals. The issue is twofold: generated chunks don't get parsed (this is not happening in my real code, but happens in MRE) instead of LaTeX \includegraphics , knitr (or rmarkdown , or pandoc ) generates RMarkdown syntax for inserting figures ( ![] ). In regard to the former, I have a feeling that it might be related to my

How to place labels correctly and use cross-reference in latex to be able to convert to html(5) using pandoc?

白昼怎懂夜的黑 提交于 2020-01-05 04:32:07
问题 Introduction I'd like to create source code in latex in order to produce pdf via pdflatex and html page(s) via pandoc. I use the following source \documentclass[12pt,a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[magyar]{babel} \usepackage{hyperref} \begin{document} \begin{enumerate} \item \label{itm:thefirst} First example point \end{enumerate} This is an example to demonstrate how \textbackslash label\{\} and \textbackslash ref\{\} are not working with

knitr/pandoc: article template supporting keywords: and linespacing:

怎甘沉沦 提交于 2020-01-05 03:43:29
问题 I'm using the latest R Studio, R 3.2.5, rmarkdown 0.9.6, which comes with pandoc 1.15.2 to write a journal article. Submission requires: linespacing: 1.43 and a keywords: line just below the abstract. When I click Knit PDF I get the default template "C:\R\R-3.2.5\library\rmarkdown\rmd\latex\default-1.15.2.tex" which does not support these fields in the YAML header. I see that default-1.17.02.tex supports linespacing: , but not keywords: . I tried to modify the latter template to add keywords

How to interrupt an incremental list of items in Rmarkdown, then retake it after a plot or figure?

本秂侑毒 提交于 2020-01-05 03:36:35
问题 I'm really interested in interrupting incremental lists of items created in Rmarkdown with RStudio, to show plots and figures, then retake the list highlighting. This is quite straightforward in Latex, but I couldn't figure out how to achieve the same result using Rmarkdown. Below is some beamer example. --- title: "Sample Document" author: "Author" output: beamer_presentation: fonttheme: structurebold highlight: pygments incremental: yes keep_tex: yes theme: AnnArbor toc: true slide_level: 3

Efficient way to wrap column names of proportion tables in rmarkdown pdf output

白昼怎懂夜的黑 提交于 2020-01-03 19:33:07
问题 I'm making weighted tables of row proportions using the questionr package. I want to wrap the column names when they are too long. Because I'm making hundreds of tables, the solution needs to work on tables with varying numbers of columns. I also want to avoid setting all columns to a specific width. Ideally, short column names would remain at their normal width while names exceeding the specified maximum length would be wrapped. Here are a bunch of solutions I've tried so far, written as

Is it possible to compile .tex files to PDF with 'pandoc'?

蓝咒 提交于 2020-01-03 14:51:46
问题 Is it possible to compile a .tex file with pandoc? I'm currently taking my class notes in MultiMarkdown with MacVim. That way, when I get home, I can just mmd2tex and compile the .tex file to PDF using TexShop. It works great but the process is actually quite time consuming. I'd like to know if there would be a way to achieve virtually the same thing using pandoc from the command line. I tried to convert my original .txt file directly to PDF with pandoc but I'm getting all sort of errors...

Is it possible to compile .tex files to PDF with 'pandoc'?

三世轮回 提交于 2020-01-03 14:48:44
问题 Is it possible to compile a .tex file with pandoc? I'm currently taking my class notes in MultiMarkdown with MacVim. That way, when I get home, I can just mmd2tex and compile the .tex file to PDF using TexShop. It works great but the process is actually quite time consuming. I'd like to know if there would be a way to achieve virtually the same thing using pandoc from the command line. I tried to convert my original .txt file directly to PDF with pandoc but I'm getting all sort of errors...

How to do cell vertical alignment in markdown/pandoc table?

a 夏天 提交于 2020-01-02 01:35:51
问题 Is there a way to to specify the vertical alignment of table cell contents in markdown/pandoc? Details: The default behavior is center alignment, I want cell contents to be aligned to the top of the cell. For an example of the default behavior: | | | |-----------|---------------| | Something | This is a very long line that breaks into two. This is a very long line that breaks into two.This is a very long line that breaks into two.This is a very long line that breaks into two.| The contents of

rmarkdown: how to use multiple bibliographies for a document

跟風遠走 提交于 2020-01-01 09:43:19
问题 [My environment: Win 7 Pro / R 3.2.1 / knitr_1.12.3 / R Studio Version 0.99.892] I am trying to write an article in .Rmd format using R Studio, Knit -> PDF, and I've been following http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html for details of how to get pandoc and pandoc-citeproc to produce a References section and citations in the text. My BibTeX references are in several different .bib files, which, when using LaTeX in .Rnw files, are all found in my local texmf