Skip to main content

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.

80 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
2 answers
535 views

\VerbatimInput : adjust a long line of a .dat file

In this document, \VerbatimInput is calling test_2.dat. test_2.dat contains a line too long, so that the compilation produces a pdf where that line is not entirely seen: By using adjustbox, one can ...
DavidC.'s user avatar
  • 859
5 votes
0 answers
221 views

How can I use scintillua lexers to replace minted or listings with luatex?

Scintilla is a text editor. Scintillua adds dynamic Lua LPeg lexers to Scintilla for multiple languages. According to the documentation, Scintillua can be used as a library: Using Scintillua as a ...
cjorssen's user avatar
  • 10k
5 votes
0 answers
553 views

Using cprotect and environments with multiple arguments

Is there a way to use the cprotect package's \cprotEnv command to use verbatim inside environments that have optional or multiple arguments? My motivation for this question: I am working with ...
Chris Chudzicki's user avatar
4 votes
0 answers
38 views

When verbatim is loaded, \verb behaves as \verb*

With recent versions of LaTeX, when the package verbatim is loaded, the standard command \verb always behaves as \verb*. Is it a feature or a bug? \documentclass{article} \usepackage{verbatim} \begin{...
F. Pantigny's user avatar
  • 42.4k
3 votes
0 answers
2k views

Produce copy-paste friendly code blocks in PDFs

I have used lslisting for inserting the code blocks. Requirement is to make the code blocks displayed correctly in the compiled PDF and make them as easy as possible to copy as plain text. Please take ...
Iresh Dissanayaka's user avatar
2 votes
0 answers
55 views

Frankenstein’s Conscience conflicting with tabular environment? How to patch?

I'm using compsci and friends for a LaTeX course. But the following MWE \documentclass{article} \usepackage{compsci} \begin{document} Well, the following works: ``\cs\_'' % but there's an extra ...
gildux's user avatar
  • 542
2 votes
0 answers
138 views

Mintinline in Tabularx / remove space in detokenize

I write a LaTeX manual in memoir class with the Minted package, TeXlive 2021 and TeXmaker. To insert some \mintinline code in a Tabularx X-type column, I used this trick and it work. Except that it ...
Bruno Douchy's user avatar
2 votes
0 answers
106 views

spurious indent combining standalone, french, itemize and verbatim

I have an indentation problem that I finally solved adding \usepackage{enumitem} but I can't understand the reasons why the problem happened in the first place and got solved using enumitem. I nailed ...
Vincent Nivoliers's user avatar
2 votes
0 answers
594 views

How can I use Fira Code with ligatures in pdflatex?

Basically, I've come to really like Fira Code and its ligatures while coding, and I'd like to use it for my code listings in LaTeX, too. Specifically, I am looking for a way to use Fira Code with ...
SRSR333's user avatar
  • 578
2 votes
1 answer
582 views

How to use sagesilent (or verbatim) environment in pgffor loops?

I want to create different versions of an exam paper and corresponding sample solutions using sagetex. I need to assign variables for more involved computations, so I am reliant on the sagesilent ...
bjoseru's user avatar
  • 133
2 votes
0 answers
501 views

Add verbatim code to longtable caption

I'd like to add a caption containing verbatim characters using \verb to a long table using the package longtable. The reason for this is that I want to improve the LaTeX output of pandoc, which uses ...
bjp's user avatar
  • 21
2 votes
0 answers
78 views

Verbatim and Bacground&TikZ compatibility problems

If to compile below MWE, you'll get next error: According the error message, the problem is tikz and calc library package, which looks like links with background package. Also, you will not find any ...
Gurebu Bokofu's user avatar
2 votes
0 answers
104 views

How can I mark a verbatim-part that is gets on it's own page with exact the proper size?

At the moment, I do some documentation for an old database (lucky me). To help people (including myself) understand what it does, I list 5 entries of every table inside of verbatim. But some of these ...
Martin Thoma's user avatar
  • 18.9k
1 vote
0 answers
21 views

codehigh, for verbatim text in tabularray table

In the tabularray package documentation is suggested that for the verbatim text in tables should be used \fakeverb instruction defined in the codehigh package instead of \verb. Using it I' faced with ...
Zarko's user avatar
  • 299k
1 vote
0 answers
30 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,160
1 vote
1 answer
81 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
1 vote
0 answers
73 views

Overlining text in listing environment without changing the font

In short, I would like to place a line over some characters in a listing environment. I am aware of this answer, but am trying to achieve something a bit different. The following: \documentclass{...
Clément's user avatar
  • 5,651
1 vote
0 answers
81 views

\string\noindent outputs a quotation mark " instead of a backslash \

I used \string\noindent to output a command \noindent, but the result is "noindent. I also tried with \verb|\noindent| and \texttt{\noindent}, but the results are the same. I found a question may ...
Qiang's user avatar
  • 11
1 vote
0 answers
302 views

What is the best approach to insert a LaTeX example source with preamble?

Introduction I was preparing some examples of how to use LaTeX and then I found out the package showexpl (showexpl) which worked much better than others such as verbatim, moreverb and fancyvrb-ex. ...
FHZ's user avatar
  • 3,949
1 vote
0 answers
53 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) # ...
gboffi's user avatar
  • 923
1 vote
0 answers
87 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[...
jowe_19's user avatar
  • 939
1 vote
0 answers
134 views

Root in verbatim environment

First: This is a a question similar to the one here and will (hopefully) be the last of these kind of questions from me. How do I write a pixelated n-th root sign with a number "under" it as input in ...
Svend Tveskæg's user avatar
1 vote
0 answers
585 views

Change the output of the sage function latex() on a string

Currently if you run the sage command latex('a string') using sage (or sagetex) the latex output looks like: \text{\texttt{a{ }string}}. I would like to eliminate either of these (preferably the \...
Jason's user avatar
  • 949
1 vote
0 answers
59 views

fancyvrb:embedding Verbatim environemnt in new environemnt, default parameter not works

\documentclass{article} \usepackage{fancyvrb} \newenvironment{code}[1][5mm] {\VerbatimEnvironment\begin{Verbatim}[xleftmargin=#1]} {\end{Verbatim}} \begin{document} ***************************** \...
zhaofeng-shu33's user avatar
1 vote
0 answers
167 views

Numbering correctly indented Verbatim code blocks

I have been looking through the tex.stackechange community answers and questions and I've not managed to find an answer to my problem. I want to be able to write blocks of code in a verbatim-like ...
Hector248's user avatar
1 vote
0 answers
202 views

Use \verb inside \seqsplit

I need to use the \verb command inside the \seqsplit command. The compiler warns me when I insert \verb inside \seqsplit. How can I do? thank you all EDIT: \seqsplit{\verb |#####|} Error: ! ...
Marcus's user avatar
  • 21
1 vote
0 answers
123 views

Polyglossia: equivalent to \NoAutoSpacing?

I use polyglossia in XeLaTeX with the french language. When I type verbatim text, with \verb|...|, the space before a : is not removed. For exemple, I get http :// for web URLs... In Babel, I could ...
F. Delente's user avatar
1 vote
0 answers
629 views

Exporting Eclipse language highlighting

Does anyone know how to insert verbatim code from Eclipse? Not just how to include a file but also keep it's highliting, I use some not-so-widespread languages so exporting it directly would be neat ...
user2692669's user avatar
1 vote
0 answers
109 views

Define environment with two sections and verbatim

I'am writing a class for the standardization of some documents and I want the interface to be smoothly as possible. One of the things I need is define an environment that produces something like this. ...
Nico Lehmann's user avatar
0 votes
0 answers
30 views

Create alias of verbatim environment with optional arguments

I'd like to create an alias of the verbatim (xsim-based) environment \begin{CacheMeCode}{tikzpicture, optional arguments} \end{CacheMeCode} to \begin{tikzpicture}<optional arguments> \end{...
tobiasBora's user avatar
  • 8,854
0 votes
0 answers
27 views

Removing spaces before ```center```

\documentclass[12pt] {article} \usepackage{palatino} \usepackage{fancyvrb} \usepackage{authblk} \usepackage{fancyhdr} \usepackage{titlesec} \def\baselinestretch{2.0} \titleformat{\paragraph}{\...
Manjoy Das's user avatar
0 votes
0 answers
16 views

Insert pagebreak in \begin{center} with \begin{BVerbatim}

\documentclass[12pt] {article} \usepackage{amsmath} \usepackage[breakable]{tcolorbox} \usepackage{fancyvrb} \usepackage{fancyhdr} \def\baselinestretch{2.0} \usepackage{tocloft} \def\toright#1{\...
Manjoy Das's user avatar
0 votes
0 answers
33 views

Sphinx Verbatim (Code block) inside mdframed environment

My code-block don`t break on new page when a use code-block inside mdframed environmen: \begin{mdframed} \begin{sphinxVerbatim}[commandchars=\\\{\}] Tablespaces: PRIMARY (1) Full path: /home/test/...
Ольга Зайчук's user avatar
0 votes
0 answers
54 views

v-type argument in \NewDocumentCommand ignores spaces

Consider the following code: \documentclass{article} \usepackage{listings} \NewDocumentCommand{\hey}{v}{\lstinline|#1|\ignorespaces} \begin{document} \hey|a |b \lstinline|a |b \end{document} Why ...
Gargantuar's user avatar
  • 1,134
0 votes
0 answers
33 views

Biblatex/Memoize: Error if cited bib entry includes verbatim field

If Biblatex is used with the current version of Memoize, citing any entry containing a verbatim field results in compilation failure. I've reported this as a bug, but is it possible to workaround the ...
cfr's user avatar
  • 206k
0 votes
0 answers
81 views

! LaTeX Error: Environment Verbatim undefined in Texlive in Linux Mint

I'm using Texmaker with Texlive in Linux Mint 21.3 Cinnamon to write an article with some Python code. Then I got a problem: ! LaTeX Error: Environment Verbatim undefined in Texlive in Linux Mint The ...
trequartista's user avatar
  • 1,890
0 votes
0 answers
64 views

How to get straight single quotes in verbatim and and codeexample

I have in my documentation stuff like print('abc'), but it is turned into print(’abc’) (note the changed quote), which breaks compilation. How could I make the environments \begin{codeexample} and \...
tobiasBora's user avatar
  • 8,854
0 votes
0 answers
60 views

How to make an environment created with newtcblisting behave the same as one created by the minted environment?

I have declared a new envrionment in a class file like this (the complete file exists here): \renewcommand{\theFancyVerbLine}{\parbox{10pt}{\centering\footnotesize\arabic{FancyVerbLine}}} \...
Sujal Singh's user avatar
0 votes
0 answers
57 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,531
0 votes
0 answers
12 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
0 votes
0 answers
29 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
0 votes
0 answers
24 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,531
0 votes
0 answers
40 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
0 answers
63 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
  • 141
0 votes
0 answers
41 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
  • 1,006
0 votes
0 answers
337 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
107 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
0 votes
1 answer
68 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
41 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
0 answers
105 views

Unable to use \verb inside \cvitem

I'm trying to include some \verb|text| inside the body of a cvitem. Compare: \documentclass[11pt,a4paper,colorlinks,linkcolor=green]{moderncv} \moderncvtheme[blue]{classic} \firstname{Ducky} \...
Dror's user avatar
  • 22.7k