summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/jvlisting
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-23 01:49:43 +0000
committerKarl Berry <karl@freefriends.org>2011-11-23 01:49:43 +0000
commitafcf9657fc327b8852f9a39feebb0fd00fb3a33c (patch)
treefddc458a5ea10157c05e32c0c961b0efb1758490 /Master/texmf-dist/doc/latex/jvlisting
parentb39338a5f1024304ab706fb8d4d59cfc24ba4b8a (diff)
jvlisting 0.7 (18nov11)
git-svn-id: svn://tug.org/texlive/trunk@24638 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/jvlisting')
-rw-r--r--Master/texmf-dist/doc/latex/jvlisting/examples.tex4
-rw-r--r--Master/texmf-dist/doc/latex/jvlisting/jvlisting.pdfbin192993 -> 193906 bytes
-rw-r--r--Master/texmf-dist/doc/latex/jvlisting/test.tex36
3 files changed, 37 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/jvlisting/examples.tex b/Master/texmf-dist/doc/latex/jvlisting/examples.tex
index 6c7e759a2e6..218780eeaf4 100644
--- a/Master/texmf-dist/doc/latex/jvlisting/examples.tex
+++ b/Master/texmf-dist/doc/latex/jvlisting/examples.tex
@@ -50,8 +50,8 @@
\end{nlisting}
\newwrite\outfile
-\newcommand{\copytypeset}[1]{\immediate\write\outfile{#1}%
- \ListingTypesetLine{#1}}
+\newcommand{\copytypeset}[1]{\ListingTypesetLine{#1}%
+ {\DisableLigatureFix\immediate\write\outfile{#1}}}
\NewListingEnvironment{copylisting}{1}{\prelistingskip}%
{\immediate\openout\outfile=#1\listingfont}{\copytypeset}%
{\immediate\closeout\outfile\postlistingskip}
diff --git a/Master/texmf-dist/doc/latex/jvlisting/jvlisting.pdf b/Master/texmf-dist/doc/latex/jvlisting/jvlisting.pdf
index 423cdbd8d71..4a160aaa047 100644
--- a/Master/texmf-dist/doc/latex/jvlisting/jvlisting.pdf
+++ b/Master/texmf-dist/doc/latex/jvlisting/jvlisting.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/jvlisting/test.tex b/Master/texmf-dist/doc/latex/jvlisting/test.tex
index 6f70c19f988..ffa59a95f5d 100644
--- a/Master/texmf-dist/doc/latex/jvlisting/test.tex
+++ b/Master/texmf-dist/doc/latex/jvlisting/test.tex
@@ -15,6 +15,8 @@
\parindent0pt
\parskip1ex
+\newwrite\outfile
+
\begin{document}
\begin{center}
@@ -239,7 +241,6 @@ The column break should {\em not} be immediately after \verb|line3|.
\begin{test}{5} (\verb|\filelisting|)
The following two listings should look the same.
-\newwrite\outfile
\immediate\openout\outfile=tmp.txt
\immediate\write\outfile{line1}
\immediate\write\outfile{line2}
@@ -321,4 +322,37 @@ line3
\end{listing}
\end{test}
+\newcommand{\writetofile}[1]{\immediate\write\outfile{#1}}
+\NewListingEnvironment{filetestlisting}{0}{}%
+ {\immediate\openout\outfile=tmp.txt}{\writetofile}%
+ {\immediate\closeout\outfile}
+
+\begin{test}{7.1} (writing listings to file)
+ The following two lines should be the same.
+ \setlength{\listingskipamount}{0pt}%
+ \begin{listing}
+ a line with ``quotes'', \slashes and potential ligatures: ` ?` !` '
+ \end{listing}
+ \begin{filetestlisting}
+ a line with ``quotes'', \slashes and potential ligatures: ` ?` !` '
+ \end{filetestlisting}
+ \filelisting{tmp.txt}
+\end{test}
+
+\newcommand{\copytypeset}[1]{\ListingTypesetLine{#1}%
+ {\DisableLigatureFix\immediate\write\outfile{#1}}}
+\NewListingEnvironment{copylisting}{0}{\prelistingskip}%
+ {\immediate\openout\outfile=tmp.txt\listingfont}{\copytypeset}%
+ {\immediate\closeout\outfile\postlistingskip}
+
+\begin{test}{7.2} (simultaneously typesetting and writing to a file)
+ The following four lines should be the same.
+ \setlength{\listingskipamount}{0pt}%
+ \begin{copylisting}
+ a line with ``quotes'', \slashes and potential ligatures: ` ?` !` '
+ a line with ``quotes'', \slashes and potential ligatures: ` ?` !` '
+ \end{copylisting}
+ \filelisting{tmp.txt}
+\end{test}
+
\end{document}