summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty52
1 files changed, 32 insertions, 20 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
index 21962725d87..50ac55f4648 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-listings.sty
@@ -17,7 +17,6 @@
%% version 2005/12/01 or later.
-\begin{warpHTML}
\LWR@ProvidesPackagePass{listings}[2018/09/02]
\lst@column@flexible
@@ -33,11 +32,15 @@
,literate=%
{<}{\HTMLentity{lt}}{4}%
{>}{\HTMLentity{gt}}{4}%
- {\&}{\HTMLentity{amp}}{5}%
+ {'}{\HTMLentity{apos}}{6}%
+ {`}{\HTMLentity{grave}}{7}%
}%
}
\renewcommand{\lst@Init}[1]{%
\LWR@traceinfo{lst@Init}%
+\lst@ifdisplaystyle%
+ \LWR@forcenewpage%
+\fi%
\renewcommand*{\@captype}{lstlisting}%
\let\lst@aboveskip\z@\let\lst@belowskip\z@%
\gdef\lst@boxpos{t}%
@@ -52,27 +55,30 @@
\def\lst@framelr{}%
\LWR@traceinfo{finished origlst@Init}%
\lst@ifdisplaystyle%
-\LWR@traceinfo{About to create verbatim.}%
-\let\lsthk@EveryPar\relax%
-\LWR@forcenewpage
-\LWR@atbeginverbatim{2}{programlisting}%
+ \LWR@traceinfo{About to create verbatim.}%
+ \let\lsthk@EveryPar\relax%
+ \LWR@atbeginverbatim{programlisting}%
-\let\lsthk@EveryPar\LWR@origlsthkEveryPar%
+ \let\lsthk@EveryPar\LWR@origlsthkEveryPar%
\else%
-\ifbool{LWR@verbtags}{\LWR@htmltag{span class="inlineprogramlisting"}}{}%
+ \ifbool{LWR@verbtags}{\LWR@htmltag{%
+ span class=\textquotedbl{}inlineprogramlisting\textquotedbl%
+ }}{}%
\fi%
+\LWR@traceinfo{lst@Init done}%
}
\renewcommand*{\lst@DeInit}{%
\lst@ifdisplaystyle%
-\let\lsthk@EveryPar\relax%
-\LWR@afterendverbatim{0}%
-\let\lsthk@EveryPar\LWR@origlsthkEveryPar%
+ \let\lsthk@EveryPar\relax%
+ \LWR@afterendverbatim%
+ \let\lsthk@EveryPar\LWR@origlsthkEveryPar%
\else%
-\ifbool{LWR@verbtags}{\noindent\LWR@htmltag{/span}}{}%
+ \ifbool{LWR@verbtags}{\noindent\LWR@htmltag{/span}}{}%
\fi%
\LWR@origlst@DeInit%
}
+
\def\lst@MakeCaption#1{%
\LWR@traceinfo{MAKING CAPTION at #1}%
\lst@ifdisplaystyle
@@ -88,10 +94,13 @@
\lst@ifnolol\else
\ifx\lst@@caption\@empty
\ifx\lst@caption\@empty
- \ifx\lst@intname\@empty \else \def\lst@temp{ }%
- \ifx\lst@intname\lst@temp \else
+ \ifx\lst@intname\@empty
+ \else
+ \def\lst@temp{ }%
+ \ifx\lst@intname\lst@temp \else
\LWR@traceinfo{addcontents lst@name: -\lst@name-}%
- \fi\fi
+ \fi
+ \fi
\fi
\else
\LWR@traceinfo{addcontents lst@@caption: -\lst@@caption-}%
@@ -111,9 +120,9 @@
\lst@makecaption\fnum@lstlisting{\ignorespaces \lst@caption}
\else
\LWR@traceinfo{Making title: \lst@title}%
-\begin{BlockClass}{lstlistingtitle}% lwarp
-\lst@maketitle\lst@title% lwarp
-\end{BlockClass}% lwarp
+\begin{BlockClass}{lstlistingtitle}% lwarp
+\lst@maketitle\lst@title% lwarp
+\end{BlockClass}% lwarp
\fi
\LWR@traceinfo{About to assign label: !\lst@label!}%
\ifx\lst@label\@empty\else
@@ -131,6 +140,11 @@
\fi
\LWR@traceinfo{DONE WITH CAPTION at #1}%
}
+
+\renewcommand{\lst@maketitle}[1]{%
+ \LWR@isolate{#1}%
+}%
+
\lst@Key{numbers}{none}{%
\let\lst@PlaceNumber\@empty
\lstKV@SwitchCases{#1}%
@@ -143,8 +157,6 @@
\kern 6in \kern\lst@numbersep
\lst@numberstyle{\thelstnumber}}}%
}{\PackageError{lwarp-listings}{Numbers #1 unknown}\@ehc}}
-\end{warpHTML}
-
\endinput
%%
%% End of file `lwarp-listings.sty'.