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. 个人工作中ssd、audio python脚本总结

    1.os.system(cmd)或者os.popen(cmd)调用外部命令 cmd中需要注意特殊字符的转义功能,如: USBSTOR\DISK&VEN_GENERIC-&PROD_SD ...

  2. JAVAEE企业级应用开发浅谈第二辑:MVC和三层架构

    上海尚学堂警句:一份信心,一份努力,一份成功:十分信心,十分努力,十分成功. Step1.情景概要 Hello,小伙伴们,昨天跟大家分享了JAVA EE 企业级应用开发中大家耳熟能详的概念-三层架构, ...

  3. XamlReader动态使用xaml

    xamlload先在xaml做出一个grid,命名xgrid <Page x:Class="xamlload.MainPage" xmlns="http://sch ...

  4. JavaScript命令模式

    第一,命令模式: (1)用于消除调用者和接收者之间直接的耦合的模式,并且可以对(调用这个过程进行留痕操作) (2)真的不要乱用这个模式,以为他使你简单调用写法变得非常的复杂和有些难以理解. (3)你的 ...

  5. 使用Hexo+Github一步步搭建属于自己的博客(基础)

    前言:电脑系统为window 10专业版,64位 相关步骤: 1.安装Node.js和配置好Node.js环境,打开cmd命令行,成功界面如下 2.安装Git和配置好Git环境,安装成功的象征就是在电 ...

  6. [oracle 使用(2)] Oracle的简单使用

    1:oracle的服务 oracleservice + sid # 数据库服务 oracleoradb10g_home1listener # 数据库的监听服务. 2:启动本机数据库: 启动oracle ...

  7. MongoDB覆盖索引查询

    官方的MongoDB的文档中说明,覆盖查询是以下的查询: 1. 所有的查询字段是索引的一部分 2. 所有的查询返回字段在同一个索引中 由于所有出现在查询中的字段是索引的一部分, MongoDB 无需在 ...

  8. LeetCode 101. Symmetric Tree (对称树)

    Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For e ...

  9. python的小基础

    变量python中的变量为指向常量的地址当常量没有指向时,系统自动回收内存空间如A = 1B = AA = 2print(A,B)#2,1id(A),id(B)id()为python虚拟机的虚拟地址, ...

  10. 基于 webpack 的 chrome 扩展开发探索

    起 最近利用闲暇时间在进行一款 chrome 扩展 V2EX-HELPER 的开发(如果巧遇 V 友欢迎试用),今天把它彻底改成了用 webpack 打包依赖的模式,不由得感概 webpack 的强大 ...