Skip to content

Commit 0bbc76e

Browse files
committed
Updated unicode characters for LaTeX.
1 parent 3c52c3c commit 0bbc76e

4 files changed

Lines changed: 51 additions & 25 deletions

File tree

.github/workflows/CompletePipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,5 +514,5 @@ jobs:
514514
statictyping_html
515515
#apptesting_xml:-*
516516
documentation_html
517-
documentation_latex
517+
#documentation_latex
518518
#documentation_pdf

.github/workflows/_Checking_NamespacePackage_Pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
codecov: 'true'
1717
codacy: 'true'
1818
dorny: 'true'
19-
documentation_steps: 'html latex'
19+
documentation_steps: 'html'
2020
auto_tag: 'false'
2121
secrets:
2222
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

doc/conf.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# If extensions (or modules to document with autodoc) are in another directory,
22
# add these directories to sys.path here. If the directory is relative to the
33
# 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
78

89
from pyTooling.Packaging import extractVersionInformation
910

@@ -127,15 +128,34 @@
127128
print(ex)
128129
latexPreamble = ""
129130

131+
latex_engine = "lualatex"
132+
latex_use_xindy = False
130133
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)
135134
"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+
"""),
137155
"preamble": latexPreamble, # Additional stuff for the LaTeX preamble.
138156
#'figure_align': 'htbp', # Latex figure (float) alignment
157+
"makeindex": r"\usepackage[columns=1]{idxlayout}\makeindex",
158+
"printindex": r"\def\twocolumn[#1]{#1}\printindex",
139159
}
140160

141161
# Grouping the document tree into LaTeX files. List of tuples

doc/preamble.tex

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,24 @@
55
% - Alternatively, compile with XeLaTeX or LuaLaTeX.
66
% - https://GitHub.com/sphinx-doc/sphinx/issues/3511
77
%
8-
\usepackage{fontspec}
9-
10-
% Set Main fonts
11-
\usepackage{libertinus-otf}
12-
%\usepackage{noto-emoji}
13-
14-
% Set Math font
15-
\usepackage{unicode-math}
16-
\setmathfont{LibertinusMath}
17-
18-
% Set Symbol font
19-
\usepackage{newunicodechar}
20-
\newfontfamily{\emojifont}[Renderer=OpenType]{NotoColorEmoji.ttf}
8+
%%\usepackage{fontspec}
9+
%
10+
%% Set Main fonts
11+
%\usepackage{libertinus-otf}
12+
%%\usepackage{noto-emoji}
13+
%
14+
%% Set Math font
15+
%\usepackage{unicode-math}
16+
%\setmathfont{LibertinusMath}
17+
%
18+
%% Set Symbol font
19+
%\usepackage{newunicodechar}
20+
%\newfontfamily{\emojifont}[Renderer=OpenType]{NotoColorEmoji.ttf}
2121
\newunicodechar{≤}{\ensuremath{\le}}
2222
\newunicodechar{—}{---}
2323
\newunicodechar{…}{\dots}
24-
\newunicodechar{␣}{\ttfamily\char32} % open box = visible space U+2423
24+
\newunicodechar{␣}{xxyyzz} % open box = visible space U+2423
25+
\newunicodechar{⟲}{\nvcirclearrowleft} % circular arrow counterclockwise U+27F2
2526

2627
\newunicodechar{🍎}{{\emojifont 🍎}} % red apple
2728
\newunicodechar{🍏}{{\emojifont 🍏}} % green apple
@@ -41,9 +42,14 @@
4142
\newunicodechar{🟫}{{\emojifont 🟫}} % braun square U+1F7EB
4243
\newunicodechar{🟦}{{\emojifont 🟦}} % blue square U+1F7E6
4344
\newunicodechar{🟪}{{\emojifont 🟪}} % purple square U+1F7EA
44-
\newunicodechar{}{{\emojifont }} % circular arrow counterclockwise U+27F2
45+
\newunicodechar{}{{\emojifont }} % black square U+2B1B
4546
\newunicodechar{📦}{{\emojifont 📦}}
4647
\newunicodechar{📂}{{\emojifont 📂}}
4748
\newunicodechar{🗑}{{\emojifont 🗑}} % Wastebasket 🗑️ U+1F5D1
49+
\newunicodechar{⚙}{{\emojifont ⚙}} % Gear ⚙️ U+2699
50+
\newunicodechar{❌}{{\emojifont ❌}} % Red X U+274C
51+
\newunicodechar{🚫}{{\emojifont 🚫}} % Prohibited 🚫 U+
52+
\newunicodechar{⚠}{{\emojifont ⚠}} % Warning ⚠️ U+26A0
53+
\newunicodechar{✅}{{\emojifont ✅}} % Green checkbox U+2705
4854

4955
% ================================================================================

0 commit comments

Comments
 (0)