If I have a dollar each time I find a conflict between Latex packages I would be a rich man.
I added \usepackage[low-sup]{subdepth} and now I am starting to get errors from matlab-prettifier when reading some Matlab code.
If I remove subdepth the error goes away. If I keep subdepth but remove breqn the error goes away also. But I'd like to use both these three packages in the same Latex file.
Here is a MWE
\documentclass[11pt]{article}%
\usepackage{matlab-prettifier}
\usepackage{breqn} %do not use this with tex4ht. added 4/2/16
\usepackage[low-sup]{subdepth} %added 4/29/16 to lower subscript
\begin{document}
\begin{lstlisting}
J = 8*u1-4
\end{lstlisting}
\end{document}
The error is pdflatex foo.tex
(/usr/local/texlive/2015/texmf-dist/tex/latex/subdepth/subdepth.sty) (./foo.aux
) (/usr/local/texlive/2015/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/local/texlive/2015/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
! Missing { inserted.
<to be read again>
\global
l.10 J = 8*u1-4
?
I can fix this by changing my Matlab code, from J = 8*u1-4 to J = 8*u1+4 but this will make my Matlab code produce wrong results, and I'd like to keep Matlab code as is, but still load it in Latex.
File list
*File List*
article.cls 2014/09/29 v1.4h Standard LaTeX document class
size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
matlab-prettifier.sty 2014/06/19 v0.3 A package for prettyprinting Matlab so
urce code
textcomp.sty 2005/09/27 v1.99g Standard LaTeX package
ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
xcolor.sty 2007/01/21 v2.11 LaTeX color extensions (UK)
color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages (HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
listings.sty 2015/06/04 1.6 (Carsten Heinz)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
lstmisc.sty 2015/06/04 1.6 (Carsten Heinz)
listings.cfg 2015/06/04 1.6 listings configuration
breqn.sty 2015/08/11 v0.98d Breaking equations
expl3.sty 2015/12/20 v6326 L3 programming layer (loader)
expl3-code.tex 2015/12/20 v6326 L3 programming layer
l3pdfmode.def 2015/11/11 v6250 L3 Experimental driver: PDF mode
flexisym.sty 2015/08/11 v0.98d Make math characters macros
cmbase.sym 2007/12/19 v0.92
mathstyle.sty 2015/08/11 v0.98d Tracking mathstyle implicitly
calc.sty 2014/10/28 v4.3 Infix arithmetic (KKT,FJ)
subdepth.sty 2007/09/02 v0.1 Unify subscript depths
ts1cmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
supp-pdf.mkii
***********
TL 2015
breqn.;-)– egreg May 18 '16 at 06:25