OSDN Git Service

small fix
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Wed, 30 Sep 2020 15:14:18 +0000 (00:14 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Wed, 30 Sep 2020 15:14:18 +0000 (00:14 +0900)
src/lltjext.sty
src/ltj-latex.sty
src/patches/lltjp-preview.sty
test/test56-lltjext-picture.pdf
test/test56-lltjext-picture.tex

index fa3d072..9fe18f4 100644 (file)
@@ -3,7 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjext}[2019/09/25 v1.2k-ltj-11 Macros for vertical writing]
+\ProvidesPackage{lltjext}[2020-09-30 v1.2k-ltj-12 Macros for vertical writing]
 \RequirePackage{luatexja}
 \newcount\ltj@ext@dir
 \let\ltj@lltjext@orig@tabular=\tabular
        \else \let\box@dir\utod
     \fi
   \fi
+\ifltj@ltfilehook@avail % LaTeX2e >= 2020-10-01
+  \@defaultunitsset\@picht{#3}\unitlength
+  \@defaultunitsset\@picwd{#2}\unitlength
+  \setbox\@picbox\hbox to\@picwd\bgroup\box@dir
+    \@defaultunitsset\@tempdimc{#4}\unitlength\hskip-\@tempdimc
+    \@defaultunitsset\@tempdimc{#5}\unitlength\lower\@tempdimc\hbox\bgroup
+\else % <= 2020-02-02
   \@picwd=#2\unitlength \@picht=#3\unitlength
   \setbox\@picbox\hbox to\@picwd\bgroup\box@dir
   \hskip-#4\unitlength\lower#5\unitlength\hbox\bgroup
+\fi
   \ltj@@pic@reset@blshift
   \ignorespaces}
 \def\endpicture{%
index c5df0ff..834f16e 100644 (file)
@@ -12,7 +12,7 @@
 \def\luatexjalatexLoaded{\endinput}
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{ltj-latex}[2020-09-27 LaTeX support of LuaTeX-ja]
+\ProvidesPackage{ltj-latex}[2020-10-01 LaTeX support of LuaTeX-ja]
 
 % cleanup at end of the document
 %\let\ltj@@orig@end=\@@end
 \ltj@pkgpatch{tascmac}
 \ltj@pkgpatch{ascmac}[lltjp-tascmac]
 \ltj@pkgpatch@im{stfloats}
-\ltj@pkgpatch{preview}  %% at \begin{document}
+\ifltj@ltfilehook@avail\else
+  \ltj@pkgpatch{preview}  %% at \begin{document}
   % (preview package has delayed option)
+\fi
 \ltj@pkgpatch{array}    %% at \begin{document}
 \ltj@pkgpatch{collcell} %% at \begin{document}
 \ltj@pkgpatch@im{unicode-math}
index 0060288..b850ec3 100644 (file)
@@ -3,20 +3,7 @@
 %
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{lltjp-preview}[2018/01/20 Patch to preview for LuaTeX-ja]
-
-\RequirePackage{etoolbox,preview}
-\newbox\ltj@preview@box
-
-\patchcmd\pr@endbox{%
-   \pr@ship@end
-}{%
-   \setbox\ltj@preview@box=\box\AtBeginShipoutBox
-   \setbox\AtBeginShipoutBox=\vbox{\yoko\box\pr@box}%
-   \directlua{luatexja.direction.finalize()}%
-   \setbox\pr@box=\box\AtBeginShipoutBox
-   \setbox\AtBeginShipoutBox=\box\ltj@preview@box
-   \pr@ship@end
-}{}{}
-
+\ProvidesPackage{lltjp-preview}[2020-10-01 Patch to preview for LuaTeX-ja]
+\RequirePackage{preview}
+\let\pr@shipout=\ltj@shipout
 \endinput
index f7c0d44..202c125 100644 (file)
Binary files a/test/test56-lltjext-picture.pdf and b/test/test56-lltjext-picture.pdf differ
index 4d0a8ce..657ba62 100644 (file)
@@ -8,6 +8,7 @@
 \usepackage{plext}
 \usepackage[dvipdfmx]{xcolor}
 \fi
+\usepackage{pict2e}
 \usepackage[margin=20mm]{geometry}
 \unitlength6mm\fboxsep0mm
 
@@ -16,7 +17,7 @@
   \hbox{#1\color{#3}%
     \vrule width 150pt height .2pt depth .2pt\kern-150pt
     \normalsize あいうABCxyz%
-    \fbox{\begin{picture}<#2>(5,4)(1,2)
+    \fbox{\begin{picture}<#2>(1cm+3cm,4)(1,2)
       \put(0,0){\circle*{0.2}}
       \put(0,0){\vector(0,1){1}}
       \put(1,0){\makebox(0,0)[l]{\scriptsize$x$}}