AsciidocFX编辑器小贴士
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编辑器小贴士的更多相关文章
- Angular2 小贴士 Name
Angular2 正式版已经发布了一个月了,我也是通过各种方式在进行验证是否可以满足我们的需求,今天我就发现了一个问题.现在我们来一起说明一下,这个可能不算是bug,而应该需要我们记住就可以了. 我们 ...
- 【小贴士】虚拟键盘与fixed带给移动端的痛!
前言 今天来公司的主要目的就是研究虚拟键盘与fixed的问题,期间因为同事问起闭包与事件委托(阻止冒泡)相关问题,便穿插了一篇别的: [小贴士]工作中的”闭包“与事件委托的”阻止冒泡“,有兴趣的朋友可 ...
- SVN小贴士
我辛辛苦苦写的到哪里了? SVN小贴士SVN服务器上的代码项目组公用,你的每一个提交都会体现给项目组每个人,所以提交要慎重,要注意避免代码冲突,使用SVN小贴士: 1.提前宣布开发计划,保持项目组成员 ...
- android性能小贴士 翻译
转自http://developer.android.com/training/articles/perf-tips.html 性能小贴士: 这篇文档主要一些微优化可以提升应用程序性能,但是这些改变不 ...
- 小贴士——提高PHP程序在NGINX代理服务器的性能
NGINX本身就是面向最大性能的代理服务器,因此在使用NGINX,并没有性能调整的配置工作.但是却有很多选项可用于定制NGINX的行为,利用底层硬件和操作系统. 下面将介绍用于提供PHP在NGINX的 ...
- jprofiler8使用小贴士
说明:本文的小贴士是针对jprofiler8的,其他版本上可能有不适用的地方 贴士一:使用jpenable监控,无需增加jvm参数和重启 贴士一:使用jpenable监控,无需增加jvm参数和重启 j ...
- 初识bd时的一些技能小贴士
既然小豆腐如此给力,而且充分的利用主动学习的优势,已经有了迅速脑补,压倒式的优势,不过这只是表面而已,一切才刚刚开始,究竟鹿死谁手,还有待验证. 以上可以看到,小豆腐为什么拼命的要teach我们了么, ...
- SharePoint每日小贴士Web部件
SharePoint每日小贴士Web部件 项目描写叙述 此Web部件从指定SP自己定义列表或一个选定的 RSS源选择一个随机项目.并显示一张图片.标题和一个Tip. 适 ...
- C和C++的内存操作小贴士(一):const char*的内存释放问题
C和C++的内存操作一直是困扰开发人员的老问题,基本概念相信老司机们都很清楚了,在这里就不做过多的描述了,只是把在实际开发中可能遇到的一些小问题的案例列举下,供大家参考.“C和C++的内存操作小贴士” ...
随机推荐
- 30分钟快速学习Shell脚本编程
什么是Shell脚本 示例 看个例子吧: #!/bin/sh cd ~ mkdir shell_tut cd shell_tut for ((i=0; i<10; i++)); do touch ...
- zoj 2022
分析: 组合数学类型的题目. 正常的话可能会去分解1~N数里面有几个5和2,但是这样的复杂度为O(nlogn). 其实有更巧妙的办法,可以把问题分解成子问题. 可以发现N!末尾的0与1~N中有几个5的 ...
- IDL 矩阵运算
矩阵相乘,A#B表示A的列乘以B的行,要求A的行数必须跟B的列数一致 IDL> A=[[0,1,2],[3,4,5]] IDL> B=[[0,1],[2,3],[4,5]] IDL> ...
- marked插件在线实时解析markdown的web小工具
访问地址: https://mdrush.herokuapp.com/ github项目: https://github.com/qcer/MDRush 实现简介: 1.动态数据绑定 借助Vuejs, ...
- C# WinForm DataGridView让DataPropertyName支持复杂属性
首先给Grid添加BindingSource,类型为BindingForForm2.或者设置Grid的DataSource为IEnumerable<BindingForForm2>. Bi ...
- angularJS的环境搭建--初学
一 \在这里简单介绍一下Angular-cli的特性: Angular-cli可以快速搭建框架,创建module,service,class,directive等: 有webpack的功能,可以实现 ...
- Windows下swoole扩展的编译安装部署
1. 到cygwin官网下载cygwin. 官网地址:https://www.cygwin.com/ 2. 打开下载好的cygwin安装包,开始安装cygwin. 选择cygwin的安装目录(这个同时 ...
- LeetCode 136. Single Number (落单的数)
Given an array of integers, every element appears twice except for one. Find that single one. Note:Y ...
- 【20171026早】alert(1) to win - 第六、七、八题
早上7点起床,又写了一篇小说发在了起点网上,有兴趣的可以看看.点击这里 忙完后,继续练习,刚开始发现自己答题的速度有些慢,可能是因为对于html,javascript知识不是很精通,但是话又说回来,谁 ...
- Ceph: A Scalable, High-Performance Distributed File System译文
原文地址:陈晓csdn博客 http://blog.csdn.net/juvxiao/article/details/39495037 论文概况 论文名称:Ceph: A Scalable, High ...