X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=test%2Ftest13-listings.tex;h=0274061831beadcf74c36868373fcc74157065d2;hb=9239672f2650e60ba848bb9776c0fff31b74a048;hp=c6b3c34172d16b7fe1de5863c8d8cb106b47efa7;hpb=3d5cee68961b97a658514c0cbebed41df1c50ff7;p=luatex-ja%2Fluatexja.git diff --git a/test/test13-listings.tex b/test/test13-listings.tex index c6b3c34..0274061 100644 --- a/test/test13-listings.tex +++ b/test/test13-listings.tex @@ -1,7 +1,7 @@ %#!lualatex \documentclass{article} -\usepackage{luatexja-fontspec} +\usepackage{luatexja-fontspec,amsmath} \usepackage{listings,color,showexpl,comment} \usepackage{luatexja-otf}\directlua{luatexja.otf.enable_ivs()} \usepackage @@ -33,13 +33,14 @@ \fi }{} \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}{n}{<-> s * [1.2] KozMinPr6N-Regular:jfm=ujis}{} +\DeclareFontShape{JY3}{koz}{m}{sl}{<-> s * [1.2] 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} +\def\cs#1{\hbox{\texttt{\textbackslash #1}}} \begin{document} This test file is based on a.tex\footnote{This can be downloaded from {\tt https://gist.github.com/1574793}.} by x19290. @@ -55,8 +56,13 @@ In this document, we define them by \end{lstlisting} \newpage -We also avoid white band problem, by setting both the height and the depth of each -letter/word to 0\,pt. +We also avoid white band problem, by setting the value of \cs{lineskiplimit} to +\begin{multline} + -\min(\cs{cht}-\cs{ht}\cs{strutbox}, 0)\\ + -\min(\cs{cdp}-\cs{dp}\cs{strutbox}, 0). +\end{multline} + +Note: we still have a white band if the first line is line-broken. \begin{env}{\relax} #!/bin/sh @@ -169,6 +175,7 @@ IVS対応2: \texttt{vsraw=true} 1234567890 1あ,23 1あ2,3 +1)2,3 1234567890 \end{lstlisting} @@ -177,11 +184,29 @@ IVS対応2: \texttt{vsraw=true} \textbf{Ticket \#34786} \ltjsetparameter{autoxspacing=false} -foo \lstinline[basicstyle=\tt]!bar! baz あ -あ\lstinline[basicstyle=\tt]{bar}hoge +foo \lstinline[basicstyle=\tt]!ba{}#shr! baz あ + +あ\lstinline[basicstyle=\tt]{bar s}hoge + +あ\lstinline[basicstyle=\tt]{bar..{a}hoge + +foo \lstinline[basicstyle=\tt\gtfamily]!あexit 0; #shbar! baz あ -foo \lstinline[basicstyle=\tt]!あbar! baz あ -あ\lstinline[basicstyle=\tt]{いbar}hoge +あ\lstinline[basicstyle=\tt]{いbexit #sh$ar}hoge +\bigskip +\textbf{Ticket \#35484} +\colorbox{red}{\lstinline!aiu#sheoxyz!} +\colorbox{red}{\lstinline!あいexit 0;#shうえお!} + + +\colorbox{red}{\lstinline{aiu#sheoxyz}} +\colorbox{red}{\lstinline{あいexit 0;#shうえお}} + +あおいうえお +\begin{lstlisting}[frame=single] +aiu +\end{lstlisting} +あいうえお \end{document}