Skip to content

Commit 082cef1

Browse files
committed
Changed LaTeX preamble to transition to Unicode and OTF fonts.
1 parent b904164 commit 082cef1

5 files changed

Lines changed: 57 additions & 29 deletions

File tree

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ indent_style = tab
99
indent_size = 2
1010
tab_width = 2
1111

12-
1312
[*.py]
1413
indent_style = tab
1514
indent_size = 2

doc/conf.py

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -120,33 +120,24 @@
120120
# ==============================================================================
121121
from textwrap import dedent
122122

123+
preamblePath = Path("preamble.tex")
124+
try:
125+
with preamblePath.open("r", encoding="utf-8") as fileHandle:
126+
latexPreamble = fileHandle.read()
127+
except Exception as ex:
128+
print(f"[ERROR:] While reading '{preamblePath}'.")
129+
print(ex)
130+
latexPreamble = ""
131+
123132
latex_elements = {
124-
# The paper size ('letterpaper' or 'a4paper').
125-
"papersize": "a4paper",
126-
127-
# The font size ('10pt', '11pt' or '12pt').
128-
#'pointsize': '10pt',
129-
130-
# Additional stuff for the LaTeX preamble.
131-
"preamble": dedent(r"""
132-
% ================================================================================
133-
% User defined additional preamble code
134-
% ================================================================================
135-
% Add more Unicode characters for pdfLaTeX.
136-
% - Alternatively, compile with XeLaTeX or LuaLaTeX.
137-
% - https://GitHub.com/sphinx-doc/sphinx/issues/3511
138-
%
139-
\ifdefined\DeclareUnicodeCharacter
140-
\DeclareUnicodeCharacter{2265}{$\geq$}
141-
\DeclareUnicodeCharacter{21D2}{$\Rightarrow$}
142-
\fi
143-
144-
145-
% ================================================================================
146-
"""),
147-
148-
# Latex figure (float) alignment
149-
#'figure_align': 'htbp',
133+
"inputenc": "", # Let XeLaTeX handle input encoding
134+
"utf8extra": "",
135+
"fontenc": "", # Disable the default T1 font encoding (Essential for XeLaTeX/LuaLaTeX)
136+
"fontpkg": "", # Disable the default TeX font package (Times/Palatino)
137+
"papersize": "a4paper", # The paper size ('letterpaper' or 'a4paper').
138+
#'pointsize': '10pt', # The font size ('10pt', '11pt' or '12pt').
139+
"preamble": latexPreamble, # Additional stuff for the LaTeX preamble.
140+
#'figure_align': 'htbp', # Latex figure (float) alignment
150141
}
151142

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

doc/preamble.tex

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
% ================================================================================
2+
% User defined additional preamble code
3+
% ================================================================================
4+
% Add more Unicode characters for pdfLaTeX.
5+
% - Alternatively, compile with XeLaTeX or LuaLaTeX.
6+
% - https://GitHub.com/sphinx-doc/sphinx/issues/3511
7+
%
8+
\usepackage{fontspec}
9+
\usepackage{unicode-math}
10+
11+
% Set Main fonts
12+
\setmainfont{Noto Serif}
13+
\setsansfont{Noto Sans}
14+
15+
% Set your requested Source Code Pro for Monospace
16+
% Make sure "Source Code Pro" is installed on your Windows system
17+
\setmonofont{Source Code Pro}[Scale=MatchLowercase]
18+
19+
% Set Math font
20+
\setmathfont{Libertinus Math}
21+
22+
% Set Symbol font
23+
\newfontfamily{\symbolsfont}{DejaVu Sans}
24+
25+
26+
% 4. Handle the "Package" Icon and other Symbols
27+
% If Noto Serif misses the 📦 icon, we can define a fallback
28+
%\newfontfamily{\symbolsfont}{Segoe UI Symbol} % Excellent on Windows
29+
%\newfontfamily{\emojifont}{Segoe UI Emoji}
30+
31+
% Tell XeLaTeX to look for specific characters in other fonts if missing
32+
% This requires the 'ucharclasses' package or manual substitution
33+
34+
35+
% ================================================================================

myPackage/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
__email__ = "Paebbels@gmail.com"
3737
__copyright__ = "2017-2026, Patrick Lehmann"
3838
__license__ = "Apache License, Version 2.0"
39-
__version__ = "7.4.4"
39+
__version__ = "7.5.1"
4040
__keywords__ = ["GitHub Actions"]
4141
__issue_tracker__ = "https://GitHub.com/pyTooling/Actions/issues"
4242

run.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ Param(
3232
[switch]$help
3333
)
3434

35-
$PackageName = "Actions"
35+
$PackageName = "Actions"
36+
$PackageVersion = "7.5.1"
37+
$PythonVersion = "3.14"
38+
$LaTeXDocument = $PackageName
3639

3740
# set default values
3841
$EnableDebug = [bool]$PSCmdlet.MyInvocation.BoundParameters["Debug"]

0 commit comments

Comments
 (0)