Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] Use XeLaTeX rather than pdflatex #19

Open
sbrisard opened this issue Oct 20, 2016 · 3 comments
Open

[Documentation] Use XeLaTeX rather than pdflatex #19

sbrisard opened this issue Oct 20, 2016 · 3 comments
Assignees

Comments

@sbrisard
Copy link
Owner

Compiling the latex files produced by sphinx with pdflatex results in some cryptic error messages

! Package inputenc Error: Unicode char  (U+21A6)
(inputenc)                not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.1948 ...åª (C\PYGZhy{}C\PYGZus{}0):\(\epsilon\)}

The culprit seems to be the "↦" character, used in the tutorial source files. Rather than modifying these sources, the way around would probably be to use xelatex rather than latex.

@sbrisard sbrisard self-assigned this Oct 20, 2016
@sbrisard
Copy link
Owner Author

sbrisard commented Oct 20, 2016

This improvement requires to override some latex elements in order

  • to not load inputenc and fontenc
  • to remove the line \DeclareUnicodeCharacter{00A0}{\nobreakspace}

@sbrisard
Copy link
Owner Author

The following lines in conf.py

latex_elements = {'preamble': '',
                  'inputenc': '',
                  'fontenc': ''}

Allow to get rid of inputenc and fontenc. However, the line

\DeclareUnicodeCharacter{00A0}{\nobreakspace}

in the generated *.tex file leads to a XeLaTeX error.

@sbrisard
Copy link
Owner Author

From this site, the following line solves the \DeclareUnicodeCharacter issue

https://trac.sagemath.org/attachment/ticket/10118/10118_sphinx_sagelib.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant