2

I have matplotlibrc file which contains following for latex preamble

text.latex.preamble : \usepackage{siunitx}, \usepackage{amsmath}, \boldmath

This definition used to work with matplotlib/v-3.03, but when I updated to version-3.4.2, it stopped working. I checked the cached tex file that matplotlib created, I found that in version-3.4.2 it can not split preamble properly. I am showing respectively lines from tex file bellow

Version-3.0.3

\usepackage{siunitx}
\usepackage{amsmath}
\boldmath

Version-3.4.2

\usepackage{siunitx}, \usepackage{amsmath}, \boldmath

Can someone help me, the right way to define the preamble in matplotlibrc file for new version? I know they have changed how to handle preamble but could not figure it out.

Thanks

5
  • 1
    Can you try without the colons in your matplotlibrc? The missing line breaks should not be a problem for latex Commented Jul 19, 2021 at 21:04
  • 1
    @samcarter_is_at_topanswers.xyz thanks a lot. It worked. I think you mean comma Commented Jul 20, 2021 at 1:52
  • 1
    yes, you are totally correct, I meant comma. Was a bit a late yesterday when I wrote that :) Commented Jul 20, 2021 at 8:18
  • @samcarter_is_at_topanswers.xyz do mind reply your answer in the "Answer" section so that I can accept your reply as an accepted answer. Thanks- Masrul Commented Jul 20, 2021 at 14:47
  • Can you write a self-answer? I'm not a matplotlib user, so can't test any code and this was just a wild guess. Commented Jul 20, 2021 at 15:07

1 Answer 1

2

As suggested by @samcarter_is_at_topanswers.xyz, if I remove the commas from the preamble, it works for both the old and new versions.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.