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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

Replace syntax brackets by visible brackets

General overview I have a BibTeX entry of the document I am working on itself, and I put this deffinition in a variable to be able to use it everywhere I whant. The goal is to print on the document ...
fauve's user avatar
  • 2,437
1 vote
1 answer
39 views

\Verbatim inside tabular produces double hashtags

I have a long table which should have a verbatim enviroment on the left side. MWE: \documentclass{article} \usepackage{float} \usepackage{tabularx} \usepackage{array} \usepackage{graphicx} \...
Ceriana's user avatar
  • 75
0 votes
0 answers
7 views

Custom lstlisting command changed verbatim font size

I've copied a custom lstlisting command that makes it look like Mathematica code. This is that code below: \usepackage{babel} \usepackage{beramono} \usepackage[T1]{fontenc} \usepackage{color} \...
Michael Adrian Javier's user avatar
1 vote
1 answer
57 views

pgf: codeexample with verbatim code

I'm using pgfmanual to document a library and the nice looking codeexample environment to typeset a code block + the result. However, I'd like to use it when the code contains verbatim code. Is it ...
tobiasBora's user avatar
  • 7,407
1 vote
1 answer
33 views

How to make new environment using an existing environment? File ended while scanning use of \FancyVerbGetLine

I have a setup that works OK as is. I needed to make this code as an environment so less typing. When I do that I get an error. Here is the original setup \documentclass[12pt,titlepage]{article} \...
Nasser's user avatar
  • 20.1k
3 votes
3 answers
444 views

Why are my newlines turned into \Omega?

