I. AsciidocFX支持UML生成:

要生成UML,记得要下载GRAPHVIZ,并配置GRAPHVIZ_DOT环境变量,路径是Graphviz\bin\dot.exe。

II. AsciidocFX生成中文PDF文件时,可能会出现如下两个问题:

1.页眉中的中文解析成###,无法正确解析。原因:没有配置合适的Unicode字体。

2.二级以下的标题无法正确解析中文,中文全部变成###。原因:中文字体无法同时支持 加粗+斜体 的样式。

AsciidocFX使用了FOP来生成pdf,而FOP对中文的支持并不十分完善,引用 http://www.blogjava.net/scud/ 中的描述如下:

FOP 0.20.5功能相对还是比较弱,例如

1.不支持多种字体的组合,也就是不支持font-family="sans-serif,宋体"这种方式,
   结果就是每段都要指定,否则就只能用一种了,对于confluence来说就很不好了...
   
  2.不支持程序处理斜体,黑体,这样就要求字体支持黑体,斜体才能实现黑体斜体的效果.
    结果就是中文字体都没有黑体,斜体,无法直接实现中文的黑体,斜体了

对应上述问题,需要在AsciidocFX\conf\docbook-config\fo-pdf.xsl中修改生成样式——修改两个地方即可解决。

第一个地方原文:

    <xsl:attribute-set name="header.content.properties">
<xsl:attribute name="font-family">Sans-serif,Arial</xsl:attribute>
<xsl:attribute name="font-size">8pt</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="footer.content.properties">
<xsl:attribute name="font-family">Sans-serif,Arial</xsl:attribute>
<xsl:attribute name="font-size">8pt</xsl:attribute>
</xsl:attribute-set>

修改:

    <xsl:attribute-set name="header.content.properties">
<xsl:attribute name="font-family">Arial Unicode MS,Sans-serif,Arial</xsl:attribute>
<xsl:attribute name="font-size">8pt</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="footer.content.properties">
<xsl:attribute name="font-family">Arial Unicode MS,Sans-serif,Arial</xsl:attribute>
<xsl:attribute name="font-size">8pt</xsl:attribute>
</xsl:attribute-set>

第二个地方原文:

    <xsl:attribute-set name="section.title.level1.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="section.title.level2.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="font-style">italic</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="section.title.level3.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="font-style">italic</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="section.title.level4.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="font-style">italic</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="section.title.level5.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="font-style">italic</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="section.title.level6.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="font-style">italic</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set>

修改:

    <xsl:attribute-set name="section.title.level1.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="section.title.level2.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<!-- <xsl:attribute name="font-style">italic</xsl:attribute> -->
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="section.title.level3.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<!-- <xsl:attribute name="font-style">italic</xsl:attribute> -->
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="section.title.level4.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<!-- <xsl:attribute name="font-style">italic</xsl:attribute> -->
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="section.title.level5.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<!-- <xsl:attribute name="font-style">italic</xsl:attribute> -->
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set> <xsl:attribute-set name="section.title.level6.properties">
<xsl:attribute name="font-size">12pt</xsl:attribute>
<!-- <xsl:attribute name="font-style">italic</xsl:attribute> -->
<xsl:attribute name="font-weight">bold</xsl:attribute>
</xsl:attribute-set>

