asciidoctor-pdf 可以使用的参数
2015-02-06 11:40
218 查看
asciidoctor-pdf是可以把asciidotor文件生成pdf的库
它的使用方法为:
[11:38:17]--$ asciidoctor-pdf -h
Usage: asciidoctor [OPTION]... FILE...
Translate the AsciiDoc source FILE or FILE(s) into the backend output format (e.g., HTML 5, DocBook 4.5, etc.)
By default, the output is written to a file with the basename of the source file and the appropriate extension.
Example: asciidoctor -b html5 source.asciidoc
-b, --backend BACKEND set output format backend (default: html5)
-d, --doctype DOCTYPE document type to use when converting document: [article, book, manpage, inline] (default: article)
-o, --out-file FILE output file (default: based on path of input file); use - to output to STDOUT
--safe set safe mode level to safe (default: unsafe)
enables include macros, but restricts access to ancestor paths of source file
provided for compatibility with the asciidoc command
-S, --safe-mode SAFE_MODE set safe mode level explicitly: [unsafe, safe, server, secure] (default: unsafe)
disables potentially dangerous macros in source files, such as include::[]
-s, --no-header-footer suppress output of header and footer (default: false)
-n, --section-numbers auto-number section titles in the HTML backend; disabled by default
-e, --eruby ERUBY specify eRuby implementation to use when rendering custom ERB templates: [erb, erubis] (default: erb)
-C, --compact compact the output by removing blank lines. (No longer in use)
-a key[=value],key2[=value2],...,
--attribute a list of document attributes to set in the form of key, key! or key=value pair
unless @ is appended to the value, these attributes take precedence over attributes
defined in the source document
-T, --template-dir DIR a directory containing custom converter templates that override the built-in converter (requires tilt gem)
may be specified multiple times
-E, --template-engine NAME template engine to use for the custom converter templates (loads gem on demand)
-B, --base-dir DIR base directory containing the document and resources (default: directory of source file)
-D, --destination-dir DIR destination output directory (default: directory of source file)
-I, --load-path LIBRARY add a directory to the $LOAD_PATH
may be specified more than once
-r, --require LIBRARY require the specified library before executing the processor (using require)
may be specified more than once
-q, --quiet suppress warnings (default: false)
--trace include backtrace information on errors (default: false)
-v, --verbose enable verbose mode (default: false)
-t, --timings enable timings mode (default: false)
-h, --help show this message
-V, --version display the version and runtime environment (or -v if no other flags or arguments)
其中-a参数描述的非常不清楚
通过搜索源码(使用doc.attr()方法读取参数),整理了一下,主要参数包括
pdf-style : 目前提供了两个值,default 和 asciidoctor。可以通过扩展asciidoctor-pdf/data/themes下的YAML文件进行扩展
authors : 可以用该参数替换adoc文件中本来的作者
toc-title : 目录的标题,默认情况下显示“Table of Contents”
实例:
生成含有asciidoc皮肤的pdf,并且显示“目录”
asciidoctor-pdf -a pdf-style=asciidoctor,toc-title=目录 itembank.adoc
它的使用方法为:
[11:38:17]--$ asciidoctor-pdf -h
Usage: asciidoctor [OPTION]... FILE...
Translate the AsciiDoc source FILE or FILE(s) into the backend output format (e.g., HTML 5, DocBook 4.5, etc.)
By default, the output is written to a file with the basename of the source file and the appropriate extension.
Example: asciidoctor -b html5 source.asciidoc
-b, --backend BACKEND set output format backend (default: html5)
-d, --doctype DOCTYPE document type to use when converting document: [article, book, manpage, inline] (default: article)
-o, --out-file FILE output file (default: based on path of input file); use - to output to STDOUT
--safe set safe mode level to safe (default: unsafe)
enables include macros, but restricts access to ancestor paths of source file
provided for compatibility with the asciidoc command
-S, --safe-mode SAFE_MODE set safe mode level explicitly: [unsafe, safe, server, secure] (default: unsafe)
disables potentially dangerous macros in source files, such as include::[]
-s, --no-header-footer suppress output of header and footer (default: false)
-n, --section-numbers auto-number section titles in the HTML backend; disabled by default
-e, --eruby ERUBY specify eRuby implementation to use when rendering custom ERB templates: [erb, erubis] (default: erb)
-C, --compact compact the output by removing blank lines. (No longer in use)
-a key[=value],key2[=value2],...,
--attribute a list of document attributes to set in the form of key, key! or key=value pair
unless @ is appended to the value, these attributes take precedence over attributes
defined in the source document
-T, --template-dir DIR a directory containing custom converter templates that override the built-in converter (requires tilt gem)
may be specified multiple times
-E, --template-engine NAME template engine to use for the custom converter templates (loads gem on demand)
-B, --base-dir DIR base directory containing the document and resources (default: directory of source file)
-D, --destination-dir DIR destination output directory (default: directory of source file)
-I, --load-path LIBRARY add a directory to the $LOAD_PATH
may be specified more than once
-r, --require LIBRARY require the specified library before executing the processor (using require)
may be specified more than once
-q, --quiet suppress warnings (default: false)
--trace include backtrace information on errors (default: false)
-v, --verbose enable verbose mode (default: false)
-t, --timings enable timings mode (default: false)
-h, --help show this message
-V, --version display the version and runtime environment (or -v if no other flags or arguments)
其中-a参数描述的非常不清楚
通过搜索源码(使用doc.attr()方法读取参数),整理了一下,主要参数包括
pdf-style : 目前提供了两个值,default 和 asciidoctor。可以通过扩展asciidoctor-pdf/data/themes下的YAML文件进行扩展
authors : 可以用该参数替换adoc文件中本来的作者
toc-title : 目录的标题,默认情况下显示“Table of Contents”
实例:
生成含有asciidoc皮肤的pdf,并且显示“目录”
asciidoctor-pdf -a pdf-style=asciidoctor,toc-title=目录 itembank.adoc
相关文章推荐
- 非类型模板参数限制——不可以使用内部链接对象
- ASP中使用存储过程,遭遇"参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突"错误
- 使用commons-fileupload实现文件(doc、pdf)上传,提取表单参数并解决中文乱码
- $ajaxFileUpload可以带参数文件上传源码及使用
- 使用自定义setTimeout和setInterval使之可以传递参数和对象参数
- 终于找到了可以使用数组作为Oracle程序包参数的方法
- shell脚本操作mysql数据库,使用mysql的-e参数可以执行各种sql的(创建,删除,增,删,改、查)等各种操作
- 启动VC++2010时显示“您可以在命令行上使用/log参数运行应用程序”的解决办法
- lvs可以使用-p (persistent )参数对session进行保持
- 支付宝集成,return_url真的不能使用自定义参数吗,是可以的!
- 使用const使参数可以转换
- asp.net c#的传参中经常使用到中文参数的处理,下面的函数可以解决中文参数的问题
- Java读取Word/Excel/PDF可以使用的第三方包
- RDLC中使用自定义函数实现数字转中文大写(金额) 可以使用聚合函数做参数
- UART初始化时可以使用的参数
- 使用自定义setTimeout和setInterval使之可以传递参数和对象参数
- xargs可以将一个命令的输出作为另一个命令的参数——参看实例的使用
- 今天发现的可以使用参数的方式将表单设计元素名传给方法
- List<T>的ForEach方法(可以使用“语句lambda”作为其参数),如下例子:
- 泛型约束where条件的使用(可以通过类型参数动态反射创建实例)