refactor(docs): enhance PDF build process and font settings

Improves the PDF generation process by adding verbosity and updating
font configurations, ensuring better compatibility and output quality.

- Add "--verbose" to pandoc command for detailed output during PDF
  generation
- Change monofont from "SauceCodePro Nerd Font" to "Noto Sans Mono" for
  improved font rendering
- Switch PDF engine from "pdflatex" to "xelatex" for better Unicode
  support
- Uncomment fontspec package in LaTeX to enable custom font settings
- Add inputenc package and Unicode character declaration for extended
  character support

Signed-off-by: Glenn Y. Rolland <glenux@glenux.net>
This commit is contained in:
Glenn Y. Rolland 2025-03-27 09:59:17 +01:00
parent a8b755a7c9
commit 2a607d6f21
2 changed files with 6 additions and 3 deletions

View file

@ -39,6 +39,7 @@ print(f"Output: {output_file}")
# Build the pandoc options as a string
pandoc_cmd = [
"--verbose",
"--toc",
"--number-sections",
"--include-in-header", "utils/docs/main.tex",
@ -47,8 +48,8 @@ pandoc_cmd = [
# "-V", "geometry:a4paper",
# "-V", "geometry:margin=1.8cm",
"-V", "mainfont=DejaVu Serif",
"-V", "monofont=SauceCodePro Nerd Font",
"--pdf-engine=pdflatex",
"-V", "monofont=Noto Sans Mono",
"--pdf-engine=xelatex",
"--resource-path=utils/docs",
"--filter=./utils/docs/filter-nobg.hs",
]

View file

@ -2,6 +2,8 @@
% Set the document language to English
\usepackage[english]{babel}
% \usepackage[utf8]{inputenc}
% \DeclareUnicodeCharacter{21D2}{$\Rightarrow$}
% Adjust page geometry
\usepackage[
@ -25,6 +27,6 @@
\input{utils/docs/hyperref_setup.tex}
% Font settings using fontspec
% \usepackage{fontspec}
\usepackage{fontspec}
% \setmainfont{DejaVu Serif} % Set your main font
% \setmonofont{SauceCodePro Nerd Font} % Set your monospace (code) font