Skip to content

Instantly share code, notes, and snippets.

@aminophen
Last active May 3, 2017 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aminophen/2b286bcc1510e658661497e320dc2c5b to your computer and use it in GitHub Desktop.
Save aminophen/2b286bcc1510e658661497e320dc2c5b to your computer and use it in GitHub Desktop.
plext.sty の垂直位置の検討
%%
%% This is file `plext.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% plext.dtx (with options: `package')
%%
%% Copyright (c) 2010 ASCII MEDIA WORKS
%% Copyright (c) 2016 Japanese TeX Development Community
%%
%% This file is part of the pLaTeX2e system (community edition).
%% -------------------------------------------------------------
%%
%% File: plext.dtx
\NeedsTeXFormat{pLaTeX2e}
\ProvidesPackage{plext}
[2017/05/02 v1.2f-a03 pLaTeX package file (community edition)]
\newif\if@rotsw
\def\array{\let\@acol\@arrayacol \let\@classz\@arrayclassz
\let\@classiv\@arrayclassiv
\let\\\@arraycr\let\@halignto\@empty\X@tabarray}
\def\tabular{\let\@halignto\@empty\X@tabular}
\@namedef{tabular*}{\@ifnextchar<%>
{\@stabular}{\@stabular<Z>}}
\def\X@tabarray{\@ifnextchar<%>
{\p@tabarray}{\p@tabarray<Z>}}
\def\X@tabular{\@ifnextchar<%>
{\p@tabular}{\p@tabular<Z>}}
\def\@stabular<#1>#2{%
\setlength\dimen@{#2}%
\edef\@halignto{to\the\dimen@}\p@tabular<#1>}
\def\p@tabular<#1>{\leavevmode \null\hbox \bgroup $\let\@acol\@tabacol
\let\@classz\@tabclassz
\let\@classiv\@tabclassiv \let\\\@tabularcr\p@tabarray<#1>}
\def\p@tabarray<#1>{\m@th\@ifnextchar[%]
{\p@array<#1>}{\p@array<#1>[c]}}
\def\p@array<#1>[#2]#3{\setbox\@arstrutbox\hbox{%
\iftdir
\if #1y\relax\yoko
\vrule\@height\arraystretch\ht\strutbox
\@depth\arraystretch\dp\strutbox \@width\z@
\else\if #1z\relax\@rotswtrue
\vrule\@height\arraystretch\ht\zstrutbox
\@depth\arraystretch\dp\zstrutbox \@width\z@
\else
\vrule\@height\arraystretch\ht\tstrutbox
\@depth\arraystretch\dp\tstrutbox \@width\z@
\fi\fi
\else
\if #1t\relax\tate
\vrule\@height\arraystretch\ht\tstrutbox
\@depth\arraystretch\dp\tstrutbox \@width\z@
\else
\vrule\@height\arraystretch\ht\strutbox
\@depth\arraystretch\dp\strutbox \@width\z@
\fi
\fi}%
\fork@array@option<#1>[#2]%
\@mkpream{#3}\edef\@preamble{\ialign \noexpand\@halignto
\bgroup \tabskip\z@skip \@arstrut \@preamble \tabskip\z@skip \cr}%
\let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
\let\tabularnewline\\%
\@begin@alignbox\bgroup\box@dir\adjustbaseline
\let\par\@empty
\let\@sharp##\let\protect\relax
\lineskip\z@skip\baselineskip\z@skip\@preamble}
\def\endarray{\crcr\egroup\egroup\@end@alignbox}
\def\endtabular{\crcr\egroup\egroup\@end@alignbox $\egroup\null}
\expandafter \let \csname endtabular*\endcsname = \endtabular
\def\fork@array@option<#1>[#2]{%
\@rotswfalse
\iftdir
\if #1y\relax\let\box@dir\yoko
\if #2t\relax
\def\@begin@alignbox{%
\@tempdima=\tbaselineshift
\advance\@tempdima-\ybaselineshift
\raise\@tempdima\vtop\bgroup\kern\z@\vtop}%
\let\@end@alignbox\egroup
\else\if #2b\relax
\def\@begin@alignbox{%
\@tempdima=\tbaselineshift
\advance\@tempdima-\ybaselineshift
\raise\@tempdima\vbox\bgroup\vbox}%
\def\@end@alignbox{\kern\z@\egroup}%
\else
\let\@begin@alignbox\vcenter
\let\@end@alignbox\relax
\fi\fi
\else\if #1z\relax\let\box@dir\relax\@rotswtrue
\if #2t\relax
\def\@begin@alignbox{%
\@tempdima=\tbaselineshift
\advance\@tempdima-\ybaselineshift
\advance\@tempdima\ht\tstrutbox
\raise\arraystretch\@tempdima\vtop\bgroup\kern\z@\vtop}%
\let\@end@alignbox\egroup
\else\if #2b\relax
\def\@begin@alignbox{%
\@tempdima=\tbaselineshift
\advance\@tempdima-\ybaselineshift
\advance\@tempdima-\dp\tstrutbox
\raise\arraystretch\@tempdima\vbox\bgroup\vbox}%
\def\@end@alignbox{\kern\z@\egroup}%
\else
\let\@begin@alignbox\vcenter
\let\@end@alignbox\relax
\fi\fi
\else\let\box@dir\tate
\if #2t\relax
\let\@begin@alignbox\vtop
\let\@end@alignbox\relax
\else\if #2b\relax
\let\@begin@alignbox\vbox
\let\@end@alignbox\relax
\else
\let\@begin@alignbox\vcenter
\let\@end@alignbox\relax
\fi\fi
\fi\fi
\else
\if #1t\relax\let\box@dir\tate
\if #2t\relax
\def\@begin@alignbox{\vtop\bgroup\kern\z@\vbox}%
\let\@end@alignbox\egroup
\else\if #2b\relax
\def\@begin@alignbox{\vbox\bgroup\vbox}%
\def\@end@alignbox{\kern\z@\egroup}%
\else
\let\@begin@alignbox\vcenter
\let\@end@alignbox\relax
\fi\fi
\else\let\box@dir\yoko
\if #2t\relax
\let\@begin@alignbox\vtop
\let\@end@alignbox\relax
\else\if #2b\relax
\let\@begin@alignbox\vbox
\let\@end@alignbox\relax
\else
\let\@begin@alignbox\vcenter
\let\@end@alignbox\relax
\fi\fi
\fi\fi}
\newbox\@floatbox
\newdimen\floatwidth
\newdimen\floatheight
\newdimen\floatruletick \floatruletick=0.4pt
\newdimen\captionfloatsep \captionfloatsep=10pt
\def\caption@dir{Z}
\let\captiondir\relax
\newdimen\captionwidth \captionwidth\z@
\def\caption@posa{Z}
\def\caption@posb{Z}
\newbox\@captionbox
\def\captionfontsetup{\normalfont\normalsize}
\def\layoutfloat{\@ifnextchar(%)
{\X@layoutfloat}{\X@layoutfloat(-5\p@,-5\p@)}}
\def\X@layoutfloat(#1,#2){\@ifnextchar[%]
{\@layoutfloat(#1,#2)}{\@layoutfloat(#1,#2)[c]}}
\long\def\@layoutfloat(#1,#2)[#3]#4{%
\setbox\z@\hbox{#4}%
\floatwidth=#1 \floatheight=#2 \edef\float@pos{#3}%
\ifdim\floatwidth<\z@
\floatwidth\wd\z@\floatruletick\z@
\fi
\ifdim\floatheight<\z@
\floatheight\ht\z@\advance\floatheight\dp\z@\relax
\floatruletick\z@
\fi
\setbox\@floatbox\vbox to\floatheight{\offinterlineskip
\hrule width\floatwidth height\floatruletick depth\z@
\vss\hbox to\floatwidth{%
\vrule width\floatruletick height\floatheight depth\z@
\hss\vbox to\floatheight{\hsize\floatwidth\vss#4\vss}\hss
\vrule width\floatruletick height\floatheight depth\z@
}\hrule width\floatwidth height\floatruletick depth\z@}}
\def\DeclareLayoutCaption#1<#2>(#3)[#4#5]{%
\expandafter
\ifx\csname #1@layoutcaption\endcsname\relax \else
\@latex@info{Redeclaring capiton layout setting of '#1'}%
\fi
\expandafter
\gdef\csname #1@layoutcaption\endcsname{%
\if Z\caption@dir\def\caption@dir{#2}\fi
\ifdim\captionwidth=\z@ \captionwidth=#3\relax\fi
\if Z\caption@posa\def\caption@posa{#4}\fi
\if Z\caption@posb\def\caption@posb{#5}\fi}}
\@onlypreamble\DeclareLayoutCaption
\DeclareLayoutCaption{figure}<y>(.8\linewidth)[cd]
\DeclareLayoutCaption{table}<y>(.8\linewidth)[cu]
\def\layoutcaption{\def\caption@dir{Z}\captionwidth\z@
\def\caption@posa{Z}\def\caption@posb{Z}%
\@ifnextchar<\X@layoutcaption{%
\@ifnextchar(\@ilayoutcaption{%
\@ifnextchar[\@iilayoutcaption\relax}}}
\def\X@layoutcaption<#1>{\def\caption@dir{#1}%
\@ifnextchar(\@ilayoutcaption{%
\@ifnextchar[\@iilayoutcaption\relax}}
\def\@ilayoutcaption(#1){\setlength\captionwidth{#1}%
\@ifnextchar[{\@iilayoutcaption}{\relax}}
\def\@iilayoutcaption[#1#2]{%
\def\caption@posa{#1}\def\caption@posb{#2}}
\def\pcaption{\refstepcounter\@captype \@dblarg{\@pcaption\@captype}}
\long\def\@pcaption#1[#2]#3{%
\addcontentsline{\csname ext@#1\endcsname}{#1}{%
\protect\numberline{\csname the#1\endcsname}{\ignorespaces#2}}%
\ifvoid\@floatbox
\latex@error{Use with `\protect\layoutfloat'.}\@eha
\fi
\make@pcaptionbox{#3}%
\@pboxswfalse
\setbox\@tempboxa\vbox{\hbox to\hsize{\if l\float@pos\else\hss\fi
\if l\caption@posb\box\@captionbox\kern\captionfloatsep\fi
\if t\caption@posa\vtop
\else\if b\caption@posa\vbox
\else\ifmmode\vcenter \else\@pboxswtrue $\vcenter \fi\fi\fi
{\if u\caption@posb\box\@captionbox\kern\captionfloatsep\fi
\unvbox\@floatbox
\if d\caption@posb\kern\captionfloatsep\box\@captionbox\fi}%
\if r\caption@posb\kern\captionfloatsep\box\@captionbox\fi
\if@pboxsw \m@th$\fi \if r\float@pos\else\hss\fi}}%
\par\vskip.25\baselineskip
\box\@tempboxa}
\def\make@pcaptionbox#1{%
\expandafter
\ifx\csname\@captype @layoutcaption\endcsname\relax
\@latex@warning{Default caption layout of `\@captype' unknown.}%
\def\caption@dir{Z}\captionwidth\z@
\def\caption@posa{Z}\def\caption@posb{Z}%
\else
\csname \@captype @layoutcaption\endcsname
\fi
\@rotswfalse \@tempswafalse
\iftdir\if y\caption@dir \let\captiondir\yoko \@tempswatrue
\else\if z\caption@dir \let\captiondir\relax \@rotswtrue
\else\let\captiondir\tate\fi\fi
\else\if t\caption@dir\let\captiondir\tate \@tempswatrue
\else\let\captiondir\yoko\fi
\fi
\setbox0\hbox{\if@rotsw $\fi\hbox{\captiondir
\captionfontsetup\parindent\z@\inhibitglue
\csname fnum@\@captype\endcsname\char\euc"A1A1\relax#1}%
\if@rotsw \m@th$\fi}%
\if@tempswa \@tempdima\ht0 \else\@tempdima\wd0 \fi
\ifdim\@tempdima>\captionwidth \@tempdima\captionwidth \fi
\@pboxswfalse
\setbox0\hbox{\if@rotsw\ifmmode\@rotswfalse \else $\fi\fi
\if u\caption@posb\vbox
\else\if d\caption@posb\vbox
\else\if t\caption@posa\vtop
\else\if b\caption@posa\vbox
\else\ifmmode\vcenter\else\@pboxswtrue $\vcenter\fi
\fi\fi\fi\fi
{\hsize\@tempdima\kern\z@
\vbox{\captiondir\hsize\@tempdima
\captionfontsetup\parindent\z@\inhibitglue
\csname fnum@\@captype\endcsname\char\euc"A1A1\relax#1}\kern\z@
}\if@pboxsw \m@th$\fi \if@rotsw \m@th$\fi}%
\let\to@captionboxwidth\relax
\if l\caption@posb \else\if r\caption@posb\else
\def\to@captionboxwidth{to\floatwidth}\fi\fi
\setbox\@captionbox\hbox\to@captionboxwidth{%
\if t\caption@posa\else\hss\fi
\unhbox0\relax
\if b\caption@posa\else\hss\fi}}
\def\minipage{\@ifnextchar<%>
{\X@minipage}{\X@minipage<Z>}}
\def\X@minipage<#1>{\@ifnextchar[%]
{\@iminipage<#1>}{\@iiiminipage<#1>{c}\relax[s]}}
\def\@iminipage<#1>[#2]{\@ifnextchar[%]
{\@iiminipage<#1>{#2}}{\@iiiminipage<#1>{#2}\relax[s]}}
\def\@iiminipage<#1>#2[#3]{\@ifnextchar[%]
{\@iiiminipage<#1>{#2}{#3}}{\@iiiminipage<#1>{#2}{#3}[#2]}}
\def\@iiiminipage<#1>#2#3[#4]#5{%
\leavevmode\bgroup
\setlength\@tempdima{#5}%
\def\@mpargs{<#1>{#2}{#3}[#4]{#5}}%
\@rotswfalse
\iftdir
\if #1y\relax\let\box@dir\yoko
\else\if #1z\relax\@rotswtrue \let\box@dir\relax
\else\let\box@dir\tate
\fi\fi
\else
\if #1t\relax\let\box@dir\tate
\else\let\box@dir\yoko
\fi
\fi
\setbox\@tempboxa\vbox\bgroup\box@dir
\if@rotsw \hsize\@tempdima\hbox\bgroup$\vbox\bgroup\fi
\adjustbaseline
\color@begingroup
\hsize\@tempdima
\textwidth\hsize \columnwidth\hsize
\@parboxrestore
\def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}%
\c@mpfootnote\z@
\let\@footnotetext\@mpfootnotetext
\let\@listdepth\@mplistdepth \@mplistdepth\z@
\@minipagerestore
\@setminipage}
\def\endminipage{%
\par
\unskip
\ifvoid\@mpfootins\else
\vskip\skip\@mpfootins
\normalcolor
\footnoterule
\unvbox\@mpfootins
\fi
\@minipagefalse %% added 24 May 89
\color@endgroup
\if@rotsw \egroup\m@th$\egroup\fi
\egroup
\expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}\egroup}
\DeclareRobustCommand\parbox{\@ifnextchar<%>
{\X@parbox}{\X@parbox<Z>}}
\def\X@parbox<#1>{\@ifnextchar[%]
{\@iparbox<#1>}{\@iiiparbox<#1>{c}\relax[s]}}
\def\@iparbox<#1>[#2]{\@ifnextchar[%]
{\@iiparbox<#1>{#2}}{\@iiiparbox<#1>{#2}\relax[s]}}
\def\@iiparbox<#1>#2[#3]{\@ifnextchar[%]%
{\@iiiparbox<#1>{#2}{#3}}{\@iiiparbox<#1>{#2}{#3}[#2]}}
\long\def\@iiiparbox<#1>#2#3[#4]#5#6{%
\leavevmode\null\bgroup
\setlength\@tempdima{#5}%
\fork@parbox@option<#1>[#2]%
\if@rotsw
\@begin@tempboxa\vbox{\box@dir\hsize\@tempdima
\hbox{$\vbox{\@parboxrestore\adjustbaseline#6\@@par}\m@th$}}%
\else
\@begin@tempboxa\vbox{\box@dir
\hsize\@tempdima\@parboxrestore\adjustbaseline#6\@@par}%
\fi
\ifx\relax#3\relax\else
\setlength\@tempdimb{#3}%
\edef\@parboxto{to\the\@tempdimb}%
\fi
\@begin@parbox\@parboxto{\box@dir\adjustbaseline
\let\hss\vss\let\unhbox\unvbox
\csname bm@#4\endcsname}\@end@parbox
\@end@tempboxa\egroup\null}
\def\fork@parbox@option<#1>[#2]{%
\@rotswfalse
\iftdir
\if #1y\relax\let\box@dir\yoko
\if #2t\relax
\def\@begin@parbox{\raise\cht\vtop\bgroup\kern\z@\vtop}%
\let\@end@parbox\egroup
\else\if #2b\relax
\def\@begin@parbox{\lower\cdp\vbox\bgroup\vbox}%
\def\@end@parbox{\kern\z@\egroup}%
\else\ifmmode
\let\@begin@parbox\vcenter
\let\@end@parbox\relax
\else
\def\@begin@parbox{$\vcenter}%
\def\@end@parbox{\m@th$}%
\fi\fi\fi
\else\if #1z\relax\@rotswtrue \let\box@dir\relax
\if #2t\relax
\def\@begin@parbox{\raise\cht\vtop\bgroup\kern\z@\vtop}%
\let\@end@parbox\egroup
\else\if #2b\relax
\def\@begin@parbox{\lower\cdp\vbox\bgroup\vbox}%
\def\@end@parbox{\kern\z@\egroup}%
\else\ifmmode
\let\@begin@parbox\vcenter
\let\@end@parbox\relax
\else
\def\@begin@parbox{$\vcenter}%
\def\@end@parbox{\m@th$}%
\fi\fi\fi
\else\let\box@dir\tate
\if #2t\relax
\let\@begin@parbox\vtop
\let\@end@parbox\relax
\else\if #2b\relax
\let\@begin@parbox\vbox
\let\@end@parbox\relax
\else\ifmmode
\let\@begin@parbox\vcenter
\let\@end@parbox\relax
\else
\def\@begin@parbox{$\vcenter}%
\def\@end@parbox{\m@th$}%
\fi\fi\fi
\fi\fi
\else
\if #1t\relax\let\box@dir\tate
\if #2t\relax
\def\@begin@parbox{\raise\cht\vtop\bgroup\kern\z@\vtop}%
\let\@end@parbox\egroup
\else\if #2b\relax
\def\@begin@parbox{\lower\cdp\vbox\bgroup\vbox}%
\def\@end@parbox{\kern\z@\egroup}%
\else\ifmmode
\let\@begin@parbox\vcenter
\let\@end@parbox\relax
\else
\def\@begin@parbox{$\vcenter}%
\def\@end@parbox{\m@th$}%
\fi\fi\fi
\else\let\box@dir\yoko
\if #2t\relax
\let\@begin@parbox\vtop
\let\@end@parbox\relax
\else\if #2b\relax
\let\@begin@parbox\vbox
\let\@end@parbox\relax
\else\ifmmode
\let\@begin@parbox\vcenter
\let\@end@parbox\relax
\else
\def\@begin@parbox{$\vcenter}%
\def\@end@parbox{\m@th$}%
\fi\fi\fi
\fi\fi}
\def\pbox{\leavevmode\@ifnextchar<{\X@makePbox}{\X@makePbox<Z>}}
\def\X@makePbox<#1>{%
\@ifnextchar[{\@imakePbox<#1>}{\@imakePbox<#1>[-5\p@]}}
\def\@imakePbox<#1>[#2]{\@ifnextchar[%]
{\@iimakePbox<#1>{#2}}{\@iimakePbox<#1>{#2}[c]}}
\def\@iimakePbox<#1>#2[#3]#4{%
\bgroup \@rotswfalse \@pboxswfalse
\iftdir
\if #1y\relax\let\box@dir\yoko
\else\if #1z\relax\@rotswtrue \let\box@dir\relax
\else\let\box@dir\tate
\fi\fi
\else
\if #1t\relax\let\box@dir\tate
\else\let\box@dir\yoko
\fi
\fi
\ifmmode\else\if@rotsw\@pboxswtrue\hbox\bgroup$\fi\fi
\ifdim #2 <\z@ \hbox{\box@dir#4}\else
\hbox to#2{\box@dir
\if #3l\relax\else\hss\fi
#4\relax
\if #3r\relax\else\hss\fi}\fi
\if@pboxsw \m@th$\egroup\fi\egroup}
\def\picture{\@ifnextchar<%>
{\X@picture}{\X@picture<Z>}}
\def\X@picture<#1>(#2,#3){\@ifnextchar(%)
{\@@picture<#1>(#2,#3)}{\@@picture<#1>(#2,#3)(0,0)}}
\newdimen\save@ybaselineshift
\newdimen\save@tbaselineshift
\newdimen\@picwd
\def\@@picture<#1>(#2,#3)(#4,#5){%
\save@ybaselineshift\ybaselineshift
\save@tbaselineshift\tbaselineshift
\iftdir
\if#1y\let\box@dir\yoko
\@picwd=#3\unitlength \@picht=#2\unitlength
\@tempdima=#5\unitlength \@tempdimb=#4\unitlength
\else\let\box@dir\tate
\@picwd=#2\unitlength \@picht=#3\unitlength
\@tempdima=#4\unitlength \@tempdimb=#5\unitlength
\fi
\else
\if#1t\let\box@dir\tate
\@picwd=#3\unitlength \@picht=#2\unitlength
\@tempdima=#5\unitlength \@tempdimb=#4\unitlength
\else\let\box@dir\yoko
\@picwd=#2\unitlength \@picht=#3\unitlength
\@tempdima=#4\unitlength \@tempdimb=#5\unitlength
\fi
\fi
\setbox\@picbox\hbox to\@picwd\bgroup\box@dir
\hskip-\@tempdima\lower\@tempdimb\hbox\bgroup
\ybaselineshift\z@ \tbaselineshift\z@
\ignorespaces}
\def\endpicture{%
\egroup\hss\egroup
\ht\@picbox\@picht \wd\@picbox\@picwd \dp\@picbox\z@
\mbox{\box\@picbox}%
\ybaselineshift\save@ybaselineshift
\tbaselineshift\save@tbaselineshift}
\let\org@put\put
\def\put{\ybaselineshift\z@\tbaselineshift\z@\org@put}
\let\org@line\line
\def\line{\ybaselineshift\z@\tbaselineshift\z@\org@line}
\let\org@vector\vector
\def\vector{\ybaselineshift\z@\tbaselineshift\z@\org@vector}
\let\org@dashbox\dashbox
\def\dashbox{\ybaselineshift\z@\tbaselineshift\z@\org@dashbox}
\let\org@oval\oval
\def\oval{\ybaselineshift\z@\tbaselineshift\z@\org@oval}
\let\org@circle\circle
\def\circle{\ybaselineshift\z@\tbaselineshift\z@\org@circle}
\newif\ifnot@advanceline
\newskip\rensujiskip
\rensujiskip=0.25\chs plus.25zw minus.25zw
\DeclareRobustCommand\rensuji{%
\@ifstar{\not@advancelinetrue\@rensuji}{\@rensuji}}
\def\@rensuji{\@ifnextchar[{\@@rensuji}{\@@rensuji[c]}}
\def\@@rensuji[#1]#2{%
\ifvmode\leavevmode\fi
\ifydir\hbox{#2}\else
\hskip\rensujiskip
\ifnot@advanceline\not@advancelinefalse\else
\setbox\z@\hbox{\yoko#2}%
\@tempdima\ht\z@ \advance\@tempdima\dp\z@
\if #1c\relax\vrule\@width\z@ \@height.5\@tempdima \@depth.5\@tempdima
\else\if #1r\relax\vrule\@width\z@\@height\z@ \@depth\@tempdima
\else\vrule\@width\z@ \@height\@tempdima \@depth\z@
\fi\fi
\fi
\if #1c\relax\hbox to1zw{\yoko\hss#2\hss}%
\else\if #1r\relax\vbox{\hbox to1zw{\yoko\hss#2}}%
\else\vtop{\hbox to1zw{\yoko#2\hss}}%
\fi\fi
\hskip\rensujiskip
\fi}
\let\Rensuji\rensuji
\let\prensuji\rensuji
\def\Kanji#1{\expandafter\@Kanji\csname c@#1\endcsname}
\def\@Kanji#1{\kansuji #1}
\def\kanji{\iftdir\expandafter\kansuji\fi}
\def\boutenchar{\char\euc"A1A2}
\def\bou#1{\ifvmode\leavevmode\fi\@bou#1\end}
\def\@bou#1{%
\ifx#1\end \let\next=\relax
\else
\iftdir\if@rotsw
\hbox to\z@{\vbox to\z@{\boxmaxdepth\maxdimen
\vss\moveleft-0.2zw\hbox{\boutenchar}\nointerlineskip
\hbox{\char\euc"A1A1}}\hss}\nobreak#1\relax
\else
\hbox to\z@{\vbox to\z@{\boxmaxdepth\maxdimen
\vss\moveleft0.2zw\hbox{\yoko\boutenchar}\nointerlineskip
\hbox{\char\euc"A1A1}}\hss}\nobreak#1\relax
\fi\else
\hbox to\z@{\vbox to\z@{%
\vss\moveleft-0.2zw\hbox{\yoko\boutenchar}\nointerlineskip
\hbox{\char\euc"A1A1}}\hss}\nobreak#1\relax
\fi
\let\next=\@bou
\fi\next}
\def\kasen#1{%
\ifydir\underline{#1}%
\else\if@rotsw\underline{#1}\else
\setbox\z@\hbox{#1}\leavevmode\raise.7zw
\hbox to\z@{\vrule\@width\wd\z@ \@depth\z@ \@height.4\p@\hss}%
\box\z@
\fi\fi}
\def\@eqnnum{{\reset@font\rmfamily \normalcolor
\iftdir\raise.25zh\hbox{\yoko(\theequation)}%
\else (\theequation)\fi}}
\def\@thecounter#1{\noexpand\rensuji{\noexpand\arabic{#1}}}
\def\@thmcounter#1{\noexpand\rensuji{\noexpand\arabic{#1}}}
\endinput
%%
%% End of file `plext.sty'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment