From c50936e8d4feb3d6d71531b34f64ecda07d127ae Mon Sep 17 00:00:00 2001 From: Michael Roland Date: Fri, 18 Oct 2024 11:28:05 +0200 Subject: [PATCH 1/4] add LuaTeX support --- jkureport.sty | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/jkureport.sty b/jkureport.sty index 845532f..a456fa9 100644 --- a/jkureport.sty +++ b/jkureport.sty @@ -65,7 +65,14 @@ \RequirePackage{booktabs} \RequirePackage{rotating} \RequirePackage{colortbl} -\RequirePackage{ifxetex} +\RequirePackage{iftex} +% legacy packages prior to merge into iftex; still relevant? +\@ifundefined{ifluatex}{% + \RequirePackage{ifluatex} +}{} +\@ifundefined{ifxetex}{% + \RequirePackage{ifxetex} +}{} \RequirePackage{verbatim} \RequirePackage{tcolorbox} \tcbuselibrary{skins} @@ -132,7 +139,7 @@ fontpath=fonts, } -% Option [no]fancyfonts: use custom TTF fonts with XeTeX (defaults to true) +% Option [no]fancyfonts: use custom TTF fonts with XeTeX/LuaTeX (defaults to true) \newbool{jkureport@xetexfonts} \pgfkeys{% /jkureport/pkg/.cd, @@ -478,29 +485,29 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% -%% Fancy fonts with XeTeX +%% Fancy fonts with LuaTeX/XeTeX %% -\ifxetex\else% - \ifbool{jkureport@xetexfonts}{% - \PackageWarning{jkureport}{True-type fonts are only supported on XeLaTeX. Please consider switching to XeLaTeX to get the full look and feel of this template. Note that you can silence this warning with the `nofancyfonts' option.}% - }{}% - \boolfalse{jkureport@xetexfonts}% -\fi - \ifbool{jkureport@xetexfonts}{}{% \RequirePackage{lmodern} }% \RequirePackage{inconsolata} \RequirePackage{helvet} -\ifxetex\else% +\ifluatex\else\ifxetex\else% \RequirePackage{euler} -\fi +\fi\fi \RequirePackage{fontawesome5} -\ifxetex\else% +\ifluatex\else\ifxetex\else% % fix potentially mis-packaged FA5 in TeX Live 2017, see https://tex.stackexchange.com/q/497792/290236 \pdfmapfile{=fontawesome5.map}% -\fi +\fi\fi + +\ifluatex\else\ifxetex\else% + \ifbool{jkureport@xetexfonts}{% + \PackageWarning{jkureport}{True-type fonts are only supported on LuaLaTeX/XeLaTeX. Please consider switching to LuaLaTeX (or XeLaTex) to get the full look and feel of this template. Note that you can silence this warning with the `nofancyfonts' option.}% + }{}% + \boolfalse{jkureport@xetexfonts}% +\fi\fi \ifbool{jkureport@xetexfonts}{% \ifbool{jkureport@mathastext}{ From ac1561bb8c6fe982133452ffa0ba585646bcbb8e Mon Sep 17 00:00:00 2001 From: Michael Roland Date: Sat, 19 Oct 2024 11:51:47 +0200 Subject: [PATCH 2/4] add LuaLaTeX to CI build workflows --- .github/workflows/test-build-latex.yml | 37 ++++++++++++++++++++++++++ .gitlab-ci.yml | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-build-latex.yml b/.github/workflows/test-build-latex.yml index 3b689ad..2219093 100644 --- a/.github/workflows/test-build-latex.yml +++ b/.github/workflows/test-build-latex.yml @@ -32,6 +32,18 @@ jobs: job_source: ${{ env.SOURCE_NAME_THESIS }} job_artifact_suffix: -xelatex + build-thesis-lualatex: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: ./.github/actions/latexmk-and-output + with: + job_engine: pdflua + job_source: ${{ env.SOURCE_NAME_THESIS }} + job_artifact_suffix: -lualatex + build-report-pdflatex: runs-on: ubuntu-latest steps: @@ -56,6 +68,18 @@ jobs: job_source: ${{ env.SOURCE_NAME_REPORT }} job_artifact_suffix: -xelatex + build-report-lualatex: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: ./.github/actions/latexmk-and-output + with: + job_engine: pdflua + job_source: ${{ env.SOURCE_NAME_REPORT }} + job_artifact_suffix: -lualatex + build-seminar-pdflatex: runs-on: ubuntu-latest steps: @@ -79,3 +103,16 @@ jobs: job_engine: pdfxe job_source: ${{ env.SOURCE_NAME_SEMINAR }} job_artifact_suffix: -xelatex + + build-seminar-lualatex: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: ./.github/actions/latexmk-and-output + with: + job_engine: pdflua + job_source: ${{ env.SOURCE_NAME_SEMINAR }} + job_artifact_suffix: -lualatex + diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3a1f360..667e947 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ include: parallel: matrix: - LATEX_BUILDPDF_SOURCE_NAME: [main-thesis, main-report, main-seminarreport] - LATEX_BUILDPDF_TEX_COMMAND: [pdflatex, xelatex] + LATEX_BUILDPDF_TEX_COMMAND: [pdflatex, xelatex, lualatex] latex_build_pdf: extends: From a047ec431e538f5bb73517a718126922484d4385 Mon Sep 17 00:00:00 2001 From: Michael Roland Date: Mon, 21 Oct 2024 12:26:45 +0200 Subject: [PATCH 3/4] only set pdfpage[width|height] if length exists and set page[width|height] for LuaTeX --- jkureport.sty | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/jkureport.sty b/jkureport.sty index a456fa9..dce24d0 100644 --- a/jkureport.sty +++ b/jkureport.sty @@ -444,8 +444,19 @@ \setlength{\jkureport@authoring@titlepage@offset}{60mm} % General page sizing -\setlength{\pdfpagewidth}{\paperwidth} -\setlength{\pdfpageheight}{\paperheight} + +\@ifundefined{pdfpagewidth}{}{% + \setlength{\pdfpagewidth}{\paperwidth} +} +\@ifundefined{pagewidth}{}{% + \setlength{\pagewidth}{\paperwidth} +} +\@ifundefined{pdfpageheight}{}{% + \setlength{\pdfpageheight}{\paperwidth} +} +\@ifundefined{pageheight}{}{% + \setlength{\pageheight}{\paperwidth} +} \setlength{\hoffset}{0in} \setlength{\voffset}{0in} From 0e44e8ee7747b3c7533d38b6769dd001eca5458a Mon Sep 17 00:00:00 2001 From: Michael Roland Date: Mon, 21 Oct 2024 12:34:32 +0200 Subject: [PATCH 4/4] update example documentation --- main-report.tex | 26 +++++++++++++++++--------- main-seminarreport.tex | 14 ++++++++------ main-thesis.tex | 16 +++++++++------- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/main-report.tex b/main-report.tex index 9407206..48d7c74 100644 --- a/main-report.tex +++ b/main-report.tex @@ -9,7 +9,8 @@ %% %% You can safely use "pdflatex" instead of "xelatex" if you prefer the pdfLaTeX toolchain. %% However, pdfLaTeX will not be able to deliver the professional font experience that you -%% will get with XeLaTeX. +%% will get with XeLaTeX. You can also safely use "lualatex" instead of "xelatex" while +%% preserving the professional font experience if you prefer the LuaLaTeX toolchain. %% %% _Important_: These magic comments should be on the first lines of your source file. %% @@ -27,8 +28,8 @@ %% JJJJJJJJJJJJJ KKKKKKKKKKKKKKKKKKKKKKKKKKK UUUUUUUUUUUUUUU %% JJJJJJJJJ KKKKKKKKKKKKKKKKKKKKKKKKKKK UUUUUUUUUUU %% -%% This is an example file for using the JKU LaTeX technical report template for -%% your technical report. +%% This is an example file for using the JKU LaTeX technical report template +%% for your technical report. %% %% Template created by Michael Roland (2021) %% @@ -74,7 +75,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Treat input files as UTF-8 encoded. Make sure to always load this when you use pdfLaTeX -%% so that pdfLaTeX knows how to read and interpret characters this source file. +%% so that pdfLaTeX knows how to read and interpret characters in this source file. %% \usepackage[utf8]{inputenc} %% @@ -107,7 +108,7 @@ %% * SOWI ... Use SOWI faculty color scheme. %% * TNF ... Use TNF faculty color scheme. %% -%% Space-efficient monospace font options (requires XeTeX): +%% Space-efficient monospace font options (requires XeTeX/LuaTeX): %% * compactmono ... Use condensed fixed-width font everywhere. %% * nocompactverb ... Do not use condensed fixed-width font for verbatim and listings. %% @@ -115,15 +116,15 @@ %% * noimprint ... Do not insert imprint on title pages. %% * nojkulogo ... Do not insert JKU & K logos on title pages. %% * capstitle ... Set document title in capital letters. -%% * nofancyfonts ... Do not use custom TTF fonts with XeTeX / supress pdfLaTeX warning. +%% * nofancyfonts ... Do not use custom TTF fonts with XeTeX/LuaTeX / supress pdfLaTeX warning. %% * equalmargins ... Decrease the outer page margin to have both page margins of equal size %% (the additional outer margin is intentional and to be used for %% anotations; equalmargins also causes the text width to be %% significantly larger than optimal for reading). %% %% Experimental options: -%% * mathastext ... Use standard document fonts (enhanced with symbols from Fira Math font) -%% in math mode. +%% * mathastext ... Use standard document fonts (enhanced with symbols from Fira Math font +%% when using XeTeX/LuaTeX) in math mode. %% %% Advanced options: %% * noautopdfinfo ... Do not automatically try to add pdfinfo with hyperref from document @@ -153,6 +154,7 @@ \usepackage{import} \usepackage{amsfonts} \usepackage{subfigure} +%\usepackage{acronym} %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -235,6 +237,11 @@ %% Print the table of contents \tableofcontents +%% Make sure to start the list of acronyms on a new odd page (odd is only relevant in twoside layout) +%\cleardoubleoddpage +%% Include list of acronyms (optional and often not necessary) +%\import{./}{acronyms} + %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -340,7 +347,7 @@ \section{Conclusion} %% %% Print the bibliography %% -%% Make sure to start the bibliography on a new odd page (odd is only relevant in twoside layout) +%% (Optionally) let the bibliography start on a new odd page (odd is only relevant in twoside layout) %\cleardoubleoddpage \printbibliography %% @@ -366,6 +373,7 @@ \section{An Appendix} %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \cleardoubleoddpage \end{document} diff --git a/main-seminarreport.tex b/main-seminarreport.tex index 1528eb0..a33cd9f 100644 --- a/main-seminarreport.tex +++ b/main-seminarreport.tex @@ -9,7 +9,8 @@ %% %% You can safely use "pdflatex" instead of "xelatex" if you prefer the pdfLaTeX toolchain. %% However, pdfLaTeX will not be able to deliver the professional font experience that you -%% will get with XeLaTeX. +%% will get with XeLaTeX. You can also safely use "lualatex" instead of "xelatex" while +%% preserving the professional font experience if you prefer the LuaLaTeX toolchain. %% %% _Important_: These magic comments should be on the first lines of your source file. %% @@ -74,7 +75,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Treat input files as UTF-8 encoded. Make sure to always load this when you use pdfLaTeX -%% so that pdfLaTeX knows how to read and interpret characters this source file. +%% so that pdfLaTeX knows how to read and interpret characters in this source file. %% \usepackage[utf8]{inputenc} %% @@ -107,7 +108,7 @@ %% * SOWI ... Use SOWI faculty color scheme. %% * TNF ... Use TNF faculty color scheme. %% -%% Space-efficient monospace font options (requires XeTeX): +%% Space-efficient monospace font options (requires XeTeX/LuaTeX): %% * compactmono ... Use condensed fixed-width font everywhere. %% * nocompactverb ... Do not use condensed fixed-width font for verbatim and listings. %% @@ -115,15 +116,15 @@ %% * noimprint ... Do not insert imprint on title pages. %% * nojkulogo ... Do not insert JKU & K logos on title pages. %% * capstitle ... Set document title in capital letters. -%% * nofancyfonts ... Do not use custom TTF fonts with XeTeX / supress pdfLaTeX warning. +%% * nofancyfonts ... Do not use custom TTF fonts with XeTeX/LuaTeX / supress pdfLaTeX warning. %% * equalmargins ... Decrease the outer page margin to have both page margins of equal size %% (the additional outer margin is intentional and to be used for %% anotations; equalmargins also causes the text width to be %% significantly larger than optimal for reading). %% %% Experimental options: -%% * mathastext ... Use standard document fonts (enhanced with symbols from Fira Math font) -%% in math mode. +%% * mathastext ... Use standard document fonts (enhanced with symbols from Fira Math font +%% when using XeTeX/LuaTeX) in math mode. %% %% Advanced options: %% * noautopdfinfo ... Do not automatically try to add pdfinfo with hyperref from document @@ -356,6 +357,7 @@ \section{An Appendix} %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + \cleardoubleoddpage \end{document} diff --git a/main-thesis.tex b/main-thesis.tex index 0c51440..3bd3aa4 100644 --- a/main-thesis.tex +++ b/main-thesis.tex @@ -9,7 +9,8 @@ %% %% You can safely use "pdflatex" instead of "xelatex" if you prefer the pdfLaTeX toolchain. %% However, pdfLaTeX will not be able to deliver the professional font experience that you -%% will get with XeLaTeX. +%% will get with XeLaTeX. You can also safely use "lualatex" instead of "xelatex" while +%% preserving the professional font experience if you prefer the LuaLaTeX toolchain. %% %% _Important_: These magic comments should be on the first lines of your source file. %% @@ -73,7 +74,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Treat input files as UTF-8 encoded. Make sure to always load this when you use pdfLaTeX -%% so that pdfLaTeX knows how to read and interpret characters this source file. +%% so that pdfLaTeX knows how to read and interpret characters in this source file. %% \usepackage[utf8]{inputenc} %% @@ -106,7 +107,7 @@ %% * SOWI ... Use SOWI faculty color scheme. %% * TNF ... Use TNF faculty color scheme. %% -%% Space-efficient monospace font options (requires XeTeX): +%% Space-efficient monospace font options (requires XeTeX/LuaTeX): %% * compactmono ... Use condensed fixed-width font everywhere. %% * nocompactverb ... Do not use condensed fixed-width font for verbatim and listings. %% @@ -114,15 +115,15 @@ %% * noimprint ... Do not insert imprint on title pages. %% * nojkulogo ... Do not insert JKU & K logos on title pages. %% * capstitle ... Set document title in capital letters. -%% * nofancyfonts ... Do not use custom TTF fonts with XeTeX / supress pdfLaTeX warning. +%% * nofancyfonts ... Do not use custom TTF fonts with XeTeX/LuaTeX / supress pdfLaTeX warning. %% * equalmargins ... Decrease the outer page margin to have both page margins of equal size %% (the additional outer margin is intentional and to be used for %% anotations; equalmargins also causes the text width to be %% significantly larger than optimal for reading). %% %% Experimental options: -%% * mathastext ... Use standard document fonts (enhanced with symbols from Fira Math font) -%% in math mode. +%% * mathastext ... Use standard document fonts (enhanced with symbols from Fira Math font +%% when using XeTeX/LuaTeX) in math mode. %% %% Advanced options: %% * noautopdfinfo ... Do not automatically try to add pdfinfo with hyperref from document @@ -286,7 +287,8 @@ %% %% Print the bibliography %% -\cleardoubleoddpage% Make sure to start bibliography on a new odd page +%% Make sure to start the bibliography on a new odd page (odd is only relevant in twoside layout) +\cleardoubleoddpage \printbibliography %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%