summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fancyvrb
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-20 03:01:05 +0000
committerNorbert Preining <norbert@preining.info>2023-01-20 03:01:05 +0000
commit6d3235d032cbed920059ab39370928067056573a (patch)
treeaa934ccc80bd69cc4ca388f418a62fa0140e443b /macros/latex/contrib/fancyvrb
parentc11207d3e9027d6aa4153a2103df58382d41e56e (diff)
CTAN sync 202301200301
Diffstat (limited to 'macros/latex/contrib/fancyvrb')
-rw-r--r--macros/latex/contrib/fancyvrb/Changes1
-rw-r--r--macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdfbin143170 -> 171060 bytes
-rw-r--r--macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex48
-rw-r--r--macros/latex/contrib/fancyvrb/latex/fancyvrb.sty13
4 files changed, 46 insertions, 16 deletions
diff --git a/macros/latex/contrib/fancyvrb/Changes b/macros/latex/contrib/fancyvrb/Changes
index b1d30e7272..542d7326d0 100644
--- a/macros/latex/contrib/fancyvrb/Changes
+++ b/macros/latex/contrib/fancyvrb/Changes
@@ -1,4 +1,5 @@
--- fancyvrb.sty
+4.5a 2023/01/19 - modified documentation (hv)
4.5 2022/06/06 - added \noniterlineskip for frame=lines (hv)
4.4 2022/06/03 - fix for deleted \@penalty command _before_ top rule(hv)
4.3 2022/06/02 - prevent pagebreak after top rule (hv)
diff --git a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
index 6adf3fd955..76efb4e4f1 100644
--- a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
+++ b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
index 75f426ae81..ec6dbcdfed 100644
--- a/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
+++ b/macros/latex/contrib/fancyvrb/doc/fancyvrb-doc.tex
@@ -1,7 +1,7 @@
\listfiles
\documentclass[twoside]{article}
-\usepackage{libertinus-otf}
-\setmonofont[Scale=MatchLowercase,FakeStretch=0.9]{AnonymousPro-Regular.ttf}
+\usepackage[TT={Scale=MatchLowercase,FakeStretch=0.88}]{lucida-otf}
+\setmonofont[Scale=MatchLowercase,FakeStretch=0.85]{DejaVu Sans Mono}
\newif\ifChangeBar \ChangeBarfalse
\usepackage{fancyvrb}
\usepackage{fancyvrb-ex}
@@ -261,13 +261,22 @@ case...
\item[formatcom (command)]: command to execute before printing verbatim
text
(\emph{Default: empty}).
+ \item[formatcom* (command)]: add definition to an existing one
\end{optlist}
\begin{SideBySideExample}
- \begin{Verbatim}[formatcom=\color{red}]
- First verbatim line.
- Second verbatim line.
- \end{Verbatim}
+\begin{Verbatim}[formatcom=\color{red}]
+First verbatim line.
+Second verbatim line.
+\end{Verbatim}
+\end{SideBySideExample}
+
+\begin{SideBySideExample}
+\fvset{formatcom=\color{red}}
+\begin{Verbatim}[formatcom*=\itshape]
+First verbatim line.
+Second verbatim line.
+\end{Verbatim}
\end{SideBySideExample}
\subsubsection{Changing individual line formatting}
@@ -965,28 +974,47 @@ make reference to some lines of the verbatim environments:
\begin{optlist}
\item[codes (macro)]: to specify \emph{catcode} changes (\emph{Default:
empty}).
+ \item[codes* (macro)]: add to an existing definition.
\end{optlist}
For instance, this allows us to include formatted mathematics in verbatim
text:
-{\fvset{fontsize=\small}
+{\fvset{fontsize=\small}%
\begin{SideBySideExample}
- Z\fvset{fontsize=\normalsize}
- \begin{Verbatim}[commandchars=\\\{\},
+\begin{Verbatim}[commandchars=\\\{\},
codes={\catcode`$=3\catcode`^=7}]
x=1/sqrt(z**2) ! $\frac{1}{\sqrt{z^2}}$
- \end{Verbatim}
+\end{Verbatim}
+\end{SideBySideExample}
+} %$
+
+
+With \verb|codes*| we can add code to an already existing definition of \Verb|codes|:
+
+{\fvset{fontsize=\small}%
+\begin{SideBySideExample}
+\fvset{codes={\catcode`$=3\catcode`^=7}}
+\begin{Verbatim}[commandchars=\\\{\},
+ % _add_ to codes
+ codes*={\color{blue}}]
+x=1/sqrt(z**2) ! $\frac{1}{\sqrt{z^2}}$
+\end{Verbatim}
\end{SideBySideExample}
} %$
+
+
+
+
\subsubsection{Active characters}
\begin{optlist}
\item[defineactive (macro)]: to define the effect of \emph{active}
characters
(\emph{Default: empty}).
+ \item[defineactive* (macro)]: add the definition to an existing one.
\end{optlist}
This allows us to do some devious tricks: see the example in Section
diff --git a/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty b/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
index d5dce763a5..ad9c0b7bc8 100644
--- a/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
+++ b/macros/latex/contrib/fancyvrb/latex/fancyvrb.sty
@@ -2,7 +2,7 @@
%% This is file `fancyvrb.sty',
%%
%% COPYRIGHT 1992-1999, by Timothy Van Zandt <tvz@zandtwerk.kellogg.nwu.edu>
-%% 2000-2022 ... , by Herbert Voss <hvoss@tug.org>
+%% 2000-2023 ... , by Herbert Voss <hvoss@tug.org>
%%
%% This package may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
@@ -13,8 +13,8 @@
%% verbatim environments and commands and extensive documentation.
%%
\NeedsTeXFormat{LaTeX2e}
-\def\fileversion{4.5}
-\def\filedate{2022/06/06}
+\def\fileversion{4.5a}
+\def\filedate{2023/01/19}
\ProvidesPackage{fancyvrb}[\filedate\space \fileversion\space verbatim text (tvz,hv)]
%\message{Style option: `fancyvrb' v\fileversion \space <\filedate> (tvz)}
\csname fancyvrb@loaded\endcsname
@@ -827,7 +827,8 @@
%% DG/SR modification end
\penalty\@M
\FV@SingleFrameSep
- \penalty\@M}
+ \penalty\@M
+}
%% DG/SR modification begin - May. 19, 1998
\define@key{FV}{label}{%
\def\@tempa{#1}%
@@ -868,7 +869,7 @@
\def\FV@SingleFrameLine#1{%
\hbox to\z@{%
\kern\leftmargin
- \ifnum#1=\z@
+ \ifnum#1=\z@% top line?
\let\FV@Label\FV@LabelBegin
\else
\let\FV@Label\FV@LabelEnd
@@ -876,7 +877,7 @@
\ifx\FV@Label\relax
\FancyVerbRuleColor{\vrule \@width\linewidth \@height\FV@FrameRule}%
\else
- \ifnum#1=\z@
+ \ifnum#1=\z@% top line
\setbox\z@\hbox{\strut\enspace\FV@LabelBegin\enspace\strut}%
\else
\setbox\z@\hbox{\strut\enspace\FV@LabelEnd\enspace\strut}%