mrzool / invoice-boilerplate

Simple automated LaTeX invoicing system
http://mrzool.cc/tex-boilerplates/
GNU General Public License v2.0
702 stars 102 forks source link

Error 43 with \setmainlanguage #24

Closed WelliSolutions closed 4 days ago

WelliSolutions commented 8 months ago

I get the following error and I don't know what I'm doing wrong. I'm just trying to compile the default invoice

Error producing PDF.
! Argument of \str_uppercase:n has an extra }.
<inserted text>
                \par
l.61 \setmainlanguage{}

make: *** [makefile:6: output.pdf] Error 43

I wonder a bit why it says line 61, because \setmainlanguage is on line 69 in template.tex

sbwiecko commented 5 months ago

I believe the error comes from the engine, try using xelatex, as proposed in https://github.com/mrzool/invoice-boilerplate/pull/27#issue-2174143860

josephmure commented 5 days ago

I got the same error (using xelatex) and fixed it by switching polyglossia to babel, as suggested here: https://github.com/jgm/pandoc/pull/7562. To do this,

  1. replace the following lines in template.tex:
\usepackage{polyglossia}
\setmainlanguage{$polyglossia-lang.name$}

with:

\usepackage[$lang$]{babel}
  1. replace the following line in details.yml:
lang: en-GB

with:

lang: english
josephmure commented 5 days ago

I have proposed a fix at #28 but this project seems dead unfortunately...

mrzool commented 4 days ago

@josephmure I'm just very short on time and I apologize for that. I'll just assume that your PR works and merge it. Thanks a lot!

The sibling projects cv-boilerplate and letter-boilerplate both use polyglossia and could use the same fix. If you have time to put together similar PRs for them, I’d be happy to merge them!

josephmure commented 2 days ago

@mrzool Thanks for merging! The fix works on my computer at least. I can propose the same fix for the other projects (although I haven't pulled them), but you will have to test whether it works with them too.