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. python _winreg模块

    详细资料请参考:https://docs.python.org/2/library/_winreg.html 一.常用函数功能介绍 OpenKey() - 打开一个key ############## ...

  2. HDU1024 DP的优化 最大M子段和问题

    Max Sum Plus Plus Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others ...

  3. 关于安全性问题:(XSS,csrf,cors,jsonp,同源策略)

    关于安全性问题:(XSS,csrf,cors,jsonp,同源策略) Ajax 是无需刷新页面就能从服务器获取数据的一种方法.它的核心对象是XHR,同源策略是ajax的一种约束,它为通信设置了相同的协 ...

  4. C#直接发送打印机命令到打印机及ZPL常用打印命令 - 条码打印机

    using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServi ...

  5. WPF 中的 Pack URI地(资源文件加载)

    参考资源网http://msdn.microsoft.com/zh-cn/library/aa970069.aspx#Absolute_vs_Relative_Pack_URIs 在 Windows ...

  6. WPF通过代码动态的加载样式

    tabitem.SetResourceReference(TabItem.StyleProperty, "mainTabItemStyle"); tabitem.Content = ...

  7. NSTimer的问题

    iOS开发中,涉及到定时的问题,我们通常使用NSTimer来解决,例如下面的代码. SFClass.h #import <Foundation/Foundation.h> @interfa ...

  8. Python学习笔记(八)

    Python学习笔记(八): 复习回顾 递归函数 内置函数 1. 复习回顾 1. 深浅拷贝 2. 集合 应用: 去重 关系操作:交集,并集,差集,对称差集 操作: 定义 s1 = set('alvin ...

  9. Python和SQL 2017的强大功能

    Python和SQL Server 2017的强大功能   原文来自:https://www.red-gate.com/simple-talk/sql/sql-development/power-py ...

  10. ASP.NET Core 网站发布到Linux服务器(转)

    出处;ASP.NET Core 网站发布到Linux服务器 长期以来,使用.NET开发的应用只能运行在Windows平台上面,而目前国内蓬勃发展的互联网公司由于成本的考虑,大量使用免费的Linux平台 ...