Problem with UTF-8 encoding in doc/mkdoc.py

Issue #331 resolved
Former user created an issue

I've switched from pandoc to rst2latex to build the docs on my own, but pdflatex fails two times on the table of contents file "UserGuide.toc" with this error:

{{{ ! Package inputenc Error: Unicode char \u8:⬜ not set up for use with LaTeX. }}}

Maybe this is caused by the character in line 88 of doc/mkdoc.py in changeset <<changeset 72574039222f>> which seems to be the weird character:

https://bitbucket.org/hudson/magic-lantern/changeset/72574039222f#chg-doc/mkdoc.py_newline88

Martin M.

Comments (8)

  1. Alex

    mkdoc.py should replace that square with "\square", at this line:

    os.system(r"sed -i 's/⬜/$\\square$/g' UserGuide.tex")
    

    If you get errors, it means that square was left in the tex file (and it shouldn't).

    What operating system are you using?

  2. Former user Account Deleted

    I'm using Mac OS X (10.6.6) with the latest MacTeX (2010) and today updated packages.

    Martin M.

  3. Alex
    sed: 1: "UserGuide.tex": invalid command code U
    sed: 1: "UserGuide.tex": invalid command code U
    sed: 1: "UserGuide.tex": invalid command code U
    

    This is the problem. Maybe Mac's "sed" is different from Linux's one.

  4. Log in to comment