从HTML Help Workshop生成chm时双引号转换为框

时间:2017-11-14 07:11:01

标签: python-sphinx restructuredtext chm html-help-workshop

我正在通过Sphinx创建文档并重新构建文本,然后发出以下命令:

  

$ make html

     

$ make htmlhelp。

一旦完成,我使用HTML Help Workshop编译一个chm文件。

简单的HTML文档看起来很好,文本看起来我想要它 但是,当我打开chm文件时,所有双引号都转换为框:

enter image description here

以下是重组文本的一部分:

Opening the FTP in Windows File Explorer
""""""""""""""""""""""""""""""""""""""""

To open the FTP in Windows File Explorer (this may need to be done through a network administrator using group policies):

- Open IE
- Go to the *Tools* menu and select *Internet Options*
- Go to the *Advanced* tab
- Check the box "*Enable ftp folder view (Outside of Internet Explorer)*"

Adding a FTP shortcut to Windows File Explorer
""""""""""""""""""""""""""""""""""""""""""""""

You may want to add a shortcut to it either on your desktop or straight under *My Computer* in Windows File Explorer. The File Explorer shortcut is useful as it only requires you to log in when you first access it during your windows session. To do so:

- Open Windows Explorer
- Right-click on "My Computer" in the navigation panel on the left
- Choose "Add new network location"
- Use the wizard to create a new network location for your FTP site
- The FTP site will now show up in My Computer as a network location. You can make shortcuts from there by right-clicking on the connection and choosing "send to" > "desktop (as shortcut)".

输入@quot;字面上显示为@quot;

如何修复重组文本,以便html和htmlhelp格式都显示双引号?

1 个答案:

答案 0 :(得分:1)

解决方案:我让Sphinx使用一个名为RTD(ReadTheDocs)的主题,如果找到主题源代码,请在任何纯文本编辑器中打开layout.html。

在这里找到我的:C:\ Python27 \ Lib \ site-packages \ sphinx_rtd_theme \ layout.html

查找:

  <meta charset="utf-8">

在它周围放置条件逻辑,在构建html帮助时将省略utf-8设置:

  {% if 'htmlhelp' not in builder %}
  <meta charset="utf-8">
  {% endif %}

制作htmlhelp,编译htmlhelp并显示,引号现在正确显示: enter image description here