You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In general, the process of producing a quality pgf file is confusing and not very intuitive to me. As a user, my ultimate goal is to be able to generate a pgf file that can be inputted into my own custom LaTeX document such that this final rendered plot looks identical to how matplotlib renders it internally. This internal rendering is what decides the position of labels, ticks, etc. so it is important that there is perfect consistency between this first internal rendering and my second final rendering. Achieving this consistency is very difficult when using a custom documentclass. From what I understand, there's no way to set what documentclass is used for the internal rendering as it appears to be hard coded as article. When using a complicated documentclass, it can become nearly impossible to track down every package, etc. that is used.
Is there any reason why this documentclass can't be provided by the user? I would suggest the following:
When saving a pgf, simply allow the user to specify an optional pgf.documentclass rcParam and use article as the default. (I assume this needs to be done separately from the pgf.preamble rcParam since it looks like matplotlib inserts other LaTeX commands between the documentclass and user provided preamble, but I may be wrong.)
The text was updated successfully, but these errors were encountered:
Problem
In general, the process of producing a quality pgf file is confusing and not very intuitive to me. As a user, my ultimate goal is to be able to generate a pgf file that can be inputted into my own custom LaTeX document such that this final rendered plot looks identical to how matplotlib renders it internally. This internal rendering is what decides the position of labels, ticks, etc. so it is important that there is perfect consistency between this first internal rendering and my second final rendering. Achieving this consistency is very difficult when using a custom
documentclass
. From what I understand, there's no way to set whatdocumentclass
is used for the internal rendering as it appears to be hard coded asarticle
. When using a complicateddocumentclass
, it can become nearly impossible to track down every package, etc. that is used.Related:
#28112
#26892
#26893
#26791
#14637
Proposed solution
Is there any reason why this
documentclass
can't be provided by the user? I would suggest the following:When saving a pgf, simply allow the user to specify an optional
pgf.documentclass
rcParam and usearticle
as the default. (I assume this needs to be done separately from thepgf.preamble
rcParam since it looks like matplotlib inserts other LaTeX commands between thedocumentclass
and user provided preamble, but I may be wrong.)The text was updated successfully, but these errors were encountered: