pandoc

How do I make a reference to a figure in markdown using pandoc?

℡╲_俬逩灬. 提交于 2019-11-27 19:13:28
问题 I'm currently writing a document in markdown and I'd like to make a reference to an image from my text. this is my text, I want a reference to my image1 [here]. blablabla ![image1](img/image1.png) I want to do that reference because after converting my markdown to pdf, images get placed in one or two pages after and the document doesn't make any sense. UPDATE: I've tried Ryan's answer in that post and I can't make it working. Apparently the code : [image]: image.png "Image Title" ![Alt text]

Slides with Columns in Pandoc

隐身守侯 提交于 2019-11-27 18:34:18
I would like to have code and an image side-by-side in a Beamer slide. In LaTeX I would do this with columns. I would like to use markdown within the column structure. \begin{columns} \column{.5\textwidth} ~~~~~~~~Python >>> some python code ~~~~~~~ \column{.5\textwidth} ![](A_generated_image.pdf) \end{columns} Unfortunately Pandoc doesn't process the markdown within the \begin{columns} and \end{columns} statements. Is there a way around this? Is there a way to use markdown within inlined LaTeX? Is there a pure markdown solution? The problem is that pandoc ignores markdown if it finds a \begin

Setting document title in Rmarkdown from parameters

强颜欢笑 提交于 2019-11-27 18:08:50
I've got an Rmarkdown template that works well, and I've parameterized it so I can generate variants of the same report from different data sources. However, I'd like to change the title of the report in each case. How do I do that? Here's the YAML header I have so far: --- title: "My Title" author: "Me, Inc." date: "August 4, 2015" output: pdf_document params: title: default --- I've tried using params=list(title="ASDF") in the call to rmarkdown::render , and although my code can see that variable, it doesn't change the title. I've also tried using r params$title in the YAML, but that gives a

Add author affiliation in R markdown beamer presentation

这一生的挚爱 提交于 2019-11-27 11:08:55
问题 How to add author affiliation in a new line in an rmarkdown beamer presentation? --- title: "This is the title" author: "Author" date: "Thursday, April 09, 2015" output: beamer_presentation --- ## Slide with Bullets - Bullet 1 - Bullet 2 - Bullet 3 The desire title slide should be This is the title Author Affiliation Thursday, April 09, 2015 回答1: If you use pipes | you can break the author line into multiple lines: --- title: "The title" author: | | The author | The affiliation date: "9 April

Chrome rendering MathJax equations with a trailing vertical line

泄露秘密 提交于 2019-11-27 10:19:18
问题 I am working through Andrew Ng's machine learning course on Coursera using the Octave kernel for Jupyter and of course MathJax provides the equation rendering. This thin bar appears on the right side of every equation, and only in Chrome. Any thoughts on where in the stack things might be going wrong? 回答1: This is a known issue caused by Chrome changing its rounding behavior. It will be fixed in the next release. See https://github.com/mathjax/MathJax/issues/1300 回答2: A quick and dirty method

Pandoc and foreign characters

那年仲夏 提交于 2019-11-27 10:14:26
问题 I've been trying to use Pandoc to convert some Markdown into a PDF file. This is a sample that Pandoc will not convert for me: # Header! ## Sub Header themselves derived respectively from the Greek ἀναρχία i.e. 'anarchy' That's just something I grabbed from the top of the wikipedia database dump. Pandoc doesn't like that at all. This is the error message it gives me: pandoc: Error producing PDF from TeX source. ! Package inputenc Error: Unicode char \u8:ἀ not set up for use with LaTeX. See

Regression tables in Markdown format (for flexible use in R Markdown v2)

此生再无相见时 提交于 2019-11-27 10:11:26
问题 The new version of R Markdown is based on pandoc, so you can easyly change the output format. My Problem is to get markdown formated tables from e.g. regression models, because LATEX and HTML tables do not survive the pandoc conversion. I know packages that generate LATEX/HTML output from a variety of models (stargazer, texreg, asprtable...) and I'm aware of functions/packages, that generate markdown tables from data frames and matrices but not from other objects. Any suggestions? 回答1: My

Set margin size when converting from Markdown to PDF with pandoc

有些话、适合烂在心里 提交于 2019-11-27 10:02:02
I have created an RMarkdown file in RStudio and managed to knit it with knitr into an HTML and .md file. Next, I used pandoc to convert the .md file into a PDF file (I get an error if I try and convert from the .html file). However, the PDF that is produced have massive margins (like this http://johnmacfarlane.net/pandoc/demo/example13.pdf ). How can I get pandoc to produce something with smaller margins? I have looked through the pandoc user guide, but haven't found anything useful. Recent versions of rmarkdown and pandoc In more recent versions of rmarkdown , the settings of margins can be

How to add a page break in word document generated by RStudio & markdown

拈花ヽ惹草 提交于 2019-11-27 08:14:46
I writing a Word document with R markdown in R Studio. I can get many things, but at the moment I am not figuring out how can I get a page break. I have found solutions but only for rendered latex / pdf document that it is not my case. There is an easier way by using a fifth-level header block ( ##### ) and a docx template defined in YAML. After creating headingfive.docx in Microsoft Word, you select Modify Style of the Heading 5 , and then select Page break before in the Line and Page Breaks tab and save the headingfive.docx file. --- title: 'Making page break using fifth-level header block'

Rmarkdown: pandoc document conversion failed with error 43 because of large number

谁说胖子不能爱 提交于 2019-11-27 08:06:37
问题 I ran into problems while knit the pdf in Rstudio via Rmarkdown. I suppose it stems from too many digits for the value of quoted r variable outside the chunk of code. --- title: "R Notebook" output: pdf_document: default html_notebook: default --- ```{r} x <- 11111111111111 ``` Testing for `r x`. Error is ! Missing $ inserted. <inserted text> $ l.133 Testing for 1.1111111\times pandoc: Error producing PDF Error: pandoc document conversion failed with error 43 Execution halted Hope someone can