invoice-boilerplate icon indicating copy to clipboard operation
invoice-boilerplate copied to clipboard

Error 43 with \setmainlanguage

Open WelliSolutions opened this issue 1 year ago • 1 comments

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

WelliSolutions avatar Dec 07 '23 20:12 WelliSolutions

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

sbwiecko avatar Mar 07 '24 15:03 sbwiecko

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 avatar Jul 30 '24 08:07 josephmure

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

josephmure avatar Jul 30 '24 08:07 josephmure

@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!

mrzool avatar Jul 31 '24 13:07 mrzool

@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.

josephmure avatar Aug 02 '24 07:08 josephmure