{fancyvrb} is a package that provides sophisticated facilities for reading and writing verbatim TeX code.
2
votes
1answer
24 views
How to make letter spacing in verbatim/fancyvrb look like listings
I've just noticed that the spacing between letters is different in verbatim vs. lstlisting environments:
Given that I add the option columns=flexible to the lstlisting environment, the spacing in ...
0
votes
1answer
35 views
What is the counter name for verbments?
I'm trying to use the verbments package with the cleveref package. I need to find the name of the counter which is usually used for \ref{listing_label} to be able to define the name cleveref uses for ...
3
votes
2answers
23 views
Problem with hyphen in URL when using fancyvrb with hyperref
There seems to be a problem using a hyphen in a URL inside a fancyvrb Verbatim environment when using the hyperref package.
The Problem
The following document:
\documentclass{article}
...
5
votes
3answers
80 views
Use sans-serif in a verbatim environment?
What is the right way get fancyvrb’s verbatim environment (or any other variation) to use \textsf as the font?
I can do it with:
\begin{Verbatim}[commandchars=\\\{\}]
\textsf{Here’s some textsf.}
...
9
votes
2answers
100 views
How can I define a new minted environment with optional arguments?
I have the following mwe:
% arara: pdflatex: { shell: true }
% arara: pdflatex: { shell: true }
\documentclass{article}
\usepackage{minted}
\usepackage{listings}
\usepackage{caption}
...
1
vote
0answers
37 views
code-block directive causing error Empty verbatim environment
When I use directive .. code-block:: c in rst on Ubuntu 12.04 version
and compile using latexpdf
Error:
(/usr/share/texmf-texlive/tex/latex/psnfss/t1pcr.fd)
! FancyVerb Error:
Empty verbatim ...
3
votes
2answers
39 views
Babel spanish option and fancyvrb incompatibility
The following MWE compiles without problems
\documentclass{article}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{fancyvrb}
\begin{document}
\SaveVerb{x>y}|x > y|
...
3
votes
1answer
56 views
Block element characters (pmboxdraw) are shown too wide in verbatim and Verbatim (fancyvrb) environments
I want to put source code into verbatim and Verbatim (fancyvrb) environments that uses box-drawing characters from codepage 850 (0xDB, 0xDC, 0xDF) (see http://en.wikipedia.org/wiki/Code_page_850). By ...
4
votes
2answers
57 views
How to embed verbatim in pspicture?
I'm trying to insert a QR code at the beginning of my thesis with the contents being the BibTeX entry for it.
Any way of embedding the raw text in \psbarcode?
\documentclass[a4paper,12pt]{minimal}
...
2
votes
1answer
43 views
label for package: fancyvrb
I have a latex code for a computer program code like as specified in here. I want to write a label to this code. I searched for it but was unable to find how to add label for the source code. Any help ...
3
votes
1answer
98 views
Using math mode escapes with listings enabled fancyvrb
I am trying to escape math mode within Verbatim, using this answer. This works fine, until I use the listings package with fancyvrb=true
\documentclass{article}
\usepackage{fancyvrb}
...
3
votes
0answers
71 views
Combining DefineVerbatimEnvironment with UseVerbatim
I would like to combine the power of \DefineVerbatimEnvironment with \UseVerbatim within a combined beamer presentation and handout scenario. I have already defined the environment coding, and now I ...
3
votes
1answer
99 views
Using same font for \texttt and \Verb
I would like to configure my document to use exactly the same font for \texttt and \Verb. I got as far as this, which still misses making \ttdefault smaller:
\documentclass{article}
...
2
votes
1answer
82 views
Moving from fancyvrb to listing – need to reconstruct my font settings
I have happily used the fancyvrb package with the Verbatim environment so far, but I want to change my figures to use the listing package with the lstlisting environment in order to have bold-faced ...
2
votes
2answers
94 views
Resize frame around Verbatim
The code:
\begin{figure}
\begin{Verbatim}[frame=single,
framesep=5mm]
<pick ...>
<onMessage resolveByBPELEngine="true">
...
</onMessage>
...
</pick>
\end{Verbatim}
...
2
votes
4answers
236 views
Problems with % percent sign in fancyvrb inline \Verb
I have some programming language code examples in a fancyvrb \Verb!...! expression. This includes the modulus operator which happens to be a percent sign, e.g.
\Verb!(1..100) select: { arg i; i % 7 ...
1
vote
1answer
81 views
How to make fancyvrb's \DefineShortVerb work in other commands?
I'm using the fancyvrb package with the \DefineShortVerb{\|}. However, using | inside of any command doesn't work. MWE:
\documentclass{scrbook}
\usepackage{fancyvrb}
\DefineShortVerb{\|}
...
5
votes
1answer
73 views
fancyvrb and \overfullrule
I know I can use \overfullrule=5pt to get overfull lines marked with a black marker, but using the Verbatim environment from the fancyvrb package the overfull lines are not marked. For example,
...
0
votes
0answers
223 views
commandchars in fancyvrb?
I generate latex from sphinx, and I use UFT8, so I stick to xelatex.
Code listings are given in the Verbatim environment. And long lines get out of the page.
The only way I found to keep long lines ...
1
vote
1answer
410 views
Frame line width within DefineVerbatimEnvironment
I am trying to define an environment which requires a frame line as wide as \textwidth
\DefineVerbatimEnvironment%
{code}{Verbatim}{...,frame=lines,%
xleftmargin=7pt,fontsize=...}
I ...
5
votes
1answer
106 views
Retrieve em-width from another font
I’m trying to align verbatim segments with their outputs. Consider this MWE:
\documentclass{article}
\usepackage{lmodern}
\usepackage{fancyvrb}
...
4
votes
1answer
342 views
Colored line numbers with algorithmicx?
The fancyvrb allows me to customize line number style which I find very useful. I'm using it to give line numbers a different color and then use that same color in the text describing the code. I ...
3
votes
1answer
155 views
How to set the Top Margin for a custom Verbatim environment (fancyvrb)
From the fancyvrb documentation, it looks like I can set left and right margins (paragraph 4.1.13) only. How can I set the top margin for my environment?
More specifically, given that I have a frame ...
3
votes
1answer
144 views
Command right after closing a verbatim environment
I need to use a form of a verbatim environment, so that after the closing of the environment, there immediately follows another command. In particular I need something like the following - assuming ...
3
votes
1answer
151 views
fancybox conflict with fancyvrb? [duplicate]
Possible Duplicate:
Error using \usepackage{fancyvrb, fancybox}
I try to implement a simple environment to highlight source code in LaTeX. My solution is :
use VerbatimOut to write text ...
0
votes
1answer
89 views
fancyvrb always creates new page
I'm having trouble using the facyvrb package. I have the following code:
\section{My section}
\subsection{Subsection}
\begin{Verbatim}[frame=single]
...lots of code...
\end{Verbatim}
However, ...
11
votes
3answers
243 views
fancyvrb ShortVerb and tikz incompatibity
I've been working on a document that has a lot of little verbatim bits so I'm using fancyvrb \DeflneShortVerb{\|}. Now I want to add a tikz picture, and the whole thing fails. It there a simple way ...
3
votes
1answer
1k views
inputenc error with unicode chars and verbatim
I am writing a package where I need to save the contents of several environments in verbatim mode to an auxiliary file. Then the auxiliary file is processed by an external program. In the next ...
8
votes
2answers
935 views
Background color for fancyvrb
For reasons unclear to me, fancyvrb doesn't have a background option. However, the minted package, which it is based on, has one, which suggests it should not be too difficult to add.
The relevant ...
4
votes
3answers
413 views
Error using \usepackage{fancyvrb, fancybox}
With TeX Live 2009, with this MWE.
\documentclass{article}
\usepackage{fancyvrb, fancybox}
\begin{document}
\begin{Verbatim}[frame=single]
auto eth0
\end{Verbatim}
\end{document}
I ...
3
votes
1answer
95 views
Possible to use certain delimiters for macros with fancyvrb?
In this document:
\documentclass{article}
\usepackage{fancyvrb}
\DefineVerbatimEnvironment{AVerb}{Verbatim}{commandchars=\\\{\}}
\def\foo#1-#2;{}
\begin{document}
\begin{AVerb}
\foo x-z;
...
1
vote
1answer
227 views
How do I embed Unicode G Cleff in a Verbatim environment?
I am writing a chapter on Unicode. I'm using LaTeX using the fancyvrb chapter and inputenc, which lets me type most unicode characters without problem.
Problem: I want to include a character from the ...
3
votes
1answer
724 views
New command using inline verbatim
I would like to define a command using verbatim like in the commented line in the following code.
\documentclass{article}
\usepackage{amsmath,amsfonts,amssymb}
% ...
6
votes
1answer
241 views
Determine number of lines in a verbatim environment
I'm trying to implement two new key-value pairs for the fancyvrb package:
head= and tail= specify how many lines to display: That is, head=10, tail=5 specifies to print the first 10 lines of the ...
2
votes
1answer
886 views
fancyvrb alternate commandchars and \textcolor
The following works:
\documentclass{article}
\usepackage{fancyvrb}
\usepackage{color}
\begin{document}
\begin{Verbatim}[commandchars=\\\{\}]
test\textcolor{red}{foo}test
\end{Verbatim}
...
1
vote
1answer
58 views
How to convince fancyvrb to give overfull warnings?
The following document
\documentclass{article}
\usepackage{fancyvrb}
\begin{document}
\hsize=1cm
\begin{Verbatim}
foo bar foo bar foo bar foo bar foo bar
\end{Verbatim}
\end{document}
does not give ...
3
votes
1answer
272 views
fancyvrb, helvetica and underscore… is it just me?
Ran into some weirdness with fancyvrb, helvetica and _. Here's a MWE (for me):
\documentclass{article}
\usepackage{fancyvrb}
\begin{document}
\begin{Verbatim}[fontfamily=helvetica]
Oh no! It's a ...
2
votes
2answers
397 views
Reduce space between Sinput and Soutput
I'm using Sweave in the book document class, and I'm getting really huge spacing between Sinput and Soutput evironments.
\documentclass[11pt]{book}
\usepackage{Sweave}
\usepackage{boxedminipage}
...
1
vote
1answer
1k views
using fancyvrb Verbatim environment from within newenvironment
As with this question, I want to use a verbatim environment from within an environment definition, but I want the listings to be numbered, so I think I need to use fancyvrb. It appears that fancyvrb ...
6
votes
1answer
571 views
Problem about program code included in LaTeX
I have some Matlab code which I
would like to include in my LaTeX
document.
I use fancyvrb package, based on
which I define a new environment
called code. An complete and minimum
example is:
...
3
votes
2answers
593 views
“Missing number, treated as zero” with fancyvrb package
I was trying to use the package fancyvrb.
However with
\usepackage{breqn}
\usepackage{fancyvrb}
\DefineVerbatimEnvironment{code}{Verbatim}{fontsize=\small}
...
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}
...

