diff options
Diffstat (limited to 'Master/texmf-dist/source/platex/base/ascmac.dtx')
-rw-r--r-- | Master/texmf-dist/source/platex/base/ascmac.dtx | 176 |
1 files changed, 111 insertions, 65 deletions
diff --git a/Master/texmf-dist/source/platex/base/ascmac.dtx b/Master/texmf-dist/source/platex/base/ascmac.dtx index 6a9c2458cf2..b9f06627127 100644 --- a/Master/texmf-dist/source/platex/base/ascmac.dtx +++ b/Master/texmf-dist/source/platex/base/ascmac.dtx @@ -8,25 +8,11 @@ % % \fi % -% \CheckSum{830} -% \CharacterTable -% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} % % \iffalse % +% 2016/08/21 v2.0c +% - Support pdfLaTeX, XeLaTeX and LuaLaTeX. % 2016/04/15 v2.0b % - Simplify \@keytop. % 2016/03/13 v2.0a @@ -76,7 +62,7 @@ %</driver> %<tascmac>\ProvidesPackage{tascmac} %<ascmac>\ProvidesPackage{ascmac} - [2016/04/15 v2.0b + [2016/08/21 v2.0c %<driver|tascmac> ascmac package (community edition) %<ascmac> ascmac wrapper (community edition) ] @@ -98,7 +84,7 @@ % % \section{$B$O$8$a$K(B} % -% \textsf{ascmac}$B%Q%C%1!<%8$O!"(Bp\LaTeXe{}$B$NI8=`5!G=$NHO0O$G!"?^$d7S@~$G(B +% \textsf{ascmac}$B%Q%C%1!<%8$O!"(B\LaTeXe{}$B$NI8=`5!G=$NHO0O$G!"?^$d7S@~$G(B % $B0O$s$@%\%C%/%9$r=PNO$9$kL?Na$J$I$rDs6!$7$^$9!#(B\textsf{ascmac}$B%Q%C%1!<%8(B % $B$N<BBN$O(B\textsf{tascmac}$B%Q%C%1!<%8$G$9$,!"$3$l$O$b$H$b$H8E$$(Bp\LaTeX{}$B$G(B % $BG[I[$5$l$F$$$?2#AH@lMQ(B\textsf{ascmac}$B%Q%C%1!<%8$H!"$=$l$r=DAH$KBP1~$5$;(B @@ -108,6 +94,7 @@ % $B$+$iGI@8$7$F!"F|K\8l(B\TeX{}$B3+H/%3%_%e%K%F%#$K$h$C$F3+H/$5$l$F$$$k%P!<%8%g%s(B % $B$N$?$a$K?7$?$K=q$+$l$^$7$?!#%3%_%e%K%F%#HG$G$O!"%*%j%8%J%k$N%"%9%-!<HG$N(B % $B%3!<%I$r85$K!"$$$/$D$+$N%P%0=$@5$HB>$N%Q%C%1!<%8$H$N8_49@-$r2~A1$7$^$7$?!#(B +% $B$^$?!"(Bv2.0c$B0J9_$G$O(Bpdf\LaTeX{}$B$J$I$N%(%s%8%s$b%5%]!<%H$7$^$7$?!#(B % % \section{$B;H$$$+$?(B} % @@ -128,11 +115,11 @@ % $B%\%C%/%9%N!<%H4D6-$G$9!#(B % \end{boxnote} % $B$O!"0J2<$NF~NO$+$iF@$i$l$^$9!#(B -% \begin{verbatim} +%\begin{verbatim} % \begin{boxnote} % $B%\%C%/%9%N!<%H4D6-$G$9!#(B % \end{boxnote} -% \end{verbatim} +%\end{verbatim} % % \DescribeEnv{screen} % |screen| $B4D6-$O!";M6y$,4]$$0O$_OH$NCf$K%F%-%9%H$rF~$l$^$9!#(B @@ -147,14 +134,14 @@ % $B;M6y$,4]$$0O$_OH$G$9!#(B % \end{screen} % $B$O!"0J2<$NF~NO$+$iF@$i$l$^$9!#(B -% \begin{verbatim} +%\begin{verbatim} % \begin{screen} % $B;M6y$,4]$$0O$_OH$G$9!#(B % \end{screen} % \begin{screen}[4] % $B;M6y$,4]$$0O$_OH$G$9!#(B % \end{screen} -% \end{verbatim} +%\end{verbatim} % % \DescribeEnv{itembox} % |itembox| $B4D6-$O(B |screen| $B4D6-$K;w$F$$$^$9$,!">eC<$N7S@~$N$H$3$m$K%?%$%H%k(B @@ -165,11 +152,11 @@ % $B9`L\%\%C%/%9$G$9!#(B % \end{itembox} % $B$O!"0J2<$NF~NO$+$iF@$i$l$^$9!#(B -% \begin{verbatim} +%\begin{verbatim} % \begin{itembox}[l]{$B%?%$%H%k(B} % $B9`L\%\%C%/%9$G$9!#(B % \end{itembox} -% \end{verbatim} +%\end{verbatim} % % \DescribeEnv{shadebox} % |shadebox| $B4D6-$O!"1FIU$-%\%C%/%9$NCf$K%F%-%9%H$rF~$l$^$9!#(B @@ -179,11 +166,11 @@ % $B1FIU$-$N%\%C%/%9$G$9!#(B % \end{shadebox} % $B$O!"0J2<$NF~NO$+$iF@$i$l$^$9!#(B -% \begin{verbatim} +%\begin{verbatim} % \begin{shadebox} % $B1FIU$-$N%\%C%/%9$G$9!#(B % \end{shadebox} -% \end{verbatim} +%\end{verbatim} % % \subsection{$BLV3]$1L?Na(B} % @@ -214,9 +201,9 @@ % \mask{$BLV3]$1Nc(B1}{A} \hfil \mask{$BLV3]$1Nc(B2}{C} % \end{center} % $B$O!"0J2<$NF~NO$+$iF@$i$l$^$9!#(B -% \begin{verbatim} +%\begin{verbatim} % \mask{$BLV3]$1Nc(B1}{A} \hfil \mask{$BLV3]$1Nc(B2}{C} -% \end{verbatim} +%\end{verbatim} % % \DescribeMacro{\maskbox} % |\maskbox| $BL?Na$O(B5$B$D$N0z?t$r;}$A!"$=$l$>$l%\%C%/%9$NI}!"9b$5!"(B @@ -227,9 +214,9 @@ % \maskbox{25em}{4em}{E}{c}{$BI}$r;XDj$7$?LV3]$1%\%C%/%9(B} % \end{center} % $B$O!"0J2<$NF~NO$+$iF@$i$l$^$9!#(B -% \begin{verbatim} +%\begin{verbatim} % \maskbox{25em}{4em}{E}{c}{$BI}$r;XDj$7$?LV3]$1%\%C%/%9(B} -% \end{verbatim} +%\end{verbatim} % % \DescribeMacro{\Maskbox} % |\Maskbox| $BL?Na$O(B |\maskbox| $BL?Na$HF1MM$N0z?t$r;}$A$^$9$,!"LV3]$1$r$9$kFbMF$N(B @@ -240,9 +227,9 @@ % \Maskbox{30em}{4em}{A}{c}{1pt}{$BI}$r;XDj$7$?7S@~IU$-LV3]$1%\%C%/%9(B} % \end{center} % $B$O!"0J2<$NF~NO$+$iF@$i$l$^$9!#(B -% \begin{verbatim} +%\begin{verbatim} % \Maskbox{30em}{4em}{A}{c}{1pt}{$BI}$r;XDj$7$?7S@~IU$-LV3]$1%\%C%/%9(B} -% \end{verbatim} +%\end{verbatim} % % \subsection{$B$=$NB>$NL?Na(B} % @@ -295,37 +282,75 @@ %</ascmac> % \end{macrocode} % -% \textsf{tascmac}$B%Q%C%1!<%8$NF0:n>r7o$O!"(Bp\LaTeXe{}$B$G$9!#(B +% $B=>Mh!"(B\textsf{tascmac}$B%Q%C%1!<%8$NF0:n>r7o$O!"(Bp\LaTeXe{}$B$G$7$?!#(B +% $B$7$+$7!"(Bcommunity edition$B$G$O!"%P!<%8%g%s(Bv2.0c$B0J9_$G$[$+$N%(%s%8%s$b(B +% $B%5%]!<%H$9$k$3$H$K$7$^$7$?!#(B % \begin{macrocode} %<*tascmac> %% -%% Actually `tascmac' requires pLaTeX2e, but LuaTeX-ja can handle the -%% code properly; so \NeedsTeXFormat{LaTeX2e} on purpose. -%% Check is included below: +%% Originally `ascmac' and `tascmac' can be used only in +%% pLaTeX, upLaTeX or LuaLaTeX with LuaTeX-ja support. +%% We (texjporg) started to support other engines, such as +%% pdfLaTeX, XeLaTeX and LuaLaTeX (even without LuaTeX-ja). %% +\newif\ifascmac@ptex \ascmac@ptextrue \ifx\kanjiskip\@undefined \@ifpackageloaded{luatexja}{% \PackageInfo{tascmac}{% Patch from LuaTeX-ja will be applied}% }{% - \PackageError{tascmac}{% - `ascmac' and `tascmac' can be used only in pLaTeX,\MessageBreak - upLaTeX or LuaLaTeX with LuaTeX-ja support.\MessageBreak - Consider using `bxascmac' instead.\MessageBreak - See https://github.com/zr-tex8r/BXptool for detail}{}% + \PackageInfo{tascmac}{% + Assuming pdfLaTeX, XeLaTeX or LuaLaTeX}% + \ascmac@ptexfalse }% \fi % \end{macrocode} % +% (u)p\LaTeXe{}$B$H(BLua\TeX-ja$B0J30$r%5%]!<%H$9$k$?$a$N%H%j%C%/$G$9!#(B +% $B!V(BQ$B!W$H$$$&J8;z$N%+%F%4%j!<%3!<%I$r$3$N%Q%C%1!<%8$rFI$s$G$$$k4V$@$1(B +% $BJQ99$7!"(B(u)p\LaTeXe{}$B$^$?$O(BLua\TeX-ja$B$G$OL5;k$9$kJ8;z$K!"$=$l0J30$G$O(B +% $B%3%a%s%HJ8;z!J(B|%|$B$HF1$8!K$K$7$^$9!#(B +% \changes{2016/08/21}{v2.0c}{pdf\LaTeX{}$B$J$I$r%5%]!<%H(B} +% \begin{macrocode} +\chardef\ascmac@q@catcode=\catcode`\Q\relax +\ifascmac@ptex + \catcode`\Q=9\relax +\else + \catcode`\Q=14\relax +\fi +% \end{macrocode} +% +% pdf\LaTeX{}$B$d(BLua\LaTeX{}$B$N%W%j%_%F%#%V$r;H$C$F!"(Bascgrp$B$N(BType1$B%U%)%s%H$r(B +% $B;HMQ$G$-$k$h$&$K@_Dj$7$^$9!#(B +% \changes{2016/08/21}{v2.0c}{pdf\LaTeX{}$B$G(Bascgrp$B$N(BType1$B%U%)%s%H$r;HMQ(B} +% \begin{macrocode} +%% +%% Use Type1 font for ascgrp (pdfLaTeX, LuaLaTeX) +\ifascmac@ptex\else + \ifdefined\pdfextension + % LuaTeX (>=0.85) + \pdfextension mapline{+ascgrp <ascgrp.pfb} + \pdfextension mapline{+ascii10 <ascii10.pfb} + \pdfextension mapline{+ascii36 <ascii36.pfb} + \else\ifdefined\pdfmapline + % pdfTeX, LuaTeX (<=0.81) + \pdfmapline{+ascgrp <ascgrp.pfb} + \pdfmapline{+ascii10 <ascii10.pfb} + \pdfmapline{+ascii36 <ascii36.pfb} + \fi\fi +\fi +% \end{macrocode} +% % \begin{macro}{\@savetbaselineshift} % \begin{macro}{\@saveybaselineshift} % |\tbaselineshift| $B$H(B |\ybaselineshift| $B$r0l;~B`Hr$9$k$?$a$N=`Hw$G$9!#(B +% \changes{2016/08/21}{v2.0c}{$BDj5A:Q$_$N>l9g$O$"$($FDj5A$7$J$$$h$&$K$7$?(B} % \begin{macrocode} %% %% ascmac.sty 10/28 '88 %% ASCII special macros -\newdimen\@savetbaselineshift -\newdimen\@saveybaselineshift +Q \ifx\@savetbaselineshift\@undefined \newdimen\@savetbaselineshift \fi +Q \ifx\@saveybaselineshift\@undefined \newdimen\@saveybaselineshift \fi %% % \end{macrocode} % \end{macro} @@ -365,8 +390,8 @@ % |boxnote| $B4D6-$rDj5A$7$^$9!#(B % \begin{macrocode} \def\boxnote{\par\vspace{.3\baselineskip}% - \@saveybaselineshift\ybaselineshift\ybaselineshift\z@ - \@savetbaselineshift\tbaselineshift\tbaselineshift\z@ +Q \@saveybaselineshift\ybaselineshift\ybaselineshift\z@ +Q \@savetbaselineshift\tbaselineshift\tbaselineshift\z@ \setbox\@nbox=\hbox{\@ascgrp\vrule width1.08pt depth35pt b\hss a\hss b} \@whiledim \wd\@nbox<\hsize \do{ \setbox\@nbox=\hbox{\@ascgrp\unhbox\@nbox \hss a\hss b}} @@ -374,7 +399,8 @@ \vrule width1.08pt depth35pt} \@bw=\wd\@nbox\advance\@bw -40pt \begin{lrbox}{\@nbody}\begin{minipage}{\@bw}% (KN:1998/02/27) - \ybaselineshift\@saveybaselineshift \tbaselineshift\@savetbaselineshift}% +Q \ybaselineshift\@saveybaselineshift \tbaselineshift\@savetbaselineshift +}% % \end{macrocode} % % \begin{macrocode} @@ -404,8 +430,8 @@ % |screen| $B4D6-$rDj5A$7$^$9!#(B % \begin{macrocode} \def\screen{% - \@saveybaselineshift\ybaselineshift \ybaselineshift\z@ - \@savetbaselineshift\tbaselineshift \tbaselineshift\z@ +Q \@saveybaselineshift\ybaselineshift \ybaselineshift\z@ +Q \@savetbaselineshift\tbaselineshift \tbaselineshift\z@ \@ifnextchar[{\@screen}{\@screen[0]}} % \end{macrocode} % @@ -421,7 +447,8 @@ \def\@r{4}\def\@s{1.8pt}\def\@sx{2pt}\fi \par\vspace{.3\baselineskip}\@scw\linewidth \advance\@scw -\@r pt \setbox\scb@x=\hbox to\@scw\bgroup\begin{minipage}{\@scw}% (KN:1998/02/27) - \ybaselineshift\@saveybaselineshift \tbaselineshift\@savetbaselineshift}% +Q \ybaselineshift\@saveybaselineshift \tbaselineshift\@savetbaselineshift +}% % \end{macrocode} % % \begin{macrocode} @@ -453,17 +480,18 @@ % \begin{macrocode} \def\itembox{\@ifnextchar[{\@itembox}{\@itembox[c]}} \def\@itembox[#1]#2{% - \@saveybaselineshift\ybaselineshift\ybaselineshift\z@ - \@savetbaselineshift\tbaselineshift\tbaselineshift\z@ +Q \@saveybaselineshift\ybaselineshift\ybaselineshift\z@ +Q \@savetbaselineshift\tbaselineshift\tbaselineshift\z@ \par\vspace{.3\baselineskip}% \setbox\@iboxstr=\hbox{% - \ybaselineshift\@saveybaselineshift \tbaselineshift\@savetbaselineshift #2}% +Q \ybaselineshift\@saveybaselineshift \tbaselineshift\@savetbaselineshift + #2}% \@itemh\ht\@iboxstr\advance\@itemh\dp\@iboxstr \vspace{.5\@itemh}\bgroup\@scw\linewidth \advance\@scw-20pt\@iboxpos={#1}% \setbox\scb@x=\hbox to\@scw\bgroup\begin{minipage}{\@scw}% - \ybaselineshift\@saveybaselineshift - \tbaselineshift\@savetbaselineshift% (KN:1998/02/27) +Q \ybaselineshift\@saveybaselineshift +Q \tbaselineshift\@savetbaselineshift% (KN:1998/02/27) \vspace*{.5\@itemh}}% % \end{macrocode} % @@ -490,10 +518,11 @@ %% \keytop \def\keytop{\@ifnextchar[{\@keytop}{\@keytop[d]}} \def\@keytop[#1]#2{% - {\setbox0=\hbox{\shortstack{#2}}\ybaselineshift\z@\tbaselineshift\z@% + {\setbox0=\hbox{\shortstack{#2}}% +Q \ybaselineshift\z@ \tbaselineshift\z@ \dimen0=\wd0\advance\dimen0 5pt\dimen1=\dp0\advance\dimen1 2.5pt% \setbox\scscb@x=\hbox to\dimen0{% - \iftdir\tate\else\yoko\fi +Q \iftdir\tate\else\yoko\fi \@scw\wd0\hfil\vtop{\offinterlineskip \thinlines\setlength{\unitlength}{1pt}\hrule\kern2.3pt\@hobox{tl}{tr}5% \kern-2.4pt\box0\@hobox{bl}{br}5\kern-.4pt\hrule}\hfil}% @@ -515,7 +544,8 @@ % $B1_5-9f$G$9!#(B % \begin{macrocode} %% \yen -\def\yen{\leavevmode\hbox{\iftdir\yoko\fi +\def\yen{\leavevmode\hbox{% +Q \iftdir\yoko\fi \setbox0=\hbox{Y}Y\kern-.97\wd0\vbox{\hrule height.1ex width.98\wd0 \kern.33ex\hrule height.1ex width.98\wd0\kern.45ex}}} % \end{macrocode} @@ -527,8 +557,12 @@ % $B2~9T5-9f$G$9!#(B % \begin{macrocode} %% return-key -\def\return{\leavevmode\hbox{\iftdir\yoko\fi\@ascgrp\char"20}} -\def\Return{\leavevmode\hbox{\iftdir\yoko\fi\@ascgrp @}} +\def\return{\leavevmode\hbox{% +Q \iftdir\yoko\fi + \@ascgrp\char"20}} +\def\Return{\leavevmode\hbox{% +Q \iftdir\yoko\fi + \@ascgrp @}} %% % \end{macrocode} % \end{macro} @@ -548,7 +582,9 @@ % |\mask| $BL?Na$rDj5A$7$^$9!#(B % \begin{macrocode} \def\mask#1#2{{\setbox\@bwsp=\hbox{#1}% - \setbox0=\hbox{\ybaselineshift\z@\tbaselineshift\z@ \@ascgrp#2}% + \setbox0=\hbox{% +Q \ybaselineshift\z@\tbaselineshift\z@ + \@ascgrp#2}% \dimen0=\wd\@bwsp\dimen1=\ht\@bwsp\advance\dimen1\dp\@bwsp\dimen2=-\dimen1 \setdim@{\dimen0}{\wd0}\setdim@{\dimen1}{\ht0}% \setbox\@@bwsp=\hbox to\dimen0{\leaders @@ -573,7 +609,9 @@ % |\maskbox| $BL?Na$H(B |\Maskbox| $BL?Na$rDj5A$7$^$9!#(B % \begin{macrocode} \def\Maskbox#1#2#3#4#5#6{{% - \setbox0=\hbox{\ybaselineshift\z@\tbaselineshift\z@ \@ascgrp#3}% + \setbox0=\hbox{% +Q \ybaselineshift\z@\tbaselineshift\z@ + \@ascgrp#3}% \dimen0=#1\@setdim{\dimen0}{\wd0}\dimen1=#2\@setdim{\dimen1}{\ht0}% \ifx#4c\skip0=0pt plus1fil\skip1=\skip0\fi \ifx#4r\skip0=0pt plus1fil\skip1=0pt\fi @@ -601,12 +639,13 @@ % |shadebox| $B4D6-$rDj5A$7$^$9!#(B % \begin{macrocode} \def\shadebox{\par\vspace{.3\baselineskip}% - \@saveybaselineshift\ybaselineshift\ybaselineshift\z@ - \@savetbaselineshift\tbaselineshift\tbaselineshift\z@ +Q \@saveybaselineshift\ybaselineshift\ybaselineshift\z@ +Q \@savetbaselineshift\tbaselineshift\tbaselineshift\z@ \dimen0\linewidth \advance\dimen0-20pt \advance\dimen0-2\fboxrule \advance\dimen0-\shaderule \setbox\@tempboxa=\hbox\bgroup\minipage{\dimen0}% - \ybaselineshift\@saveybaselineshift \tbaselineshift\@savetbaselineshift} +Q \ybaselineshift\@saveybaselineshift \tbaselineshift\@savetbaselineshift +} % \end{macrocode} % % \begin{macrocode} @@ -621,10 +660,17 @@ \vrule width\wd0 height0pt depth\shaderule\hskip-\shaderule \vrule width\shaderule height\dimen0}} %% -%</tascmac> % \end{macrocode} % \end{environment} % +% $B%H%j%C%/$K;HMQ$7$?!V(BQ$B!W$H$$$&J8;z$N%+%F%4%j!<%3!<%I$r85$KLa$7$^$9!#(B +% \changes{2016/08/21}{v2.0c}{pdf\LaTeX{}$B$J$I$r%5%]!<%H(B} +% \begin{macrocode} +\catcode`\Q=\ascmac@q@catcode\relax +%% +%</tascmac> +% \end{macrocode} +% % \Finale % \endinput |