pandoc后端用于叶子文档生成器。生成pdf和docx。
foliantcontrib.pandoc的Python项目详细描述
#pandoc backend for foliant
[pandoc](http://pandoc.org/)是一个瑞士军刀文档转换器。它几乎可以将任何格式转换为任何其他格式:md到pdf,rst到html,adoc到docx,等等。
pandoc backend for folant add`pdf`,`docx`,and`tex` targets.
需要为您的平台安装pandoc和texlive发行版。
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
结果:我的项目-2017-12-04.docx
```
build tex(主要用于pdf调试):
``shell
$foliant make tex-p my project
解析配置
应用预处理器flatten
使用pandoc制作docx—结果:my_project-2017-12-04.tex
```
\config
如果安装了,foliant将检测到它。
但是您可以使用"backend_config.pandoc"部分中的选项自定义后端:
``yaml
backend_config:
pandoc:
pandoc path:pandoc
模板:!路径模板。tex
变量:
…
参考文档:!路径引用。docx
参数:
…
筛选器:
…
降价风格:降价扩展:
…
slug:my_awesome_custom_slug
````
`pandoc_path`
:是"pandoc"可执行文件的路径。默认情况下,它假定位于"路径"中。
`template`
:是生成PDF和TEX时要使用的TEX模板的路径(请参见Pandoc文档中的["template s"](http://pandoc.org/manual.html templates))。
>;**提示**
>;
>;使用`!path`标记以确保值转换为相对于项目目录的有效路径。
`vars`
:是模板变量及其值的映射。
`reference_docx`
:是生成docx时要使用的引用文档的路径(请参见["templates"](http:pandoc文档中的pandoc.org/manual.html templates)。
>;**提示**
>;
>;使用`!path`标记以确保将值转换为相对于项目目录的有效路径。
`params`
:传递给"pandoc"命令。参数应该用它们的长名称来定义,用下划线替换破折号(例如,`--pdf engine`定义为'pdf戥engine`)。
`filters`
:是生成期间要应用的pandoc筛选器的列表。
`markdown戥flavor`
:是源代码中假定的标记风格。默认值为"markdown",[pandoc的扩展标记](http://pandoc.org/manual.html pandoc s markdown)。请参阅pandoc文档中的["降价变体"(http://pandoc.org/manual.html降价变体)。
`markdown撸extensions`
:应用于降价源的降价扩展列表。请参阅pandoc文档中的[pandoc's markdown](http://pandoc.org/manual.html\pandocs markdown)。
`slug`
:是不带后缀的结果文件名(例如`.pdf`)。覆盖顶级配置选项"slug"。
示例配置:
`` yaml
后端配置:
pandoc:
模板:!路径模板/basic.tex
变量:
toc:true
标题:这是标题
第二个标题:这是副标题
徽标:!路径模板/logo.png
年份:2017
参数:
pdf_引擎:xelatex
列表:true
数字部分:true
降价扩展:
-简单的表
-有栅栏的代码块
-删除
````
t`executable in`path`.
在MacOS上,`brew install librsvg`起作用。在ubuntu上,apt install librsvg2 bin。在Windows上,[下载'rsvg convert.7z`](http://opensourcepack.blogspot.ru/2012/06/rsvg-convert-svg-image-convertion-tool.html)(不支持fontconfig),解压缩'rsvg convert.exe',并将其放在'path'中的任何位置。例如,您可以将其放在运行"foliant make"的同一目录中。
/>
`` bash
生成pdf时出错。
!未定义的控制序列。
\lst@arg->;git clone[ssh-к
_]
l.627…到{\lstinline!Git克隆[ssh-к_]!}
```
[pandoc](http://pandoc.org/)是一个瑞士军刀文档转换器。它几乎可以将任何格式转换为任何其他格式:md到pdf,rst到html,adoc到docx,等等。
pandoc backend for folant add`pdf`,`docx`,and`tex` targets.
需要为您的平台安装pandoc和texlive发行版。
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
结果:我的项目-2017-12-04.docx
```
build tex(主要用于pdf调试):
``shell
$foliant make tex-p my project
解析配置
应用预处理器flatten
使用pandoc制作docx—结果:my_project-2017-12-04.tex
```
\config
如果安装了,foliant将检测到它。
但是您可以使用"backend_config.pandoc"部分中的选项自定义后端:
``yaml
backend_config:
pandoc:
pandoc path:pandoc
模板:!路径模板。tex
变量:
…
参考文档:!路径引用。docx
参数:
…
筛选器:
…
降价风格:降价扩展:
…
slug:my_awesome_custom_slug
````
`pandoc_path`
:是"pandoc"可执行文件的路径。默认情况下,它假定位于"路径"中。
`template`
:是生成PDF和TEX时要使用的TEX模板的路径(请参见Pandoc文档中的["template s"](http://pandoc.org/manual.html templates))。
>;**提示**
>;
>;使用`!path`标记以确保值转换为相对于项目目录的有效路径。
`vars`
:是模板变量及其值的映射。
`reference_docx`
:是生成docx时要使用的引用文档的路径(请参见["templates"](http:pandoc文档中的pandoc.org/manual.html templates)。
>;**提示**
>;
>;使用`!path`标记以确保将值转换为相对于项目目录的有效路径。
`params`
:传递给"pandoc"命令。参数应该用它们的长名称来定义,用下划线替换破折号(例如,`--pdf engine`定义为'pdf戥engine`)。
`filters`
:是生成期间要应用的pandoc筛选器的列表。
`markdown戥flavor`
:是源代码中假定的标记风格。默认值为"markdown",[pandoc的扩展标记](http://pandoc.org/manual.html pandoc s markdown)。请参阅pandoc文档中的["降价变体"(http://pandoc.org/manual.html降价变体)。
`markdown撸extensions`
:应用于降价源的降价扩展列表。请参阅pandoc文档中的[pandoc's markdown](http://pandoc.org/manual.html\pandocs markdown)。
`slug`
:是不带后缀的结果文件名(例如`.pdf`)。覆盖顶级配置选项"slug"。
示例配置:
`` yaml
后端配置:
pandoc:
模板:!路径模板/basic.tex
变量:
toc:true
标题:这是标题
第二个标题:这是副标题
徽标:!路径模板/logo.png
年份:2017
参数:
pdf_引擎:xelatex
列表:true
数字部分:true
降价扩展:
-简单的表
-有栅栏的代码块
-删除
````
t`executable in`path`.
在MacOS上,`brew install librsvg`起作用。在ubuntu上,apt install librsvg2 bin。在Windows上,[下载'rsvg convert.7z`](http://opensourcepack.blogspot.ru/2012/06/rsvg-convert-svg-image-convertion-tool.html)(不支持fontconfig),解压缩'rsvg convert.exe',并将其放在'path'中的任何位置。例如,您可以将其放在运行"foliant make"的同一目录中。
/>
`` bash
生成pdf时出错。
!未定义的控制序列。
\lst@arg->;git clone[ssh-к
_]
l.627…到{\lstinline!Git克隆[ssh-к_]!}
```