Tagged Questions
1
vote
1answer
68 views
Using minted environment in user-defined environment (minted inside minipage)
I am having to use the minted environment inside a minipage environment quite often in my document. I wanted to write a new environment for doing this, but since minted isn't designed to be included ...
2
votes
0answers
53 views
How to combine framed and listings packages in new environment
I always use this LaTeX code to display a source code in my article.
\begin{listingbox}{VB style}
\begin{singlespace}
\begin{lstlisting}[style=BASIC]
Private Sub Form_Load()
Dim tex As String
...
2
votes
2answers
176 views
Insert a character in the beginning of each line in a special verbatim environment
How can I insert a special character or a symbol in the beginning of each line in a verbatim environment? In particular, there is a constraint that applies to the verbatim environment: it must be of a ...
4
votes
4answers
106 views
Defining a new environment extending a verbatim environment
Why is it not possible to define a new environment that extends a verbatim environment?
Consider, e.g.:
\documentclass{article}
\newenvironment{myverbatim}{\tiny\begin{verbatim}}{\end{verbatim}}
...
12
votes
2answers
296 views
Format a verbatim paragraph
How can I format a verbatim paragraph? I.e. break, fill and join input lines to produce globally balanced output with the lengths of each line approaching the target \textwidth as closely as possible. ...
13
votes
2answers
96 views
How to make AUCTeX ignore syntax highlighting within environment
I have a problem with syntax highlighting in the Emacs editor using AUCTeX. The problem occurs in particular with the Verbatim environment from the fancyvrb package. Consider the following code:
...
2
votes
2answers
75 views
Create a new environment that uses a verbatim environment
Consider the following:
\documentclass{article}
\usepackage{environ}
\usepackage{verbatim}
\usepackage{color}
\NewEnviron{vred}{%
\color{red}
\begin{verbatim}
\BODY
\end{verbatim}
}
...
8
votes
4answers
129 views
How to redefine an environment to produce no output?
I am using the verbatim environment with
\begin{verbatim}
XXXX
\end{verbatim}
I would like the option of redefining the verbatim environment so that nothing between \begin{verbatim} and ...
2
votes
1answer
179 views
lstlisting in a newenvironment
I have a problem with the lstlisting package. I want to define an \newenvironment with one obligatory parameter, which will be the caption name for the lstlisting. I will also have other lstlisting ...
3
votes
1answer
99 views
passing text to alltt embeded in command (extra newline needed)
I wanted to close alltt inside a command (to add some ornaments around the text), but the spaces that were used for putting the monospaced text into columns was not preserved.
I found the solution ...
8
votes
1answer
638 views
I need a customized verbatim environment
I would need a verbatim environment with the following behaviour:
It is centered (left and right distance to the page edge should be equal).
It can be much wider than the regular text, almost using ...
2
votes
1answer
427 views
Example environment with numbering, caption, “verbatim” content
I need to use an example environment like the following.
\begin{example}[My Caption, mylabel]
My example text
\end{example}
It should show the text inside a verbatim environment, the caption (like ...
2
votes
2answers
323 views
Making more easy the itemized of item with tabulation system
Actually, isn’t not really a question. (Since my examinations get close, I don't really have the time to search for a solution to my problems.)
Rather than using the common \item, I'd like to use ...
8
votes
3answers
266 views
Verbatim in environ’s \BODY
I’d like to print a TeX install guide for different OS, but the most text is the same for all OS. So I build the following
\documentclass{article}
\usepackage{environ}
\newcommand{\mlw}[3]{}
...
8
votes
2answers
859 views
How to change color of some particular environment for entire document
I want to change color of particular environment in document.
For example wherever I found verbatim environment or equation environment appears in my tex file. With some global settings, I want to ...
3
votes
1answer
511 views
Create a verbatim mdframed environment
I'd like to use and mdframed environment with verbatim in it. I've read the both documentations, googled but I've found nothing regarding this matter.
MWE below:
\documentclass[10pt]{article}
...
4
votes
3answers
833 views
Have verbatim code as an equation
I have a little snippet of program code / input that needs to be rendered with the exact layout as typed in (verbatim). Is it possible to have this as an equation? I tried to nest the Verbatim ...
6
votes
1answer
726 views
Using minted to define a new environment
Can I define a newenvironment that has inside it a minted environment?
eg and environment that would be a quickhand for the following code:
\begin{figure}[htp]
\centering
...
2
votes
2answers
473 views
LaTeX verbatim environment inside lists
I am using LaTeX and I have a verbatim environment inside an enumerate one. However, there is much whitespace between the verbatim text and the following list item.
What I have now is something like ...
11
votes
3answers
812 views
How to pass an optional argument to an environment with verbatim content?
This is an attempt to make clear what happened in this question of xport (now deleted, sorry). The now deleted question included code that tried to make my answer to this question of xport work for ...
1
vote
1answer
224 views
How to make my unusual environment accept one argument?
I cannot find a good title to express my question. Therefore, please parse the following code first.
Minimal Code
\documentclass[dvips,dvipsnames,cmyk,table]{book}
...
10
votes
1answer
2k views
verbatim useable with a newenvironment definition?
I'm trying to create a simple newenvironment allowing me to display source code in a verbatim text block with a caption, numbering etc. The solution I'm after is with the in-built LaTeX verbatim ...