OSDN Git Service

trailed whitespace at the end of a line
[luatex-ja/luatexja.git] / test / test13-listings.tex
index 11a2cc5..bc748d7 100644 (file)
@@ -3,6 +3,8 @@
 
 \usepackage{luatexja-fontspec}
 \usepackage{listings,color,showexpl}
+\usepackage{luatexja-otf}
+\directlua{luatexja.otf.enable_ivs()}
 \usepackage
 [
        papersize={100mm,100mm},
@@ -16,7 +18,8 @@
        language=sh, extendedchars=false,
        backgroundcolor=\color[gray]{.75},
        breaklines=true,
-    basewidth={0.55\zw, 0.45em},
+        explpreset={columns=fixed},
+    basewidth={0.5\zw, 0.45em},
        numbers=left,numberstyle=\tiny, numbersep=2pt,
 }
 
        }
        \fi
 }{}
-\DeclareFontShape{JY3}{mc}{m}{sl}{<-> s * [0.92489] psft:Ryumin-Light:jfm=ujis;slant=0.167}{}
-\DeclareFontShape{JY3}{mc}{m}{it}{<-> ssub* mc/m/sl}{}
+\DeclareKanjiFamily{JY3}{koz}{}
+\DeclareFontShape{JY3}{koz}{m}{n}{<-> s * [0.92489] KozMinPr6N-Regular:jfm=ujis}{}
+\DeclareFontShape{JY3}{koz}{m}{sl}{<-> s * [0.92489] psft:Ryumin-Light:jfm=ujis;slant=0.167}{}
+\DeclareFontShape{JY3}{koz}{m}{it}{<-> ssub* koz/m/sl}{}
+\def\mcdefault{koz}
 
 \setmainfont{TeX Gyre Pagella}
 \setmonofont{TeX Gyre Cursor}
 \begin{document}
+
 This test file is based on a.tex\footnote{This can be downloaded from {\tt https://gist.github.com/1574793}.} by x19290.
 
 
@@ -56,14 +63,13 @@ letter/word to 0\,pt.
 #!/bin/sh
 #長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い
 長い長い長い長い長い長い長い長い長い長い長い長い,長い長い長い長い長い長い
+#長い長い長い長い長い長い長い長い長い長い長い長い,長い長い長い長い長い長い
 #I.長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長いI
 長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い
 #IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII
 IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII
 \end{env}
 
-Note that any \emph{kinsoku shori} is not performed inside \textsf{lstlisting} environment,
-as the line~3 in output above. We leave it to further development.
 \newpage
 
 \textbf{SOLVED}: LuaTeX-ja specific problem:
@@ -124,4 +130,26 @@ the first line of the listing is not rendered.
 \TeX はギリシャ文字のΤ-Ε-Χ(タウ・イプシロン・カイ)であるから、……
 \TeX is an abbreviation of τέχνη (ΤΕΧΝΗ – technē).
 \end{lstlisting}
+
+\newpage
+IVS対応1: \texttt{vsraw=false} (default)
+
+\begin{LTXexample}[escapechar=\%, basicstyle=\tt]
+1234567890
+1葛󠄀城,葛󠄁飾
+󠄀a
+\end{LTXexample}
+
+IVS対応2: \texttt{vsraw=true}
+
+\begin{LTXexample}[escapechar=\%,vsraw, basicstyle=\tt]
+1234567890
+1葛󠄀城,葛󠄁飾アイウ
+\end{LTXexample}
+
+\begin{lstlisting}[escapechar=\%,vsraw, basewidth=1\zw, basicstyle=\tt]
+1234567890
+1あ,23
+1あ2,3
+\end{lstlisting}
 \end{document}