sbrisard / janus

Discretization of the Lippmann--Schwinger equation with periodic boundary conditions
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

[Documentation] Use XeLaTeX rather than pdflatex #19

Open sbrisard opened 7 years ago

sbrisard commented 7 years ago

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 commented 7 years ago

This improvement requires to override some latex elements in order

sbrisard commented 7 years ago

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 commented 7 years ago

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

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