Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [verbatim]

{verbatim} is about macros and environments like “\verb” and “verbatim” which implement some form of verbatim mode, i.e. change the {catcodes}. A popular package is {fancyvrb}. For questions about the {listings} or the {minted} package, use the respective tag instead.

0
votes
1answer
28 views

pagenote converts spaces to newlines and breaks verbatim typesetting

I want to typeset verbatim end notes (using minted). Unfortunately pagenote converts all spaces in my page notes into newlines, as the following minimal example shows: \documentclass{memoir} \...
1
vote
2answers
68 views

verbatim listing with trailing spaces

I'm trying to redefine \verb just for fun. It should act like the LaTeX starred version: \verb<some-char><arbitrary chain of chars not containing it><same char again> should yield ...
1
vote
0answers
30 views

Is there some new conflict between newtxtext and \verb? [closed]

I have LaTeX file that ran a couple of months ago but now generates a fatal error. Here is an MWE getting the same error \documentclass{article} \usepackage{newtxtext} \begin{document} \verb"a" ...
3
votes
1answer
43 views

\verb not working in beamer even though I use [fragile]

Just trying to display a command like \section{} in the presentation, but \verb doesn't work. It works without the \uncover{}, but is there anyway to get around that? \documentclass[t,xcolor=...
1
vote
1answer
17 views

Cannot overline a word inside a verbatim block

I am trying to a overline a word inside a verbatim block but it does not work, for example: \begin{verbatim} Hwy3 =1 Hwy3 Hooterville = 0 \overline{Hooterville} \end{verbatim} I have also tried ...
2
votes
1answer
42 views

Footnotes in a verbatim environment that also appear in (or just below) that environment

I require a verbatim like environment that allows footnotes and, in addition, displays the footnote text in that environment (as opposed to the page) or just below the environment floating with it. I ...
2
votes
1answer
27 views

verbatim-environment inside group implies unwanted paragraph-break. Why? How to avoid?

