|
1 | 1 | # If extensions (or modules to document with autodoc) are in another directory, |
2 | 2 | # add these directories to sys.path here. If the directory is relative to the |
3 | 3 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
4 | | -from sys import path as sys_path |
5 | | -from os.path import abspath |
6 | | -from pathlib import Path |
| 4 | +from sys import path as sys_path |
| 5 | +from os.path import abspath |
| 6 | +from pathlib import Path |
| 7 | +from textwrap import dedent |
7 | 8 |
|
8 | 9 | from pyTooling.Packaging import extractVersionInformation |
9 | 10 |
|
|
127 | 128 | print(ex) |
128 | 129 | latexPreamble = "" |
129 | 130 |
|
| 131 | +latex_engine = "lualatex" |
| 132 | +latex_use_xindy = False |
130 | 133 | latex_elements = { |
131 | | - "inputenc": "", # Let LuaLaTeX handle input encoding |
132 | | - "utf8extra": "", |
133 | | - "fontenc": "", # Disable the default T1 font encoding (Essential for LuaLaTeX) |
134 | | - "fontpkg": "", # Disable the default TeX font package (Times/Palatino) |
135 | 134 | "papersize": "a4paper", # The paper size ('letterpaper' or 'a4paper'). |
136 | | - #'pointsize': '10pt', # The font size ('10pt', '11pt' or '12pt'). |
| 135 | + "pointsize": "10pt", # The font size ('10pt', '11pt' or '12pt'). |
| 136 | + "inputenc": "", # Let LuaLaTeX handle input encoding |
| 137 | + "utf8extra": "", |
| 138 | + "fontenc": r"\usepackage{fontspec}", # Disable the default T1 font encoding (Essential for LuaLaTeX) |
| 139 | + "fontpkg": dedent("""\ |
| 140 | + \\usepackage{unicode-math} |
| 141 | +
|
| 142 | + % Set the Text Fonts (Libertinus) |
| 143 | + \\setmainfont{Libertinus Serif} |
| 144 | + \\setsansfont{Libertinus Sans} |
| 145 | + \\setmonofont{Libertinus Mono} |
| 146 | + \\setmathfont{Libertinus Math} |
| 147 | +
|
| 148 | + % Set Symbol font |
| 149 | + \\usepackage{newunicodechar} |
| 150 | + \\newfontfamily{\\emojifont}[Renderer=OpenType]{NotoColorEmoji.ttf} |
| 151 | + """), |
| 152 | + "passoptionstopackages": dedent("""\ |
| 153 | + \\PassOptionsToPackage{verbatimvisiblespace=\\ }{sphinx} |
| 154 | + """), |
137 | 155 | "preamble": latexPreamble, # Additional stuff for the LaTeX preamble. |
138 | 156 | #'figure_align': 'htbp', # Latex figure (float) alignment |
| 157 | + "makeindex": r"\usepackage[columns=1]{idxlayout}\makeindex", |
| 158 | + "printindex": r"\def\twocolumn[#1]{#1}\printindex", |
139 | 159 | } |
140 | 160 |
|
141 | 161 | # Grouping the document tree into LaTeX files. List of tuples |
|
0 commit comments