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

Category names containing LaTeX control characters blows up invoice generation #3

Open
witten opened this issue Nov 20, 2020 · 0 comments

Comments

@witten
Copy link
Contributor

witten commented Nov 20, 2020

Using billwarrior from master on Manjaro Linux stable. And pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020/Arch Linux).

Example billwarrior.ini:

[categories]
logistics.text = This & That
logistics.tags = stuff
logistics.rate = 12345

Resulting billwarrior_items.tex:

...
\feetype{This & that}
\hourrow{November 20, 2020}{1.0}{12345.00}
...

Resulting pdflatex error:

! Argument of \check@nocorr@ has an extra }.
<inserted text> 
                \par 
l.23 \feetype{This & that}

The problem is that the & character is significant to LaTeX and interpreted as a control character unless it's escaped.

In terms of potential solutions, escaping the category name in Python as per one of these answers might solve the problem: https://stackoverflow.com/questions/16259923/how-can-i-escape-latex-special-characters-inside-django-templates

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

No branches or pull requests

1 participant