1

As described in the title. MWE:

\documentclass{tufte-handout}
\usepackage[newfloat]{minted}
\begin{document}
\begin{listing}

\begin{minted}{python}
a = 666
\end{minted}
\end{listing}
\end{document}

If I remove the blank line, pdflatex complains. If I change to article and remove the blank line, it works. What's going on here?

I'm not sure which part of the log I should put here as it's rather copious. Here is some of it:

! Bad space factor (0).
<recently read> \@savsf 
                        
l.7 \end{minted}
                
I allow only values in the range 1..32767 here.


! LaTeX Error: \begin{minipage} on input line 5 ended by \end{VerbatimOut}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.7 \end{minted}
                
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

! Missing } inserted.
<inserted text> 
                }
l.7 \end{minted}
                
I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.

runsystem(pygmentize -S default -f latex -P commandprefix=PYG > mwe.out.pyg)...
executed.

(./mwe.out.pyg)
runsystem(pygmentize -S default -f latex -P commandprefix=PYGdefault > mwe.out.
pyg)...executed.

 (./mwe.out.pyg)
runsystem(pygmentize -l php -f latex -P commandprefix=PYG -F tokenmerge -o mwe.
out.pyg mwe.pyg)...executed.

 (./mwe.out.pyg)

! LaTeX Error: \begin{lrbox} on input line 5 ended by \end{minted}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.7 \end{minted}
                
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

! Improper \prevdepth.
\@gtempa ...negatefalse \iftrue \ifnum \prevdepth 
                                                  >0\relax \TE@setvaltrue \e...
2
  • Please cite the error that you get when that blank line is removed. Your example does not complain for me with or without that blank line. – daleif Aug 20 '20 at 9:11
  • It looks like I've omitted a critical change I made to tufte. I used the "tufte-common.def" file from the branch github.com/HenningTimm/tufte-latex/tree/fullwidth_caption in order to get full width captions to work with refs. – candor Aug 20 '20 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.