summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-01-19 21:02:19 +0000
committerKarl Berry <karl@freefriends.org>2023-01-19 21:02:19 +0000
commit854a532dd2c502a852b3f012ca8d3e5e87a25fa7 (patch)
tree4d98d0f8fd629d30f909089a3e5700d80c0e99be /Master
parent7ce0a4572d805bdf689e46bfd232f5f3a3869d57 (diff)
fancyvrb (19jan23)
git-svn-id: svn://tug.org/texlive/trunk@65585 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/fancyvrb/Changes1
-rw-r--r--Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.pdfbin143170 -> 171060 bytes
-rw-r--r--Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.tex48
-rw-r--r--Master/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty13
4 files changed, 46 insertions, 16 deletions
diff --git a/Master/texmf-dist/doc/latex/fancyvrb/Changes b/Master/texmf-dist/doc/latex/fancyvrb/Changes
index b1d30e72728..542d7326d08 100644
--- a/Master/texmf-dist/doc/latex/fancyvrb/Changes
+++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.pdf b/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.pdf
index 6adf3fd9552..76efb4e4f16 100644
--- a/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.pdf
+++ b/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.tex b/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.tex
index 75f426ae81d..ec6dbcdfedb 100644
--- a/Master/texmf-dist/doc/latex/fancyvrb/fancyvrb-doc.tex
+++ b/Master/texmf-dist/doc/latex/fancyvrb/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/Master/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty b/Master/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
index d5dce763a54..ad9c0b7bc8e 100644
--- a/Master/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty
+++ b/Master/texmf-dist/tex/latex/fancyvrb/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}%