Linked Questions

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
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,818
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
12 votes
1 answer
1k views

How to pass a LaTeX argument verbatim to lua?

I would like to pass an argument verbatim from LaTeX to lua including LaTeX commands and end of line characters. The example below takes care of the former issue, but not of the latter. Is there a ...
JPi's user avatar
  • 13.5k
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.3k
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,417
3 votes
1 answer
149 views

shdoc and KOMA-Script

Why does the following example work with report, but not with scrreprt: \documentclass{scrreprt} \usepackage{shdoc} \begin{document} \begin{sh} \begin{shbox} \shline{}{Test} ...
TeXnician's user avatar
  • 33.3k
2 votes
1 answer
564 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
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
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
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
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
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
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

15 30 50 per page