Linked Questions

0
votes
0answers
49 views

Framing and colorizing a LaTeX command [duplicate]

I normally use \verb|\LaTeXe| to typeset the command \LaTeXe in my document. But now I want to frame or/and colorize the command \LaTeXe. How can we do that? \documentclass{article} \usepackage{...
26
votes
2answers
11k views

Verbatim inside a command

I have a question about a Verbatim, I want to write a word inside of the subsubsection title. I got an error. How can I fix it?: \subsubsection{The \verb+@interface+ Section}
25
votes
1answer
2k views

Why doesn't \makeatletter work inside \newcommand?

After hours of banging my brain against my skull, I narrowed down an issue I'm having to the fact that \makeatletter doesn't work inside \newcommand. Commands that I call after \makeatletter are ...
4
votes
4answers
7k views

Verbatim Environment in Figure Caption

verbatim environment is not working in figure caption. Checked How to put \verb command inside of \textbf{} block? and Verbatim inside a command is not working. \documentclass[11pt, double space]{...
16
votes
1answer
1k views

Newcommand: What cannot be done?

It is not the first time I tried to create a new command unsuccessfully. Some things I found out did not work (getting "undefined control sequence" or other errors). Use a quote-endquote argument. \...
10
votes
2answers
2k views

How do i put verbatim text as the body of a link?

Is there a way i can have verbatim text inside a link? \href{www.numpy.org}{\verb|numpy|} does not work. I tried using cprotect; \cprotect\href{www.numpy.org}{\verb|numpy|}, but then I end up with !...
2
votes
4answers
4k views

! Paragraph ended before \lst@next was complete: Using lstlisting in itemize

I want to print a piece of verbatim within an item of an itemize environment, as below: \documentclass[letter, 11pt]{article} \usepackage{enumitem} \usepackage{pifont} \usepackage{listings} \...
8
votes
2answers
540 views

How reuse latex code for later expansion?

I would like to make a command to help me writing lines like: The \LaTeX~code is: \verb@e^{i\pi} - 1 = 0@, and the result is: $e^{i\pi} - 1 = 0$. I thought of using a newcommand as: \newcommand{\...
5
votes
1answer
2k views

How to use \verb|…| in the main \title of a beamer presentation?

I know that to use \verb|...| in a beamer presentation you have to add the fragile option to the frame environment. But if I use \verb|...| in the main \title of \titlepage it gives me the error: ...
3
votes
1answer
1k views

\verb illegal in command argument in task

Following this: Make two-columned list start at same line as its section, I did: \documentclass{article} \usepackage{cprotect} \usepackage{tasks} \begin{document} \section{Languages} \...
5
votes
1answer
792 views

Why does verb throw an error using in multicolumn command?

I encounter an error when using the \verb command within the multicolumn command. I reduced the problem to the example below: \documentclass{article} \begin{document} \begin{table}[htb] \begin{...
1
vote
1answer
912 views

\verbatim environment compatible with lingmacros \enumsentence

Using the verbatim environment inside an \enumsentence fails. Here is a MWE: \documentclass{article} \usepackage{lingmacros} \begin{document} \enumsentence{ \begin{verbatim} foo \end{verbatim} } \...
2
votes
4answers
359 views

Verbatim Text Inside Environment which is inside a Boolean Condition

My code looks like this \documentclass{article} \usepackage{environ} \newcommand{\showsolution}{1} \NewEnviron{mysolution}{ \if\showsolution1 \fbox{\BODY} \fi} \begin{document} \begin{...