garrettj403 / SciencePlots

Matplotlib styles for scientific plotting
MIT License
6.98k stars 701 forks source link

LaTeX Error: File `amsmathamssymb.sty' not found. #44

Closed rithwikjc closed 3 years ago

rithwikjc commented 3 years ago

Hi, I tried to run the code with both MikTex and TexLive. I got the same error. I am unable to trace the origin of the issue and fix it, but it looks like its coming because of a line somewhere like \usepackage{amsmathamssymb.sty} instead of \usepackage{amssymb, amsmath}. How can I fix this please?

I am using SciencePlots 1.08,matplotlib 3.0.3andpython 3.6` on Windows 10.

Part of the error traceback

RuntimeError: latex was not able to process the following string:
b'lp'

Here is the full report generated by latex:
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (MiKTeX 21.6)
entering extended mode
(C:/Users/rhk217/.matplotlib/tex.cache/095cf47b971237f6261701feb16a758d.tex
LaTeX2e <2021-06-01>
L3 programming layer <2021-06-01>
(D:/Program Files/MiKTeX\tex/latex/base\article.cls
Document Class: article 2021/02/12 v1.4n Standard LaTeX document class
(D:/Program Files/MiKTeX\tex/latex/base\size10.clo))
(D:/Program Files/MiKTeX\tex/latex/type1cm\type1cm.sty)
(D:/Program Files/MiKTeX\tex/latex/base\textcomp.sty)
(D:/Program Files/MiKTeX\tex/latex/base\inputenc.sty)

! LaTeX Error: File `amsmathamssymb.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.
<read *>

l.12 \usepackage
                [papersize={72in,72in},body={70in,70in},margin={1in,1in}]{ge...
No pages of output.
Transcript written on 095cf47b971237f6261701feb16a758d.log.
latex: major issue: So far, you have not checked for MiKTeX updates.
rithwikjc commented 3 years ago

After posting this I went through all the closed issues and found #4. So I tried something similar. In science.mplstyle I replaced the existing text.latex.preamble: \usepackage{amsmath, amssymb} with

text.latex.preamble : \usepackage{amsmath} \usepackage{amssymb}

This solved the issue for me.

garrettj403 commented 3 years ago

Thanks for pointing that out! I fixed this issue in 65a1cf5fb31f39ca702a0e77200ea79a1e01d729.

For all styles, there is now one "usepackage" per LaTeX package

rithwikjc commented 3 years ago

Thanks