Linked Questions

3 votes
1 answer
134 views

Print LaTeX3 string verbatim

I can’t find a way to print the content of a LaTeX3 string and/or a text verbatim (or to be more precise, I found a solution by writing the content to a file and then displaying the verbatim content ...
tobiasBora's user avatar
  • 7,377
0 votes
1 answer
51 views

How to display variable content as verbatim? [duplicate]

I want to create a documentation .pdf that shows examples of code for my commands and also what the result is. To prevent differences between the description and the result I thought about creating a ...
mrCarnivore's user avatar
  • 1,367
1 vote
2 answers
118 views

lstinline in mathmode with correct font size

I often typeset mathematical formulas about computer programs (loop invariants, etc.). I typeset them in typewriter font, saying in my preamble \lstset{basicstyle=\ttfamily}. I could say $\frac{\text{\...
ysalmon's user avatar
  • 1,126
0 votes
1 answer
41 views

macros avoid linebreak if macro expands to nothing

I know this one is quite similar to this post (from me). But even with using % all over the place and \ignorespaces there is still a linebreak. See my mwe: (main2.tex) \documentclass{article} \...
atticus's user avatar
  • 525
3 votes
3 answers
1k views

What's the alternative for the standard verbatim environment that can be used inside argument/does not change catcode?

How can I get something to typeset the output identical to that of a verbatim environment, e.g. of this code \documentclass[12pt]{article} \begin{document} before \begin{verbatim} 123456_789$^% \end{...
user202729's user avatar
  • 6,019
0 votes
0 answers
38 views

TikZ externalize if tikzpictures is wrapped [duplicate]

for simple use I've written an environment wrapping the tikzpicture environment. So far no trouble. Now I realized I've got a huge amount of tikzpictures in my document and I've read once about tikz ...
atticus's user avatar
  • 525
0 votes
2 answers
58 views

Save the content of an environment containing \verb or \lstinline

I wish to copy the content of an environment into a macro (or into a temp file). Previously I use the following code: \usepackage{environ} \def\SavedContent{} \NewEnviron{savecontent}{% \BODY% ...
Jinwen's user avatar
  • 7,808
1 vote
1 answer
91 views

Typesetting Preparsed Verbatim Text/Code

Assuming that I have already parsed some text verbatim, using an xparse +v argument, what is the best way to typeset the text in a way that respects the original formatting? Note that I cannot ...
Kelly Smith's user avatar
1 vote
1 answer
239 views

About verbatim in LaTeX (and LuaTeX)

What I intend to do... Initially, I wanted to write a series of environments that help me typeset verbatim environments. For example, I would like \begin{myverb}{stylea} \end{myverb} to be equivalent ...
Alan Xiang's user avatar
  • 4,892
3 votes
2 answers
247 views

How can I print "$ formulae $" as itself?

If I type $ formulae $, then the result will be formulae But I want to type "$ formulae $" expression itself, so the result will be $ formulae $ (I mean the result include $ expressions!) Thanks ...
walkingandwalking's user avatar
0 votes
0 answers
39 views

\newcommand not working ("verbatim" use case) [duplicate]

I'm lazy and I want to save on typing. So I have \newcommand{\bv}{\begin{verbatim}} \newcommand{\ev}{\end{verbatim}} \bv Hi, this should be verbatim \ev in my document, but this produces an error: ...
user258532's user avatar
2 votes
1 answer
563 views

verbatim code inside \newcommand definition

All the questions I could find on this subject are about people who want to use \verb in the argument passed to a command, or about people who want within a \newcommand to wrap one of the arguments ...
Stefan's user avatar
  • 123
1 vote
1 answer
222 views

VerbatimInput gives error when file is too large [closed]

I use \VerbatimInput in package fancyvrb to wrap my text, which is loaded from external file. But when the external file is too large, it gives the following error: TeX capacity exceeded, sorry [...
firefighter's user avatar
0 votes
2 answers
229 views

How to align multiple aligned env. containing \verb?

I need to align several R-syntax formulas as equations. I have a following code: \begin{align} &\begin{aligned} &\verb!tActKT ~ poly(I(1/nprocs), 3, raw=T) + poly(ndoms, 3, raw=T)!\\ &\...
Eenoku's user avatar
  • 523
5 votes
1 answer
275 views

How to print a verbatim block at its end automatically in LuaLaTeX?

This is a follow-up question to this answer by Mico. I try to adjust his Lua code to my needs and line numbering already works. Actually there is one real usability issue and that's my question: How ...
TeXnician's user avatar
  • 33.2k

15 30 50 per page