Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pdflatex with LuaLatex and latexmk #911

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

PatrickBaus
Copy link

Thank you so much for making this software open source. I am still learning to use it and I am currently working on improving the LaTex backend to finally integrate Facture-X/Zugferd and Order-X into the billing backend.

I would like to push those changes upstream as I progress if you are interested.

This PR starts with a small change to the LaTex backend replacing pdflatex with lualatex and latexmk. The latter has the following advantages over calling plain pdflatex or lualatex:

  • latexmk will call tex multiple times if several passes are required by the tex engine.
  • latexmk has the -cd flag which enters the temp directory during compilation and allows relative imports of auxiliary files like images (e.g. company logos or scanned signatures)

I chose to replace pdflatex with lualatex because lualatex offers a more modern backend with better utf-8 support. It also represent the current development direction instead of pdflatex which will see no new features added. This change will make generating compliant PDFs for Facture-X a lot easier later on.

The change from lualatex to pdflatex changes the default Computer Modern font (or rather European Computer Modern when loading the T1 font using fontenc) used by pdflatex to Latin Modern as this is a unicode compliant default font. Since the LaTex templates are demo templates I do not see an issue here.

@genglert
Copy link
Contributor

genglert commented Feb 7, 2025

Thx for the PR. We'll discuss internally if it's better to get your current modifications, or if it's better to get several Latex backends, then I'll make a complete feedback.

@PatrickBaus
Copy link
Author

@genglert Sure, do let me know. I can also rework the PR a bit if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants