pandoc

Get pandoc to generate PDF with sans-serif font family

生来就可爱ヽ(ⅴ<●) 提交于 2020-08-23 21:01:37
问题 I'm trying to use pandoc to generate a PDF from Markdown source. I'd like the output to use only sans-serif fonts. Input: # Hello This is a test. Command line: pandoc -o output.pdf input.md --variable=fontfamily:arev I get a fine-looking PDF, but the text is serif. Output: I tried many different command lines, but the font (family) never changes. I'm using Ubuntu 14.04. I installed pandoc via apt-get. 回答1: I had to install arev, bera and mathdesign fonts first, but your command worked fine

Compile multiple files into one with title blocks

痴心易碎 提交于 2020-08-17 19:32:12
问题 I'd like to know how to compile multiple pandoc files into one output document, where each input file has a title block . E.g. suppose I have two files: ch1.md : % Chapter 1 % John Doe % 1 Jan 2014 Here is chapter 1. ch2.md : % Chapter 2 % Jane Smith % 3 Jan 2014 Here is chapter 2. Typically with multiple input files you can compile them by providing them to pandoc: pandoc ch1.md ch2.md --standalone -o output.html However pandoc concatenates the input files before compiling, meaning only the

关于markdown 的简单使用(已更新)

走远了吗. 提交于 2020-08-17 18:59:16
markdown的介绍 Markdown是一种可以使用普通文本编辑器编写的标记语言,通过类似HTML的标记语法,它可以使普通文本内容具有一定的格式。 Markdown具有一系列衍生版本,用于扩展Markdown的功能(如表格、脚注、内嵌HTML等等),这些功能原初的Markdown尚不具备,它们能让Markdown转换成更多的格式,例如>LaTeX,Docbook。Markdown增强版中比较有名的有Markdown Extra、MultiMarkdown、 Maruku等。这些衍生版本要么基于工具,如Pandoc;要么基于网站,如GitHub和>Wikipedia,在语法上基本兼容,但在换行等细节上也有改动。 为什么有那么多人喜欢用markdown 学习成本低 ——身为一个轻量级的标记语言,Markdown拥有较少的标记符号,经常用到的就更少了,而且非常简单。 任何文本编辑器都可以打开 ——Markdown文档实际上就是纯文本(plain text)格式,只要是个文本编辑器都可以打开,只不过支持Markdown语法的编辑器会将其渲染成相应格式,由于其语法足够简单,即使用不支持Markdown的编辑器打开,你也能看懂。 格式转换方便 ——不少Markdown编辑器支持将文档转为pdf、docx、html等

Pandoc and html5 exporting pdf's with huge margins

大城市里の小女人 提交于 2020-08-09 18:44:07
问题 So I'm trying Pandoc for the first time. Everything seems great but when exporting via html5 (wkhtmltopdf) my pdf output is saved with huge margins on all sides. pandoc -t html5 -s example.md -o output.pdf output.pdf (content output highlighted in red) What I've tried: Reinstalling pdflatex Reinstalling wkhtmltopdf Including CSS to remove the margins Am I missing something? What I want: Write a markdown document using Typora -> Use Pandoc to apply TOC and page numbering -> Use html5 to export

Pandoc and html5 exporting pdf's with huge margins

限于喜欢 提交于 2020-08-09 18:42:06
问题 So I'm trying Pandoc for the first time. Everything seems great but when exporting via html5 (wkhtmltopdf) my pdf output is saved with huge margins on all sides. pandoc -t html5 -s example.md -o output.pdf output.pdf (content output highlighted in red) What I've tried: Reinstalling pdflatex Reinstalling wkhtmltopdf Including CSS to remove the margins Am I missing something? What I want: Write a markdown document using Typora -> Use Pandoc to apply TOC and page numbering -> Use html5 to export

Markdown文档转PDF、word、rtf、图像等格式

不羁的心 提交于 2020-08-09 18:11:37
操作步骤: 1.打开typora官网: https://www.typora.io ,一直往下拉,根据操作系统选择下载typora安装版本 2.安装typora,打开Markdown文件 3.文件>>导出...>>word、PDF、rtf、图像等格式 4.第一次导出如需安装pandoc,点击pandoc,打开浏览器进入pandoc 5.点击“installng”,进入下载页面,本例链接: https://github.com/jgm/pandoc/releases/tag/2.9.2.1 6.根据操作系统下载相应的版本 7.双击安装包“pandoc-2.9.2.1-windows-x86_64.msi”,安装pandoc,一直next,直至安装完成 8.pandoc安装完成,关闭typora软件重新打开md文件,选择word存放路径>>保存 说明:以Markdown转换为word为例 9.md转换成word,打开查看效果如下 来源: oschina 链接: https://my.oschina.net/u/4419233/blog/4289000

Pandoc markdown bold and color

时间秒杀一切 提交于 2020-08-08 18:52:50
问题 I am using pandoc and write my text in markdown. To create my own style I use a custom latex template. I want to style all bold words with a color. So when I type **a word** this word should not only be bold, but also e.g. blue. Using the following in my latex template file \newcommand\boldblue[1]{\textcolor{blue}{\textbf{#1}}} \renewcommand{\textbf}{\boldblue} gives me an error when converting to pdf using pandoc myfile -f markdown -t latex --template==mytemplate -o myfile.pdf which says TeX

Highlighting specific lines of code in Pandoc Revealjs

六眼飞鱼酱① 提交于 2020-08-08 05:50:30
问题 I'm using Pandoc to generate a Reveal.js presentation. It includes code in fenced code blocks, like this: ```java // Some Java code ``` Reveal.js supports a way to add a highlight to a specific line or range of lines, with the data-line-numbers="1" attribute that should be added to the <code> tag. I've tried to add this attribute to the fenced code block in various ways, such as this ``` { .java data-line-numbers="1" } // Some Java code ``` But I can't get it to work. Is there a way to use

Rmarkdown & PDF Output: Evaluate Markdown inside Latex section

孤人 提交于 2020-08-05 07:55:47
问题 How can I make it possible that markdown code used inside Latex Code gets evaluated? (Rmarkdown with PDF (Latex) Output) Very simple minimal example: \begin{center} **should be bold text** \end{center} Current output in .tex file after compiling with knitr: \begin{center} **should be bold text** \end{center} Expected: \begin{center} \textbf{should be bold text} \end{center} I would be happy to find a way to get this working, because I try to find a way in which I can pass a tibble/dataframe

Embed indented HTML in Markdown with Pandoc

倾然丶 夕夏残阳落幕 提交于 2020-08-02 08:19:43
问题 I have some embedded HTML in my Markdown (bulleted list within a table). Is there a way to indent my HTML without Pandoc treating it as a verbatim code block? 回答1: Sort of, but you have to change Pandoc's defaults. The Markdown rules expressly prohibit this: The only restrictions are that block-level HTML elements — e.g. <div> , <table> , <pre> , <p> , etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or