summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-23 22:34:45 +0000
committerKarl Berry <karl@freefriends.org>2018-01-23 22:34:45 +0000
commitce07f5180b54e0229abae4d10288940c610afe31 (patch)
treefeef3d1dc42bedb22d5648026a39b03388027167 /Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
parent607588e2b8c554ec8bfbe11f1391622768fe79c8 (diff)
lwarp (23jan18)
git-svn-id: svn://tug.org/texlive/trunk@46416 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty51
1 files changed, 33 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
index ecb8727ca62..4a70cda4dd0 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyvrb.sty
@@ -17,7 +17,6 @@
%% version 2005/12/01 or later.
\RequirePackage{xcolor}% for \convertcolorspec
\LWR@ProvidesPackagePass{fancyvrb}
-
\begin{warpHTML}
\fvset{frame=none}%
@@ -30,20 +29,40 @@
\AfterEndPreamble{
\LWR@traceinfo{Patching Verbatim.}
-\let\LWRFV@origVerbatim\Verbatim
-\renewcommand*{\Verbatim}{%
-\LWR@forcenewpage
-\LWRFV@origVerbatim%
+\preto\FVB@Verbatim{\LWR@forcenewpage}
+\preto\FVB@LVerbatim{\LWR@forcenewpage}
+\def\FV@BeginListFrame@Single{%
+ \FV@SingleFrameLine{\z@}%
+}
+
+\def\FV@EndListFrame@Single{%
+ \FV@SingleFrameLine{\@ne}%
+}
+
+\def\FV@BeginListFrame@Lines{%
+ \FV@SingleFrameLine{\z@}%
+}
+
+\def\FV@EndListFrame@Lines{%
+ \FV@SingleFrameLine{\@ne}%
}
+
+\renewcommand*{\FV@SingleFrameSep}{}
+\def\FV@BUseVerbatim#1{%
+ \LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}%
+ \FV@BVerbatimBegin#1\FV@BVerbatimEnd%
+ \LWR@afterendverbatim%
+}
+
\newcommand*{\LWR@FVstyle}{}
\newcommand*{\LWR@fvstartnone}{%
\LWR@traceinfo{fvstartnone}%
-\hbox to\z@{\LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}}%
+\LWR@atbeginverbatim[\LWR@FVstyle]{verbatim}%
}
\newcommand*{\LWR@fvendnone}{%
\LWR@traceinfo{fvendnone}%
-\hbox to\z@{\LWR@afterendverbatim}%
+\LWR@afterendverbatim%
}
\newcommand*{\LWR@fvstartsingle}{%
@@ -136,7 +155,6 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\let\FV@RightListFrame\relax%
\let\FV@EndListFrame\LWR@fvendnone}
\def\FV@SingleFrameLine#1{%
- \hbox to\z@{%
\ifnum#1=\z@\relax
\let\FV@Label\FV@LabelBegin
\else
@@ -156,15 +174,13 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
\ifx\FV@LabelPositionBottomLine\relax
\else
\LWR@FVfindbordercolor
+
\LWR@htmltagc{div class="fancyvrblabel" style="color: \#\LWR@tempcolor"}
\LWR@origtextrm{\FV@LabelEnd}
\LWR@htmltagc{/div}
\fi
\fi
-
\fi
- \hss
- }
}
\def\FV@ListProcessLine#1{%
\hbox to \hsize{%
@@ -180,16 +196,15 @@ border#1: \strip@pt\dimexpr \FV@FrameRule\relax\relax pt solid \#\LWR@tempcolor
}
\AtBeginEnvironment{BVerbatim}
-{
-\LWR@forcenewpage
-\LWR@atbeginverbatim{bverbatim}
-
+{%
+\LWR@forcenewpage% instead of \preto
+\LWR@atbeginverbatim{bverbatim}%
}
\AfterEndEnvironment{BVerbatim}
-{
-\leavevmode\par\LWR@origvspace{-\baselineskip}
-\LWR@afterendverbatim
+{%
+\leavevmode\par\LWR@origvspace{-\baselineskip}%
+\LWR@afterendverbatim%
}
} % \AfterEndPreamble