Closed yuncu closed 4 years ago
Can you share some code that breaks now, I guess the fix is indeed not good.
Also, can you confirm that the 1.3.4 release doesn't have the issue?
I am using 1.4.0 of PyLaTex and the issue does not exist in 1.3.4
This is from my code:
report = Document(documentclass="article", indent=False, document_options=["a4paper"], fontenc=None, inputenc=None, geometry_options=["this"])
In the tex file:
\usepackage{parskip}% \usepackage{geometry}% \geometry{this}%
What does \geometry command do?
\geometry
is supposed to apply the options in a way that works if \usepackage{geometry}
was already used by another package: https://tex.stackexchange.com/a/412473/43228
What's your "this"
in your case and what is the error you are getting?
To be clear, the geometry tests that exist in the project pass fine with this change. So I think it might be related to your specific options.
Actually, I'm using geometry_options=[] just to include the geometry package.
Error is shown in the line:
\usepackage{parskip}% \usepackage{geometry}% \geometry% \usepackage[turkish,noconfigs,shorthands=off]{babel}% <------
Error message:
Missing \endcsname inserted.
If I remove geometry_options=[] from Document constructor, geometry package is not included and the error disappears.
If I delete the \geometry line from tex file, error is not shown.
Maybe there is a problem between geometry and babel packages. Or \geometry command needs a default argument.
Thanks.
So you gave an empty array to geometry_options
before and that worked? But now it doesn't? If so, that edge case should be fairly easy to fix.
Meanwhile you can either use 1.3.4 or use document.packages.append(Package('geometry'))
I'll go with the second option, thanks.
Hi,
Using geometry_options in Document creation, an additional "\geometry" command is created in tex file creating errors.
Most probably due to #299.
Best