If I use ^^J or \iow_newline:, it prints a \Omega instead of a newline. Any idea what I got wrong? \documentclass{article} \ExplSyntaxOn \NewDocumentCommand{\printTwiceWithNewline}{v}{ \...
tobiasBora's user avatar
  • 7,407
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,407
1 vote
0 answers
18 views

Redirecting \write to and \input from lua variable

Beamer manages frames with catcode-changing content by first writing the content of the frame to a .vrb file, then reading it again (several times, as needed, if I understand correctly). In LuaLaTeX, ...
ysalmon's user avatar
  • 1,126
1 vote
1 answer
36 views

How to Set Background Color for verbatim Formatted Content Longer Than a Single Page?

My goal is to include lengthy example code that exceeds a single page, and I would like to set a background color for this code. The native verbatim environment allows content to span multiple pages, ...
Xavier Z.'s user avatar
2 votes
3 answers
128 views

TikZ messes up spacing of fancyvrb environments

I'm trying to use environments saved with SaveVerbatim of fancyvrb in TikZ nodes. But TikZ seems to mess up the spacing in a way that I can't use this for code snippets. The following MWE shows how ...
Frunobulax's user avatar
  • 2,116
1 vote
1 answer
63 views

Verbatim inside tabular, inside a macro

I would like to achieve a macro which makes a 2x2 table to show example inputs and outputs of a program (test cases). Something like this: --------------------------- |input | example input | |-----...
broland's user avatar
  • 11
0 votes
0 answers
20 views

How to print quotation mark glyphs inside the verbatim, minted, listings & texttt?

Assuming the desired quotation marks in the code are called glyphs, how to print the left & the right quotes as desired, as it's printed in `monster' inside the verbatim, minted, listings ...
Lars Malmsteen's user avatar
4 votes
3 answers
527 views

How to render unicode symbols?

I have the following latex code. \documentclass{article} \usepackage[utf8]{inputenc} \begin{document} \begin{verbatim} █ [1:0x561b3f574358] <list> ├─[2:0x561b3e9cd938] <dbl> ├─[3:...
Fangquan Shi's user avatar
0 votes
1 answer
48 views

How to display code in a frame with ASCII ' and ` and interpolation of macros

I want to display a block of code with ' and ` displaying as themselves and with evaluation of macros.The closest that I've been able to come was \documentclass[b4paper]{article} \usepackage{alltt} \...
shmuel's user avatar
  • 1,367
1 vote
1 answer
39 views

Wrapping verbatim environment (xsimverb)

I am designing a library that needs to deal with some verbatim code. For now, I use the great xsimverb package that provides nice things, like gobble, deal with basically all kinds of characters… I ...
tobiasBora's user avatar
  • 7,407
0 votes
0 answers
23 views

Get verbatim file content into exif data trought hyperref

The goal I have the following external main.bib file containing: @book{fauve2023TheSuperBook, title = {The Super Book}, author = {Fauve}, publisher = {MadPublisher}, year = {3 June 2023} } I ...
fauve's user avatar
  • 2,437
1 vote
1 answer
73 views

Control vertical space after Verbatim environment

I want to control the vertical space after a Verbatim environment from fancyvrb. Even setting \topsep and \partopsep to 0pt, as suggested in muzimuzhi's answer, gives me some extra spacing after the ...
Atcold's user avatar
  • 1,675
0 votes
1 answer
33 views

Bolding text containig parentheses and underscores

I want to bold, e.g., Config_C2B(). I get error messages using \textbf, so I tried wrapping the text in \verb, but that still fails. \documentclass[draft]{article} \usepackage{fontspec} \usepackage{...
shmuel's user avatar
  • 1,367
0 votes
0 answers
27 views

Can I show the raw generated text from a command in my document?

I am trying to debug my code and I keep running into the same problem so I would like to see what the command that causes the problem is giving to the compiler. I have looked for this and I can't seem ...
Balansoire'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
2 votes
1 answer
84 views

Some code ligatures work in xelatex but not lualatex

While looking at this question I noticed that some of the code ligatures from the JetBrains Mono font (freely available from their website) worked in xelatex, but not in lualatex. Compare: Xelatex ...
mbert's user avatar
  • 2,521
0 votes
0 answers
48 views

Minted copyable spaces

I looked at a lot of answers regarding this topic, but they all seemed to be pretty old. I also looked into the documentation of the minted package, which did not give me a solution either. I want a ...
Titanlord's user avatar
  • 521
0 votes
0 answers
20 views

Unwanted Extra Spaces in \newcommand and \detokenize for Verbatim Text [duplicate]

I'm trying to make a newcommand to print verbatim text using the \detokenize as follows: \newcommand{\texcmd}[1]{% {\color{red!70}{\texttt{\detokenize{#1}}}} } When I use it to typeset a long ...
Ammar Taha's user avatar
2 votes
2 answers
38 views

Remove trailing white space between verbatim and caption in a figure

How can I remove or control the vertical whitespace between the verbatim figure and the caption attached to it. Here is my code right now: \documentclass{article} \begin{document} \begin{figure}[ht]...
Omar Badawi's user avatar
0 votes
1 answer
93 views

The current roman font does not contain the Arabic (polyglossia)

\documentclass[12pt]{report} \usepackage{polyglossia} \setdefaultlanguage{arabic} \newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{Traditional Arabic} \setotherlanguage{english} \begin{document} ...
Ilyes Boudas's user avatar
1 vote
1 answer
71 views

How to put a verbatim section in place of teaser figure in acmart document?

I would like to use a graphic built from monospaced characters as a teaser figure in an acmart document. Elsewhere in the document I've used verbatim sections inside of table*s to do this, creating ...
phantomics's user avatar
0 votes
1 answer
39 views

How can I modify my tcblisting to show input code and the expected output side-by-side?

I have a code listing and tcblisting defined as follows. \lstdefinelanguage{MyScheme}{ basewidth=0.5em, morekeywords=[1]{define, cond, lambda, else}, alsodigit=!\$\%&*+-./:<=>?@^_~, ...
TheProgrammer's user avatar
0 votes
0 answers
50 views

How to break a content in verbatim to make it appear in a justified manner?

Unable to get a nice appearing justified output using verbatim. The long lines are not getting broken. \documentclass{article} \begin{document} \begin{verbatim} The following is ...
mathslove's user avatar
  • 127
1 vote
1 answer
57 views

Runaway argument in beamer document with verbatim overlay

When trying to use overlays with code/verbatim commands, I keep running into unexpected runaway argument errors. I've tried various combinations. The following minimal example: \documentclass[t]{...
glyn's user avatar
  • 111
1 vote
1 answer
52 views

How to apply new foreground and background colors to verb?

I want to change style of verb environment of my latex. Want a light gray background with red text. I tried using newverbs package I'm able to change textcolor or backgroundcolor but it's failing to ...
d4rkshad0w's user avatar
4 votes
2 answers
218 views

How to fix this simple verbatim macro (plain TeX)?

I have written a simple macro to typeset everything enclosed in angle brackets with a special font and to ignore the backslash character. \catcode`\>=\active \def>{\endgroup} \catcode`\<=\...
user avatar
0 votes
1 answer
67 views

Managing two versions in the same document using conditionals and/or comments

I have a document that I need to manage multiple versions of, for multiple languages. So far I've kept a different LaTeX project for each, but it's a bit annoying to have to open, edit and save ...
Sagefire's user avatar
0 votes
0 answers
28 views

Print TeX from argument as a simple string [duplicate]

I have a macro that is like this: \newcommand{\note}[1]{ \thenoteid \dosomething{#1} } That macro is being used in scenarios like this: Aenean eu leo quam. \note{Pellue ornare \somelatex ...
Circle B's user avatar
  • 123
1 vote
2 answers
57 views

How do I show dollar sign in a monospace font?

How do I show a dollar sign in monospace -- like $124.12? I tried the below method with no luck. \verb$\$124.12$ \texttt{$124.12} Thanks
cmutex's user avatar
  • 195
0 votes
1 answer
31 views

style of self-defined verbatim environement changed after using xeCJK

So, in a previous question I asked how to create a verbatim environment with specified font, height and width, to typeset Japanese ASCII art. And they helped me out with that, now I have a proper ...
LNseyJt2X-24UJ4r7KTL's user avatar
6 votes
1 answer
325 views

How to typeset Japanese ascii art in latex?

I am thinking about creating a package, which provides an environment that uses MS PGothic to typeset some fancy Japanese ASCII art. MS PGothic is the default font for Japanese ASCII art. My thinking ...
LNseyJt2X-24UJ4r7KTL's user avatar
1 vote
1 answer
47 views

How to embed English verbatim text inside a Hebrew paragraph?

A brief description of the problem How can I embed verbatim English text in a Hebrew paragraph? A demonstration of the problem by way of a minimal working example Consider the following LaTeX code, ...
Evan Aad's user avatar
  • 10.8k
0 votes
0 answers
32 views

beamer and verbatimbox in multi language document

I need to place some text, as it is, with highlighting the first line, and other random such features. verbatimbox seems the right candidate. The document is a multilanguage one, using polyglossia. ...
user1850133's user avatar
4 votes
1 answer
127 views

Sankey Diagram Tikz Colors are wrong

I just created a Sankey-Diagram with Tikz, and I do not know why the colors in most connections are right but some are wrong \documentclass{standalone} \usepackage{tikz} \usepackage{verbatim} \...
martijn van Hooff's user avatar
0 votes
1 answer
69 views

How to set textwidth to spverb globally

I'm using \spverb to show inline code but if there is a long code it doesn't wraping up properly since it only breaks at spaces. But if I use \parabox with \textlength it works just fine. Is there a ...
d4rkshad0w's user avatar
0 votes
0 answers
319 views

\begin{verbatim), \end{verbatim} are not working in Miktex

! LaTeX Error: Missing \begin{document}. But it is not missing! Below is the not working Latex text: \documentclass[a4paper,UKenglish,cleveref, autoref, thm-restate]{lipics-v2021} %\usepackage{...
Ivan Ivanov's user avatar
0 votes
0 answers
47 views

Spacing for typewriter font looks off without fulflexing option in lstlisting [duplicate]

I'm trying to get the spacing and font to look clean in my lstlisting output window. Right now, if I enable the columns=fullflexible option, it makes the font truly monospaced and it perfectly aligns ...
TheProgrammer's user avatar
0 votes
3 answers
118 views

How to use the default typewriter font with Times New Roman?

I'm trying to use the default typewriter font (that comes with LaTeX & CMU) with Times New Roman. If I disable the newtxtext package, I can use the nice typewriter font, but it disables Times New ...
TheProgrammer's user avatar
0 votes
0 answers
67 views

How to configure cwl to provide verbatim highlighting for custom code?

I am trying to customize cwl file to provide verbatim highlighting. I am trying to get assistance from TeXstudio : User manual, and my cwl file contains the following \basoom{verbatimSymbol} This is ...
Al-Motasem Aldaoudeyeh's user avatar
4 votes
2 answers
116 views

Error with % and & despite using verb option

I am new to tabularray and I have a problem typesetting tables with code in it. I see the option verb must be given to environment tblr to allow verbatim text, but even then, characters % and & ...
ysalmon's user avatar
  • 1,126
0 votes
1 answer
36 views

How to get lstdefinestyle to accept a custom command with an argument?

I want to customize the style of Matlab-editor in matlab-prettifier package. What I want is to produce background for MATLAB styled commands, but it does not seem that basicstyle key accepts commands ...
Al-Motasem Aldaoudeyeh's user avatar
0 votes
0 answers
110 views

How to bold or highlight specifc text in Verbatim, Is there any other method?

I am trying add some code in my article, And I need to bold and highlight some code words in Verbatim section (in Code). Or atleast highlight words. I couldnt find any method in verbatim to highlight ...
ya xi er's user avatar
3 votes
1 answer
104 views

Verbatim text in forest nodes

In the MWE \documentclass{scrartcl} \usepackage{forest} \forestset{termtree/.style = {align = center, l sep = 18pt, s sep = 15pt, where n children = 0 {tier = leaves}{}}} \begin{document} \begin{...
Matthias's user avatar
  • 1,966
0 votes
0 answers
34 views

newenvironment with enviromentS (plural) inside

I'm trying to create an environment for a particular class (based on memoir) I'm doing. I followed this video (https://www.youtube.com/watch?v=r_DQnSXLHBc) besides Overleaf basic tutorials on creating ...
D.ClassMemoir's user avatar
0 votes
2 answers
64 views

1) How to produce '\', and 2) using \verb in \newcommand—possible?

I'm writing documentation that makes frequent reference to Windows-style paths, eg "K:\Folder1\folder2\filename". I see in a badly organized LaTeX user's guide that some special characters ...
Bob Bridges's user avatar

1
2 3 4 5
22