# Tag Info

2

There is no \@alltt but like verbatim (and most latex display constructs) alltt is a trivlist so the same settings apply, you just need \preto{\alltt}{\topsep=0pt \partopsep=0pt}

0

I ran into this same problem with a custom verbatim environment. However, I'm not that savvy with the TeX internals, so I didn't want to mess with the ^^M stuff described here. (I wouldn't know how to explain it to my coauthors, so I don't want to use it in our paper.) Instead, I added one required (but unused) argument after the optional argument, and that ...

15

The error is due to breqn, of course. Only one definition for an active character can be valid at a given time. Since you have a math comma in the section title, this goes in the header and, with that long verbatim, it gets typeset when verbatim is active, which gives a different meaning to the active comma. Here's a minimal example showing the issue. ...

12

The main problem is the breqn math comma being written to the mark used in headings while verbatim is active. which gives a classic fragile command in moving argument cryptic error. \hbox hides this (a better fix allowing the comma to be used normally may be posted later) The fact that luatex segfaults after the runaway argument is a separate lower level ...

2

Here's the listings way, without no further configuration, and a tcolorbox listings box, which is configurable for the listing options and other other options for the pure display \documentclass{article} \usepackage{listings} \usepackage[most]{tcolorbox} \begin{document} \begin{lstlisting}[language=C] #include<stdio.h> int main(int argc,char ...

2

I'm not sure this is what you're looking for, but here it is. \documentclass{article} \usepackage{verbatim} \makeatletter \newenvironment{mycode} {\def\@xobeysp{\ }\verbatim\rightskip=0pt plus 6em\relax} {\endverbatim} \makeatother \begin{document} \begin{mycode} aaa { \ } aaa { \ } aaa { \ } aaa { \ } aaa { \ } aaa { \ } aaa { \ } aaa { \ } aaa { \ } ...

1

The verbatimbox package allows inline verbatim environments that work directly with the standalone class. Once the box is created with the verbbox environment, it is displayed with \theverbbox. \documentclass{standalone} \usepackage{verbatimbox} \begin{document} \begin{verbbox} Ciao \end{verbbox} \theverbbox \end{document} Example 2 (longer code and ...

0

The todonotes manual (Page 15) suggests creating a macro using a minipage like this: \newcommand\todoin[2][]{\todo[inline, caption={2do}, #1]{ \begin{minipage}{\textwidth-4pt}#2\end{minipage}}} \todoin{ Some text. \begin{align} \sin(\theta)^2 + \cos(\theta)^2 = 1 \end{align} A formula and a list \begin{itemize} \item An item \end{itemize} } ...

2

You can't use ¬ and ¦ as “command chars” if you have \usepackage[utf8]{inputenc}. Only one byte characters can be used for the purpose (and not all of them, actually). If you are willing to switch to XeLaTeX or LuaLaTeX, then it's possible.

7

Try \documentclass[preview]{standalone}% <-- added option "preview" \begin{document} \begin{verbatim} Ciao \end{verbatim} \end{document} This should work ... Edit: Also work with option varwidth. Both options enable to show verbatim environments and as well as displayed math. This is not special described in standalone manual, but seems that for ...

Top 50 recent answers are included