# Tag Info

20

The tcolorbox package can nicely display literal LaTeX code and its output when being called in a very configurable manner, depending on the argument of the tcblisting environment. This environment displays by default LaTeX code literally but the coding/scripting etc. language can be changed to anything known to the underlying listings package too. (or ...

6

biblatex has the aptly named field type verbatim that might fit the bill here. The documentation states (p. 14) Verbatim fields are processed in verbatim mode and may contain special characters. Typical examples of verbatim fields are file and doi. So all we need to do is make title a verbatim field via ...

0

I copied the start of the texbook.tex file, where a couple of ^L are used. Then this code will break pages at those tokens: \documentclass{article} \usepackage{fancyvrb} \def^^L{\par} % not outer \def\aftereject{\aftergroup\afterejectI} \def\afterejectI{\aftergroup\pagebreak} \begin{document} This will have page breaks ...

0

I suppose that there is no typewriterfont for thai. You can try the Code2000 font, which is, of course, not a typewritzer font, but has all characters: \documentclass[12pt,a4paper,oneside]{book} \usepackage{fontspec} \setmainfont[Scale=1.4]{TH SarabunPSK} % Thai Font \setmonofont[Scale=MatchLowercase]{Code2000} \XeTeXlinebreaklocale "th_TH" ...

1

\end{frame} must start at the beginning of the line. You have \begin{document} \begin{frame}[fragile] Hello World \end{frame} \end{document} use \begin{document} \begin{frame}[fragile] Hello World \end{frame} \end{document}

3

I'd recommend using the listings package for this; it's considerably more flexible. For example, you can specify \lstset{breaklines=true} in the preamble to prevent lines from overrunning the margins. Here's a basic way to do it. \documentclass{article} \usepackage{listings} \lstset{ basicstyle=\footnotesize\ttfamily, % specifies that lines ...

7

If it is Document type definitions that you want, Pygments has support for it and produces a very neat output imo. For LaTeX documents you can harness it easily with the minted-package, e.g.: \documentclass{article} \usepackage{minted} \usemintedstyle{autumn} \begin{document} \begin{minted}{dtd} <!-- TEI P4 DTD. Generated 2004-07-15T16:23:29-04:00 ...

3

Here is an alternative approach to answer the question. The tcolorbox package supports the saving of lower box parts into files. So, here the answers are written after \tcblower. For this, an environment should be used. The saving is done by savelowerto=answer_document_\thetcbcounter.tex, To hide the lower part use lowerbox=ignored, As a further ...

5

Here is a version with tcbverbatimwrite from tcolorbox -- there's no need to load another verbatim package, since tcolorbox is already active. Inside of \AD the \end{tcbverbatimwrite} should be a string rather than the token \end{tcbverbatimwrite}, so \scantokens{...} is necessary. This code does not work however for the VerbatimOut approach. ...

2

The syntax colorizing instructions are at fault here; the syntax of \verb allows any character to be used as delimiter, even a, but of course \verba{@- \zz}a would be illegal, because TeX would parse \verba as a single control sequence, so one of the two following calls would be correct \verb a{@- \zz}a \verb*a{@- \zz}a (with different results, because ...

Top 50 recent answers are included