From 0fd5f3431ab07427796a0e485e5e32999d1df16d Mon Sep 17 00:00:00 2001 From: cedounet <134267244+cedounet@users.noreply.github.com> Date: Thu, 3 Aug 2023 20:38:31 +0100 Subject: [PATCH] Use Lualatex (#159) * Use LuaLaTeX instead of pdfTeX Will allow to use Open Type Fonts in the future Other less important reasons: - Uniform encoding in UTF-8 - We could maybe use some luaTeX only packages - It's more modern, should be better * Use Tex Gyre Heros as helvetica clone As it does not seem available by default on the CI machine and might have some licensing issues. --- book/makefile | 10 +++++----- book/sourdough.sty | 6 ++---- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/book/makefile b/book/makefile index 7a050a4..ebd555d 100644 --- a/book/makefile +++ b/book/makefile @@ -1,7 +1,7 @@ # Macros for commands -LATEX := latexmk -cd -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make -EBOOK := tex4ebook -d epub -c tex4ebook.cfg -CLEAN := latexmk -cd -c -use-make +LATEX := latexmk -cd -pdflua -lualatex="lualatex -interaction=nonstopmode" -use-make +EBOOK := tex4ebook --lua -d epub -c tex4ebook.cfg +CLEAN := latexmk --lua -cd -c -use-make EBOOK_CONVERT := kindlegen CHECK_1 := lacheck CHECK_2 := chktex @@ -225,7 +225,7 @@ release_sans_serif: build_sans_serif_pdf build_sans_serif_ebook | make_release_d .PHONY: website website: rm -rf $(WEBSITE_DIR) - make4ht -c website.cfg -a debug -uf html5+tidy+common_domfilters+dvisvgm_hashes -d $(WEBSITE_DIR) book.tex + make4ht --lua -c website.cfg -a debug -uf html5+tidy+common_domfilters+dvisvgm_hashes -d $(WEBSITE_DIR) book.tex cp $(WEBSITE_DIR)/book.html $(WEBSITE_DIR)/index.html # Debug Stuff from now on @@ -233,7 +233,7 @@ website: show_tools_version: # Show version of tools used on the build machine - latexmk --version @echo "" - - pdflatex --version + - lualatex --version @echo "" - tex4ebook --version @echo "" diff --git a/book/sourdough.sty b/book/sourdough.sty index e151a1d..d28a390 100644 --- a/book/sourdough.sty +++ b/book/sourdough.sty @@ -1,16 +1,15 @@ \ProvidesPackage{sourdough} -\usepackage[utf8]{inputenc} \usepackage{blindtext} \usepackage{graphicx} \usepackage{booktabs} \usepackage{longtable} \usepackage{tocbasic} -\usepackage[T1]{fontenc} \usepackage{chemformula} \usepackage{chemfig} \usepackage{booktabs} \usepackage{makecell} \usepackage{siunitx} +\usepackage{fontspec} \renewcommand\theadfont{\bfseries} @@ -25,8 +24,7 @@ % Fonts for accessibility \ifdefined\isaccessible - \usepackage{helvet} - \renewcommand{\familydefault}{\sfdefault} + \setmainfont{TeX Gyre Heros} % Helvetica clone \fi % Kerning in footnotes