pandoc

Pandoc: no line wrapping when converting to HTML

时间秒杀一切 提交于 2019-12-12 20:18:29
问题 I am converting from Markdown to HTML like so: pandoc --columns=70 --mathjax -f markdown input.pdc -t html -Ss > out.html Everything works fine, except for the fact that the text doesn't get wrapped. I tried different columns lengths, no effect. Removed options, no go. Whatever I tried, the HTML just doesn't get wrapped. I search the bug tracker, but there don't seem to be any open bugs relating to this issue. I also checked the documentation, but as far as I could glean, the text ought be

Pandoc: generate compilable .tex from markdown

狂风中的少年 提交于 2019-12-12 19:38:14
问题 I have started using Markdown to write my Latex PDFs, and so far I am impressed by the amount of boilerplate it takes away. However, I find Markdown not as expressive as Tex, and therefore in some situations would like to write the document in Markdown, convert to tex, then add some Latex-only stuff and only then convert to PDF. However, converting .md to .tex with Pandoc does not yield an compilable file: it only contains the body of the file, not the "document setup". Example, the following

Knitr pandoc Execution halted in R

可紊 提交于 2019-12-12 18:30:31
问题 Knitr / Rmarkdown Execution halted When I run Knitr and Rmarkdown, even with the knitr example scripts, I get the below error message . Error in system(paste(shQuote(pandoc_path), "--version"), intern = TRUE) : '"C:/Program Files/RStudio/bin/pandoc/pandoc"' not found Calls: <Anonymous> ... get_pandoc_version -> with_pandoc_safe_environment -> force -> system Execution halted I have installed and loaded knitr and rmarkdown from the libraries and alternatively using dev tools to get the most

PyPandoc in combination with PyInstaller

最后都变了- 提交于 2019-12-12 17:32:56
问题 I installed PyInstaller to create executables for my python scripts, and that works fine. I used PyPandoc to create .docx reports, which also run fine when the normal python files are run, but not from the PyInstaller generated executable. It gives the error: Traceback (most recent call last): File "src\flexmodel_postcalc.py", line 295, in postcalculate_everything File "src\flexmodel_postcalc.py", line 281, in generate_report_docx File "src\flexmodel_report_docx.py", line 118, in generate

Pander formats tables weirdly when using significance stars and pandoc

断了今生、忘了曾经 提交于 2019-12-12 16:47:06
问题 If I run a linear regression with significance stars, render it through pander, and "Knit PDF" such as this: pander(lm(crimerate ~ conscripted + birthyr + indigenous + naturalized, data = data), add.significance.stars = T) I occasionally get output where there is weird spacing issues between rows in the output table. I've tried setting pander options to report fewer digits panderOptions('digits', 2) , but the problem persists. Does anybody have any ideas? 回答1: I had the same problem.

Incorrect conversion from R Markdown to LaTeX

懵懂的女人 提交于 2019-12-12 11:41:44
问题 Why does the following R Markdown minimal (non)-working example not compile to PDF? --- header-includes: - \usepackage{fancyhdr} - \pagestyle{fancy} - \lhead{} - \chead{} - \rhead{The performance of new graduates} - \lfoot{From: K. Grant} - \cfoot{To: Dean A. Smith} output: pdf_document: keep_tex: yes latex_engine: xelatex --- # Test In particular, the problematic conversion happens to -\lfoot{From: K. Grant} and -\cfoot{To: Dean A. Smith} , as seen in the output .tex file: \usepackage

How can I change PDF output font from within the YAML header when using Pandoc on Markdown?

谁说我不能喝 提交于 2019-12-12 07:45:04
问题 Is there a (built-in) way to set a different font (or fonts) to use in the Pandoc YAML header? Ideally, I would do something like this in the YAML header of my Markdown file: --- font: MySansSerifFontName ... I'm using TexLive on Linux (Ubuntu), with pandoc , of course. 回答1: This should do the trick: --- fontfamily: arev --- From Pandoc's README: fontfamily : font package to use for LaTeX documents (with pdflatex): TeXLive has bookman (Bookman), utopia or fourier (Utopia), fouriernc (New

Generating a docx file using Pandoc: images missing! Due to multiple requests?

旧时模样 提交于 2019-12-12 05:25:29
问题 I'm generating a markdown document using my Rails 4.2 app which includes images that are on the same server (in the public folder). Using pandoc (pandoc-ruby 1.0.0), I want to convert the document into various formats, especially HTML (to preview it in the browser) and DOCX (to download it). The preview in the browser works perfect. But when converting to DOCX, the images aren't included. I guess this is due to multiple requests to referenced images while pandoc is generating the document. I

Output of fa2latex command from psych causing LaTeX error in pandoc

别说谁变了你拦得住时间么 提交于 2019-12-12 02:26:58
问题 I am writing a report using knitr in RStudio. Also using the psych package for factor analysis: ```{r, results='asis'} library(psych) data(Thurstone) fa.Thurstone<-fa(Thurstone) fa2latex(fa.Thurstone) ``` When I run this code chunk it causes an error: ! LaTeX Error: Unknown float option `d'. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.124 \begin{scriptsize} \begin{table}[htdp] pandoc: Error producing PDF from TeX source Error: pandoc

pandoc does not print references when .bib file is in YAML

非 Y 不嫁゛ 提交于 2019-12-12 01:45:02
问题 To compile a pdf with a bibtex bibliography, I thought it was sufficient to write the YAML as --- title: super awesome paper author: albert enstein bibliography: /path/to/bib/file.bib --- and punch this command into the terminal: pandoc test.md -o test.pdf But it does not work. Instead I have to manually add the bib file to the terminal command: pandoc test.md --bibliography=/path/to/bib/file.bib -o test.pdf What am I doing wrong? 回答1: There is nothing wrong with your syntax. So I suspect