python-sphinxrestructuredtextchmhtml-help-workshop

Double quotes converted to box when generating chm from HTML Help Workshop


I am creating documentation through Sphinx and restructured text, then issuing the following commands:

$ make html

$ make htmlhelp.

Once that is complete I use HTML Help Workshop to compile a chm file.

The plain HTML documentation looks good, text looks how I want it to.
However when I open the chm file all double quotes are converted to boxes:

enter image description here

Here's a portion of my restructured text:

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)".

Entering @quot; displays literally as @quot;

How can I fix the restructured text so that both the html and htmlhelp formats display the double quotes?


Solution

  • The solution: I have Sphinx using a theme called RTD (ReadTheDocs), if you find the theme source code, open the layout.html in any plain text editor.

    Found mine here: C:\Python27\Lib\site-packages\sphinx_rtd_theme\layout.html

    Find:

      <meta charset="utf-8">
    

    Place conditional logic around it, will omit the utf-8 setting upon building html help:

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

    make the htmlhelp, compile the htmlhelp and display, quotes are now displaying correctly: enter image description here