Skip to content

Commit ccf18f2

Browse files
committed
ci: update PDF build process to use lowercase filename for generated documents
1 parent 1d7146f commit ccf18f2

2 files changed

Lines changed: 33 additions & 20 deletions

File tree

.github/workflows/_build.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,10 @@ jobs:
260260
# arrows...) that pdflatex cannot handle. Two passes stabilise
261261
# cross-references.
262262
( cd build/doc && \
263-
xelatex -interaction=nonstopmode -halt-on-error DataLab.tex && \
264-
xelatex -interaction=nonstopmode -halt-on-error DataLab.tex )
265-
mv build/doc/DataLab.pdf "datalab/data/doc/DataLab_${LNG}.pdf"
263+
TEX=$(ls *.tex | head -n 1) && \
264+
xelatex -interaction=nonstopmode -halt-on-error "$TEX" && \
265+
xelatex -interaction=nonstopmode -halt-on-error "$TEX" )
266+
mv build/doc/*.pdf "datalab/data/doc/DataLab_${LNG}.pdf"
266267
done
267268
ls -lh datalab/data/doc/
268269

doc/conf.py

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -224,29 +224,41 @@ def exclude_api_from_gettext(app):
224224

225225
latex_elements = {
226226
# Use xelatex (set via ``latex_engine`` below): pdflatex chokes on the
227-
# emoji / box-drawing / arrow glyphs sprinkled across the docs. Map the
228-
# known problematic Unicode chars to the Symbola font (``fonts-symbola``
229-
# on Debian/Ubuntu; usually fetched on demand by MiKTeX on Windows).
227+
# emoji / box-drawing / arrow glyphs sprinkled across the docs. The
228+
# ``ucharclasses`` package automatically routes whole Unicode blocks
229+
# (emoji, dingbats, box-drawing, ...) to the Symbola fallback font
230+
# (Debian/Ubuntu package ``fonts-symbola``; MiKTeX fetches it on
231+
# demand on Windows).
230232
"preamble": r"""
231233
\usepackage{amsmath}
232234
\usepackage{amssymb}
233235
\usepackage{mathrsfs}
234236
\usepackage{fontspec}
235-
\usepackage{newunicodechar}
236237
\newfontfamily\unicodefallback{Symbola}[Scale=MatchLowercase]
237-
\newunicodechar{✅}{{\unicodefallback ✅}}
238-
\newunicodechar{❌}{{\unicodefallback ❌}}
239-
\newunicodechar{💡}{{\unicodefallback 💡}}
240-
\newunicodechar{➝}{{\unicodefallback ➝}}
241-
\newunicodechar{↔}{{\unicodefallback ↔}}
242-
\newunicodechar{┌}{{\unicodefallback ┌}}
243-
\newunicodechar{┐}{{\unicodefallback ┐}}
244-
\newunicodechar{└}{{\unicodefallback └}}
245-
\newunicodechar{┘}{{\unicodefallback ┘}}
246-
\newunicodechar{├}{{\unicodefallback ├}}
247-
\newunicodechar{┤}{{\unicodefallback ┤}}
248-
\newunicodechar{─}{{\unicodefallback ─}}
249-
\newunicodechar{│}{{\unicodefallback │}}
238+
\usepackage[
239+
Dingbats,
240+
Arrows,
241+
MiscellaneousSymbolsandArrows,
242+
MiscellaneousSymbols,
243+
MiscellaneousSymbolsandPictographs,
244+
MiscellaneousTechnical,
245+
BoxDrawing,
246+
GeometricShapes,
247+
SupplementalSymbolsandPictographs,
248+
Emoticons,
249+
TransportandMapSymbols,
250+
]{ucharclasses}
251+
\setTransitionsForDingbats{\unicodefallback}{\normalfont}
252+
\setTransitionsForArrows{\unicodefallback}{\normalfont}
253+
\setTransitionsForMiscellaneousSymbolsandArrows{\unicodefallback}{\normalfont}
254+
\setTransitionsForMiscellaneousSymbols{\unicodefallback}{\normalfont}
255+
\setTransitionsForMiscellaneousSymbolsandPictographs{\unicodefallback}{\normalfont}
256+
\setTransitionsForMiscellaneousTechnical{\unicodefallback}{\normalfont}
257+
\setTransitionsForBoxDrawing{\unicodefallback}{\normalfont}
258+
\setTransitionsForGeometricShapes{\unicodefallback}{\normalfont}
259+
\setTransitionsForSupplementalSymbolsandPictographs{\unicodefallback}{\normalfont}
260+
\setTransitionsForEmoticons{\unicodefallback}{\normalfont}
261+
\setTransitionsForTransportandMapSymbols{\unicodefallback}{\normalfont}
250262
"""
251263
+ "\n".join(f"\\newcommand{{\\{cmd}}}{{{defn}}}" for cmd, defn in macros.items()),
252264
}

0 commit comments

Comments
 (0)