{fancyvrb} is a package that provides sophisticated facilities for reading and writing verbatim TeX code.

learn more… | top users | synonyms

3
votes
2answers
152 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
254 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
125 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
351 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
854 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} ...
5
votes
1answer
690 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
924 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} ...
3
votes
1answer
357 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
894 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
658 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
224 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
331 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, ...
2
votes
1answer
2k 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
173 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} ...
5
votes
1answer
1k 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
385 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
380 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
275 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
143 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, ...
12
votes
3answers
425 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 ...
4
votes
1answer
2k 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
2k 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
969 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
127 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; ...
2
votes
1answer
337 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 ...
4
votes
1answer
1k 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
499 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 ...
4
votes
1answer
2k 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
86 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 ...
4
votes
1answer
431 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 ...
4
votes
2answers
717 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} ...
3
votes
1answer
3k 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
926 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
779 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
252 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} ...