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

learn more… | top users | synonyms

2
votes
1answer
24 views

Custom verbatim commands writing into index

I have created a custom fancyvrb command via \CustomVerbatimCommand{\afun}{Verb}{} to use for writing programming language functions, say \afun|object.method.blah|, etc. I would like to automatically ...
2
votes
1answer
44 views

Source code customization for specific words?

I'd like to highlight some specific words for HTML5 code manually in LaTeX. In other words, I don't want to define an exact structure for highlighting the language, but do the highlights only for the ...
4
votes
1answer
67 views

too much space between two environment create with tcolorbox

i want write a maple book, see this example code in that book: ‎\documentclass{article}‎ ‎\usepackage{tcolorbox,fancyvrb}‎ ‎\tcbuselibrary{skins,breakable}‎‎ ‎‎ ...
3
votes
1answer
98 views

Coloring or Bolding multiple lines in fancyvrb integration with listings

I would like to apply latex commands on a bunch of lines in a Verbatim environment with listings, especially make bold or color a block of code. I am able to do that for a single line, but not for ...
7
votes
4answers
166 views

how fancyvrb background color fill completely with fillcolor?

I'd like the whole Verbatim (fancyvrb) block to have a background color. How do I do it? The fancyvrb package does define a fillcolor -- but that only colors the area around the margin -- not the ...
7
votes
2answers
61 views

Break line within a macro while writing to a file

I am trying to use (La)TeX as a macro pre-processor for a programming language. My idea is to use the VerbatimOut environment from the fancyvrb package to output essentially verbatim text, but using @ ...
4
votes
1answer
93 views

How to handle listings, fancyvrb, newfloat and caption?

I am planning a "small thesis" for university which will need to display lots of code (C, C++, gnuplot, LaTeX, ...) - thus I spent this evening reading about listings and fancyvrb. The latter I've ...
6
votes
1answer
400 views

LaTeX commands in Verbatim using fancyvrb and listings

I am trying to use LaTeX commands like \textbf, \textit, \textcolor in fancyvrb combined with listings. Especially I want to bold and color any text or entire blocks of Java code (not just keywords) ...
4
votes
2answers
112 views

Integrating listings with fancyvrb

I am trying to use fancyvrb with listings and I get an error saying l.2 ...{Verbatim}[formatcom={\lstset{style=Java}}] Package Listings Error: language java undefined. ...
0
votes
0answers
25 views

How to install fancyvrb within mactex? [duplicate]

I like to use http://www.ctan.org/pkg/fancyvrb with http://tug.org/mactex but its not clear to me how to install it within mactex ?
6
votes
2answers
119 views

How to add a phantom character to the beginning of a verbatim block

I am trying to understand the commandchars of fancyverb's Verbatim: \documentclass{article} \usepackage{fancyvrb} \begin{document} \phantom{foo} \begin{Verbatim}[commandchars=\\\!\!] \phantom{bar} ...
2
votes
1answer
107 views

Can I use Beamer's \alert<x>{…} inside fancyvrb Verbatim with overlay?

I would like to use Beamer's \alert<x>{...} command inside of a Verbatim environment (from the fancyvrb package) to highlight the text. I've found that when the \alert command is inside the ...
3
votes
1answer
96 views

How to wrap floated minted listing in my own environment?

Here's what I'd like to do: \begin{code}{c}{Hello World in C}% I would prefer the caption to be optional #include <stdio.h> int main(void) { printf("Hello, world!\n"); return 0; } ...
5
votes
2answers
915 views

You can't use `macro parameter character #' in restricted horizontal mode. [duplicate]

I get a strange error with a \Verb escape in a footnote: \documentclass{article} \usepackage{fancyvrb} \begin{document} Works inline \Verb!S#Var! but doesn't in footnote. % \footnote{No really, it ...
6
votes
2answers
61 views

get rid of whitespace when using in Verb in tabu*

Is there any way, to get rid of the extra whitespace between the command and the curly braces when using a Verb in a tabu*? \documentclass{article} \usepackage{fancyvrb, tabu} \begin{document} ...
4
votes
1answer
100 views

Tikz + Verbatim + Sphinx , output drawn twice with slight offset. Works great Tikz + Verbatim

I'm working on a piece of software that outputs IPython Notebooks as tex documents. One of my requirements is to be able to draw code input output blocks that look like the Notebook's UI. ...
4
votes
1answer
112 views

fancyvrb and multicols together

I am using fancyvrb to list code in a multicols situation. I number the code using: \begin{Verbatim}[numbers=left] When the code is in the left column, this is good, but not when it is in the right ...
3
votes
1answer
162 views

Color Text and BG of Verbatim, without affecting `fancyvrb` line numbers

The MWE below aims to color the text and background of a Verbatim environment. \documentclass{article} \usepackage{fancyvrb} \usepackage{color} \usepackage{calc} ...
5
votes
1answer
334 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 ...
2
votes
1answer
77 views

Customised counter macro in fancyvrb

I am using the fancyvrb package in LaTeX2e. I have chosen to display line numbers as I am displaying some code. (The code I am displaying is Maple, which unfortunately is not supported by the ...
1
vote
1answer
78 views

Extend keyword list for fancyvrb / listings, based on a given language

I use fancyvrb and listings packages, and I have defined a language scala, which is the default to use. In one occasion, I have an extension of that language, escala, which adds additional keywords. ...
1
vote
1answer
85 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
1answer
258 views

how to use fancyvrb Verbatim in tabularx?

When using tabular and p it is possible to insert Verbatim block in a table using minipage \documentclass[]{article}% \usepackage{fancyvrb} \begin{document} \begin{tabular}{|p{2in}|p{3in}|} ...
4
votes
1answer
128 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 ...
4
votes
2answers
312 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
476 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.} ...
11
votes
2answers
217 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
167 views

code-block directive causing error Empty verbatim environment [closed]

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
1answer
136 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 ...
3
votes
2answers
96 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| ...
4
votes
2answers
99 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
130 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
493 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
1answer
425 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
225 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
472 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
439 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
151 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
175 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, ...
1
vote
1answer
1k 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
147 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
727 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
255 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
261 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
216 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
126 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
351 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
1k 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
681 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 ...