OSDN Git Service

lltjp-geometry: escape
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Mon, 17 Sep 2018 11:15:46 +0000 (20:15 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Mon, 17 Sep 2018 11:15:46 +0000 (20:15 +0900)
src/patches/lltjp-listings.sty
test/test13-listings.pdf
test/test13-listings.tex

index abcf05b..e54cb00 100644 (file)
@@ -1,5 +1,5 @@
 %
-% lltjp-listings.sty 2018-08-25
+% lltjp-listings.sty 2018-09-17
 %
 
 \NeedsTeXFormat{LaTeX2e}
   \begingroup\lccode`\~=`#1\lowercase{%
   \gdef\lst@next##1~{%
      \let\lst@arg\@empty\ltj@lst@remove@jacmd{##1}%
-     \expandafter\expandafter\expandafter\scantokens\expandafter{\lst@arg}%
+     \expandafter\expandafter\expandafter\scantokens\expandafter{\lst@arg\relax}%
      ~}%
   }\endgroup
 }
index 66833b4..7585388 100644 (file)
Binary files a/test/test13-listings.pdf and b/test/test13-listings.pdf differ
index 0274061..7e69c05 100644 (file)
@@ -145,7 +145,7 @@ the first line of the listing is not rendered.
 IVS対応1: \texttt{vsraw=false} (default)
 
 \begin{LTXexample}[escapechar=\%, basicstyle=\tt]
-1234567890
+123456789012345678
 1葛󠄀城,葛󠄁飾
 󠄀a
 \end{LTXexample}
@@ -153,7 +153,7 @@ IVS対応1: \texttt{vsraw=false} (default)
 IVS対応2: \texttt{vsraw=true}
 
 \begin{LTXexample}[escapechar=\%,vsraw, basicstyle=\tt]
-1234567890
+123456789012345678
 1葛󠄀城,葛󠄁飾アイウ
 \end{LTXexample}
 
@@ -209,4 +209,12 @@ foo \lstinline[basicstyle=\tt\gtfamily]!あexit 0; #shbar! baz あ
 aiu
 \end{lstlisting}
 あいうえお
+
+\bigskip
+\textbf{Escape character}
+\begin{lstlisting}[escapechar=\#,basicstyle=\ttfamily]
+1234567890123457890
+aiu#\textcolor{red}{e} #o#\textcolor{red}{ka}#ki
+\end{lstlisting}
+
 \end{document}