AsciidocFX编辑器小贴士的更多相关文章

  1. Angular2 小贴士 Name

    Angular2 正式版已经发布了一个月了,我也是通过各种方式在进行验证是否可以满足我们的需求,今天我就发现了一个问题.现在我们来一起说明一下,这个可能不算是bug,而应该需要我们记住就可以了. 我们 ...

  2. 【小贴士】虚拟键盘与fixed带给移动端的痛!

    前言 今天来公司的主要目的就是研究虚拟键盘与fixed的问题,期间因为同事问起闭包与事件委托(阻止冒泡)相关问题,便穿插了一篇别的: [小贴士]工作中的”闭包“与事件委托的”阻止冒泡“,有兴趣的朋友可 ...

  3. SVN小贴士

    我辛辛苦苦写的到哪里了? SVN小贴士SVN服务器上的代码项目组公用,你的每一个提交都会体现给项目组每个人,所以提交要慎重,要注意避免代码冲突,使用SVN小贴士: 1.提前宣布开发计划,保持项目组成员 ...

  4. android性能小贴士 翻译

    转自http://developer.android.com/training/articles/perf-tips.html 性能小贴士: 这篇文档主要一些微优化可以提升应用程序性能,但是这些改变不 ...

  5. 小贴士——提高PHP程序在NGINX代理服务器的性能

    NGINX本身就是面向最大性能的代理服务器,因此在使用NGINX,并没有性能调整的配置工作.但是却有很多选项可用于定制NGINX的行为,利用底层硬件和操作系统. 下面将介绍用于提供PHP在NGINX的 ...

  6. jprofiler8使用小贴士

    说明:本文的小贴士是针对jprofiler8的,其他版本上可能有不适用的地方 贴士一:使用jpenable监控,无需增加jvm参数和重启 贴士一:使用jpenable监控,无需增加jvm参数和重启 j ...

  7. 初识bd时的一些技能小贴士

    既然小豆腐如此给力,而且充分的利用主动学习的优势,已经有了迅速脑补,压倒式的优势,不过这只是表面而已,一切才刚刚开始,究竟鹿死谁手,还有待验证. 以上可以看到,小豆腐为什么拼命的要teach我们了么, ...

  8. SharePoint每日小贴士Web部件

    SharePoint每日小贴士Web部件 项目描写叙述         此Web部件从指定SP自己定义列表或一个选定的 RSS源选择一个随机项目.并显示一张图片.标题和一个Tip.         适 ...

  9. C和C++的内存操作小贴士(一):const char*的内存释放问题

    C和C++的内存操作一直是困扰开发人员的老问题,基本概念相信老司机们都很清楚了,在这里就不做过多的描述了,只是把在实际开发中可能遇到的一些小问题的案例列举下,供大家参考.“C和C++的内存操作小贴士” ...

随机推荐

  1. hadoop(一)之初识大数据与Hadoop

    前言 从今天起,我将一步一步的分享大数据相关的知识,其实很多程序员感觉大数据很难学,其实并不是你想象的这样,只要自己想学,还有什么难得呢? 学习Hadoop有一个8020原则,80%都是在不断的配置配 ...

  2. Python面试题之python是一种什么语言及优缺点

    1.说说python是一种什么语言? 参考答案:python是一门动态解释性的强类型定义语言 编译型vs解释型 编译型优点:编译器一般会有预编译的过程对代码进行优化.因为编译只做一次,运行时不需要编译 ...

  3. git 忽略文件夹

    $ vim .gitignore 添加要忽略的文件或文件夹 esc + :wq 退出vim命令行

  4. 搭建git远程服务器三步骤

    以前都是使用git,这次由于工作需要,需要自己搭建一个远程git服务器.根据网上的 介绍,捣鼓了一下午,终于把远程git服务器搞定了,这里,做个总结. 搭建git远程服务,首先要安装git和ssh,以 ...

  5. C# 文件下载

    在a标签href属性直接写文件地址有些文件不会进入下载(例如 图片类型),浏览器会自动打开预览这时可以使用下面这种方式进行文件下载 Html代码 <a href="/DownloadF ...

  6. 为db2用户添加db2命令及jdk环境变量配置

    AIX系统:db2inst用户 在/home/db2inst/.profile文件下新增以下代码(包括用户环境变量配置,具体路径取决于jdk安装的路径) PATH=/usr/bin:/etc:/usr ...

  7. Java IO编程全解(一)——Java的I/O演进之路

    转载请注明出处:http://www.cnblogs.com/Joanna-Yan/p/7419117.html JDK1.4之前的早期版本,Java对I/O的支持并不完善,开发人员在开发高性能I/O ...

  8. 传统 HTML 表单数据的“整存整取”

    在日常开发中,涉及表单的处理司空见惯.过往,在取值和赋值的过程中,借助 jQuery 常常只是逐个控件进行操作,可惜这样开发效率并不高.那么能不能批量获取整个表单的值呢,以及批量为表单赋值. 一.取值 ...

  9. 【特效】几种实用的按钮hover效果

    效果预览:http://www.gbtags.com/gb/rtreplayerpreview-standalone/3095.htm html: <ul class="btn&quo ...

  10. JAVA提高五:注解Annotation

    今天我们学习JDK5.0中一个非常重要的特性,叫做注解.是现在非常流行的一种方式,可以说因为配置XML 比较麻烦或者比容易查找出错误,现在越来越多的框架开始支持注解方式,比如注明的Spring 框架, ...