OSDN Git Service

fix lltjp-listings.sty (avoids a white belt with [frame-single])
[luatex-ja/luatexja.git] / src / patches / lltjp-listings.sty
index 1edb37e..459a56c 100644 (file)
 
 
 % 白線対策
+\newif\ifltj@lst@frame@top
+\newdimen\ltj@lst@frame@lslimit
 \gdef\lst@frameInit{%
+    \ltj@lst@frame@toptrue
     \ifx\lst@framelshape\@empty \let\lst@frameL\@empty \fi
     \ifx\lst@framershape\@empty \let\lst@frameR\@empty \fi
     \def\lst@framevrule{\vrule\@width\lst@framerulewidth\relax}%
     \@tempdima\z@
     \ifdim\ht\strutbox<\cht\@tempdima=\dimexpr\cht-\ht\strutbox\relax\fi
     \ifdim\dp\strutbox<\cdp\advance\@tempdima=\dimexpr\cdp-\dp\strutbox\relax\fi
-    \edef\lst@framelr{\lineskiplimit-\the\@tempdima\copy\lst@framebox}%
+    \ltj@lst@frame@lslimit=-\@tempdima
+    \def\lst@framelr{%
+      \ifltj@lst@frame@top\ltj@lst@frame@topfalse\else\lineskiplimit\ltj@lst@frame@lslimit\fi
+      \copy\lst@framebox}%
     %%%% ここまで
     \ifx\lst@frametshape\@empty\else
         \lst@frameH T\lst@frametshape