2 \documentclass{article}
5 \usepackage{palatino,listings,color,showexpl}
8 papersize={100mm,100mm},
17 backgroundcolor=\color[gray]{.75},
19 basewidth={0.55\zw, 0.45em},
20 numbers=left,numberstyle=\tiny, numbersep=2pt,
23 \lstnewenvironment{env}[1]
26 \renewcommand{\lstlistingname}{ex}
33 \DeclareFontShape{JY3}{mc}{m}{sl}{<-> s * [0.92489] psft:Ryumin-Light:jfm=ujis;slant=0.167}{}
34 \DeclareFontShape{JY3}{mc}{m}{it}{<-> ssub* mc/m/sl}{}
36 This test file is based on a.tex\footnote{This can be downloaded from {\tt https://gist.github.com/1574793}.} by x19290.
39 \textbf{SOLVED}: bad folding and not slanted problems are common in pLaTeX and LuaTeX-ja.
41 The cause of the latter problem is that Japanese fonts don't have italic shape by default.
42 In this document, we define them by
43 \begin{lstlisting}[language={[AlLaTeX]TeX}, basicstyle=\ttfamily]
44 \DeclareFontShape{JY3}{mc}{m}{sl}{<-> s * [0.92489] psft:Ryumin-Light:jfm=ujis;slant=0.167}{}
45 \DeclareFontShape{JY3}{mc}{m}{it}{<-> ssub* mc/m/sl}{}
49 We also avoid white band problem, by setting both the height and the depth of each
54 #長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い
55 長い長い長い長い長い長い長い長い長い長い長い長い,長い長い長い長い長い長い
56 #I.長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長いI
57 長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い長い
58 #IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII
59 IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII IIII
62 Note that any \emph{kinsoku shori} is not performed inside \textsf{lstlisting} environment,
63 as the line~3 in output above. We leave it to further development.
66 \textbf{SOLVED}: LuaTeX-ja specific problem:
67 when the \emph{begin} line of a listings environment ends with JAchar,
68 the first line of the listing is not rendered.
70 \begin{env}{problem; shebang not rendered --- 問題}
75 \begin{LTXexample}[language=TeX]
80 \lstinputlisting{test13-listings.tmp}