When I wrap a verbatim-environment into an additional group, a new paragraph will be started after that group. (In the example below, \parindent-glue is inserted before the YYY when \begingroup and \...
2
votes
2answers
41 views

LaTeX 2e's verbatim-environment and different input-encodings

The inputenc-package provides means for selecting an input-encoding for subsequent tex-input. If I understand correctly, the verbatim-environment as of the LaTeX 2ε-kernel does change ...
3
votes
2answers
89 views

Add ASCII image

I want to add many ASCIIs Art images on my document. But If I use verbatim environment, the output is ugly ! How to solve? (I lovely a solution with the possibility to import only my txt file with ...
1
vote
0answers
25 views

savetrees and \verbatim interact badly

My MWE $ cat test1.tex \documentclass{article} %usepackage{savetrees} \begin{document} \begin{verbatim} for i in range(3): for j in range(3): for k in range (3): plot(i,j,k) # ...
2
votes
1answer
42 views

use \path instead of \verb in biblatex [duplicate]

Noting that \path can be made to wrap arbitrary text as per Forcing linebreaks in \url, I would like to use \path instead of \verb inside of biblatex for the "verbatim" fields. This would mean ...
0
votes
0answers
10 views

How to get line number within minted using Verbatim figure environment? [duplicate]

I noticed that using Verbatim to use minted within a figure environment removes the line number, compare the following: 1) the figure environment: \begin{figure}[htp] \centering \...
1
vote
0answers
35 views

How can I hide (or blur) some code in a pythontex environment?

My question is directly related to this one. Does there exists a solution for pythontex ? At least for the verbatim environment. More precisely, let us consider the following MWE : \documentclass[...
0
votes
0answers
28 views

Including empty lines in verbatim text in command environment

I am trying to typeset some text on an included pdf page with the pdfpage package. This can be easily done with the pagecommand={} option. But it seems we cannot insert an empty line inside the ...
3
votes
1answer
44 views

beamer, verbatim, and `\end{frame}`

as of current TL2018 a minimal beamer/verbatim file containing a line \end{frame} in the verbatim code fails to compile: \documentclass{beamer} \usepackage{fancyvrb} \begin{document} \begin{frame}[...
1
vote
2answers
106 views

Verbatim inside \block

I already searched for a solution but found none which works for me. My aim is to write some command inside a block environment. Even though I used \cprotect or \protect it still won't work. Normally ...
2
votes
2answers
44 views

overline command in math mode with verbatim

Does anyone know how to get something like \overline{\verb!signal!} to work? I cannot seem to figure out how to get \overline to understand a verbatim command.
0
votes
1answer
58 views

What is the advantage of using a pseudocode package instead of simply putting code inside of a verbatim block? [closed]

What are the advantages of using a pseudocode package (like algorithm2e) above simply putting code inside of a verbatim block? Edit: In order to make the question less vague, I will say this: ...
2
votes
1answer
103 views

Why enclose a \verb block with curly braces?

Why would you enclose a \verb block with curly braces? Does it change anything? Consider the following examples: The \verb|acmart| document is \verb|orange| and \verb|blue|. Use the {\verb|verb|} ...
3
votes
3answers
81 views

How can I put every `verbatim` environment inside a `Shaded` environment by changing the preamble only?

Unfortunately, I have a lot of TeX code which should look different that it does not, but I cannot modify its code body. However, I can modify the preamble and for example, I have learned that I can ...
0
votes
0answers
47 views

Change language inside verbatim environment

I have the following: \documentclass[a4paper]{article} %% Language and font encodings \usepackage[greek, english]{babel} \usepackage[iso-8859-7]{inputenc} \usepackage{amsfonts} \usepackage{amsmath} ...
4
votes
2answers
74 views

How to renew verbatim to Verbatim from fancyvrb?

I am using pandoc to convert Markdown to Tex, pandoc will render code blocks to \begin{verbatim}CODE\end{verbatim}, and fvextra only works with \begin{Verbatim}[breaklines]. How can I make {verbatim} ...
2
votes
3answers
65 views

\verb and align

I am getting an error when I am using the verb command in align. I prefer not to use \texttt because the underscore isn't the right length for a single underscore or a double underscore - the right ...
0
votes
0answers
38 views

Listings not breaking long lines with breaklines=true and breakatwhitespace=false

I have the following code in my Markdown: ```{latex-fontsize=scriptsize} $ ./my-new-application create app_example creating app_example Generating <path-to-app-src>/new-application/...
3
votes
0answers
75 views

Suppress Fira Code ligatures involving “{” and “}” in verbatim

I am trying to improve the current implementation (v0.1b) of the lstfiracode package. In particular, I wish to achieve the opposite of Use Fira Code font with ligatures in code listings. ...
3
votes
1answer
53 views

How can I wrap `\colorbox` around `\Verb[commandchars=\\\{\}]` by only changing the preamble?

This is a follow-up question to How can I use `\renewcommand` to wrap `\colorbox` around `\Verb`? I have TeX files which contain code like: \Verb|print("Hello World", end="")| The \Verb content ...
2
votes
1answer
54 views

How can I use `\renewcommand` to wrap `\colorbox` around `\Verb` by only changing the preamble?

What works: I have TeX files which contain code like: I want \texttt{this text} to have a background color. I want the \texttt to have a background color: I want \colorbox{lightgray}{\texttt{this ...
2
votes
1answer
55 views

Escape lots of backslashes and other special characters

I'm trying to write a Unix command in LaTeX, but it seems to be stuck on special characters. Is there a way to escape backslashes, accolades, dollar signs etc.? The command is the following $(python -...
2
votes
1answer
55 views

Minted Linenos not working after using RecustomVerbatimEnvironment

Currently I am trying to work with the minted package. My aim is to have a code snippet with the numbering for each line, which is centered in a figure. My top level configuration looks like ...
2
votes
1answer
46 views

Hebrew within sourcecode

I need to include LaTeX source code, which contains Hebrew text, within an Hebrew document. I tried doing so within a verbatim environment, but Hebrew words appear in opposite order. Any solution ...
1
vote
1answer
31 views

lualatex using vebatim package

This was working and I don't see what has changed, but the code below is now throwing a "Missing \endcsname inserted" error. If I just press Return, lualatex continues, reads the text file myfile.lua,...
2
votes
1answer
297 views

How to write č,ć,ž,š,đ in verbatim?

I have a problem with verbatim, it can't read my Serbian language symbols like č, ć, ž, š, đ. If I try \begin{verbatim} č,ć,ž,š,đ \end{verbatim} I get blank space, also if I try with \v{c},\'{c},\...
2
votes
2answers
78 views

Getting fancyvrb and mdframed to work togegher

I would like to format terminal output as follows: white text on black background commands written by the user are emphasized (slanted typewriter) Using a combination of mdframed and fancyvrb I got ...
0
votes
1answer
40 views

nomenclature and \verb|text|

I tried different solutions but without result I have configured arara on texstudio to be able to use the nomenclature package. \usepackage[refpage,intoc,italian]{nomencl} \makenomenclature \...
0
votes
1answer
39 views

Command verbatiminput error with Keyboard character used is undefined

This is the probit.txt file I use the verbatim package to insert some text file. In particular using the command, \verbatiminput{probit.txt}. But there are some characters in the text file that cause ...
2
votes
1answer
69 views

How to keep the correct line numbering when using ConTeXt vim module?

Consider the following code: \usemodule[vim] \definevimtyping [somecode] [numbering=yes,lines=split] \starttext \startsomecode Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam ...
4
votes
3answers
68 views

\verb in label or pin of a tikz node

The documentation of tikz gives following example containing the \verb command in the node text (Section 2.21 Adding Text, v3): \begin{tikzpicture} \draw (0,0) rectangle (2,2); \draw (0.5,0.5) node [...
0
votes
1answer
22 views

executable code containing symbol `'` inserted with verbatim on pdf. Error while copying back into a text editor

I'm trying to insert Octave code in a pdf. However, there is a problem with the sign ' (which means transposition in Octave code). However when I copy the code from the generated pdf, the code doesn't ...
1
vote
1answer
35 views

Some very odd behaviour of \verb and \verbatim in connection with TeXMaker

I cannot but assume that whatever <text> is placed between the delimiters (in this case +) in \verb+<text>+ and \verbatim+<text>+ has no effect whatsoever on the world outside the ...
1
vote
1answer
72 views

How to include a file with the verbatim environment

I would like to include a file within the verbatim environment but this of course doesn't work: \begin{verbatim} \input{file.tex} \end{verbatim} Is there way of getting LaTeX to execute \input ...
1
vote
2answers
130 views

AucTeX issue with BVerbatim in newenvironment

I have the following newenvironment command: \newenvironment{code} { \VerbatimEnvironment \begin{mdframed}[ backgroundcolor=black!70, leftmargin=1, rightmargin=1, innerleftmargin=4, ...
1
vote
1answer
34 views

Code using verbatim doesn't work when copied back in a text editor

I'm trying to use verbatim to copy the implementation of an algorithm written in octave. For this I introduced the following lines in latex \begin{verbatim} F = @(z) [z(1) + 2*z(2) - 2; 2*z(2)*z(3)^2 ...
1
vote
1answer
63 views

How can I create a callout box that does not conflict with verbatim?

My goal is to make a small box in the top-right of the page that holds a small table. This serves as an "infobox" much like the ones seen on wikipedia pages. I've implemented this using wrapfigure ...
1
vote
1answer
41 views

How to use boolean to toggle display of environment that may contain verbatim?

I'd like to create an environment solution that either displays its contents or nothing depending on whether the boolean solutions is set. Currently I'm trying: \documentclass{article} \usepackage{...
1
vote
1answer
37 views

tcblisting apparently not a verbatim environment

MWE % arara: pdflatex \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{listings} \begin{document} \begin{tcblisting}{listing options={language=ruby}} "hello #{world}" \end{tcblisting} \...
3
votes
1answer
225 views

How do I set a background color and font for inline verb text?

I wish to customize the verb command such that I can customize the font and color, as well as set a rounded colored rectangle as background. I found this in the Tcolorbox manual: \DeclareTotalTCBox{\...
1
vote
1answer
100 views

\verb illegal in command argument in \begin{align*}

I am trying to generate a set of aligned equations that looks like, (note: random and variable are supposed to be pseudo-code) However, instead I got this along with an error, that says, \verb ...
0
votes
1answer
49 views

Fixed position for my Verbatim [closed]

I use the fancyvrb package and I'd like that my Verbatim code is always written with 2pt indention. How can I do that?
3
votes
2answers
104 views

Without loading fontspec, \verb* cannot produce visible space under XeLaTeX

\verb* fails to produce visible space, under XeLaTeX. The problem repairs if package fontspec is loaded. By the way, \textvisiblespace produces visible space under both occasions. Moreover, \verb* ...
6
votes
1answer
162 views

How does \verb* set the visible space?

I'm trying to understand how \verb* works under the hood, especially where the mapping for the visible space character comes into play. Let's have a look at the definitions first: \verb: macro:->\...