diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-20 22:19:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-20 22:19:52 +0000 |
commit | 18d932604c99399d6fd9d26967b6e9bd2553898b (patch) | |
tree | aaf4a48d30832247931699646404e0653eaf5213 /Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty | |
parent | 4f3f1acc81147436b6d0077d72876be7a20df1e7 (diff) |
xetexko (20mar21)
git-svn-id: svn://tug.org/texlive/trunk@58562 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty')
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty | 169 |
1 files changed, 6 insertions, 163 deletions
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty index 801a238b101..3f40bd697fb 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty @@ -1,6 +1,6 @@ % xetexko-vertical.sty % -% Copyright (c) 2013-2020 Dohyun Kim <nomos at ktug org> +% Copyright (c) 2013-2021 Dohyun Kim <nomos at ktug org> % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3c @@ -10,168 +10,11 @@ % and version 1.3c or later is part of all distributions of LaTeX % version 2006/05/20 or later. -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else - \ProvidesPackage{xetexko-vertical} - [2020/02/17 v2.23 Vertical environment for XeTeX-ko] +\ifdefined\ProvidesPackage + \ProvidesPackage{xetexko-vertical}[2021/03/20 v3.0 A deprecated addendum to XeTeX-ko] + \RequirePackage{xetexko}[2021/03/20] +\else + \input xetexko.sty \fi -% do not veticalize headline/footline -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname selectfont\endcsname\relax % plain - \protected\def\verticaltypesetting{% - \dimen@\hsize\hsize\vsize\vsize\dimen@ - \edef\plainoutput{\unexpanded{\dimen@\hsize\hsize\vsize\vsize\dimen@}% - \unexpanded\expandafter{\plainoutput}}% - \def\pagebody{\setbox\z@\vbox to\hsize{\boxmaxdepth=\maxdepth - \pagecontents}\xetexko@rotatebox\z@\box\z@}% - \maxdepth\z@ \XK@vertical@spacing} -\else % latex - \protected\def\verticaltypesetting{% - \AtBeginDocument{\XK@vertical@spacing}% - \maxdepth\z@ - \dimen@\textwidth - \textwidth\textheight - \textheight\dimen@ - \edef\@outputpage{% - \unexpanded{\xetexko@rotatebox\@outputbox\textwidth\textheight}% - \unexpanded\expandafter{\@outputpage}}% - } - \@onlypreamble\verticaltypesetting -\fi - -\def\xetexko@rotatebox#1{% - \ifvbox#1\count@\@ne\else\count@\z@\fi - \dimen@\wd#1\dimen@ii\dimexpr\ht#1+\dp#1\relax - \setbox#1\ifnum\count@=\@ne - \vbox to\dimen@\bgroup\hbox to\dimen@ii\bgroup\hfil\else - \hbox to\dimen@ii\bgroup\vbox to\dimen@\bgroup\fi - \wd#1\z@ \ht#1\z@ \dp#1\z@ - \special{x:gsave}\special{x:rotate -90}\box#1\special{x:grestore}% - \ifnum\count@=\@ne\egroup\vfil\else\vfil\egroup\hfil\fi\egroup -} - -% users can declare vertical EM size, which might be different from 1em. -\newdimen\verticalem - -\def\XK@vertical@spacing{% - \ifnum\verticalem > \z@ - \def\XK@vert@half@em{.5\verticalem}% - \else - \def\XK@vert@half@em{.5em}% - \fi - \let\xk@horiz@precjkopenparen \precjkopenparen - \let\xk@horiz@precjkcloseparen\precjkcloseparen - \let\xk@horiz@precjkfullstop \precjkfullstop - \ifx\precjkopenparen\relax\else - \def\precjkopenparen {\leavevmode - \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi - \hbox - \ifx\XKdisablecjksymbolspacing\empty - \bgroup - \else - to\XK@vert@half@em \bgroup \hss - \fi - }% - \fi - \ifx\precjkcloseparen\relax\else - \def\precjkcloseparen{\leavevmode - \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi - \hbox - \ifx\XKdisablecjksymbolspacing\empty\else - to\XK@vert@half@em - \fi - \bgroup}% - \fi - \ifx\precjkfullstop\relax\else - \def\precjkfullstop {\leavevmode - \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi - \hbox - \ifx\XKdisablecjksymbolspacing\empty\else - to\XK@vert@half@em - \fi - \bgroup}% - \fi - \spaceskip\XK@vert@half@em plus\XK@vert@half@em\relax - \parindent\XK@vert@half@em \parindent2\parindent -} - -\protected\def\vertical#1{% - \setbox\z@\vbox\bgroup - \hsize=#1% - \leftskip\z@ - \rightskip\z@ - \parindent\z@ - \everypar{}% - \XK@vertical@spacing -} - -\protected\def\endvertical{% - \egroup - \dimen@\dimexpr\ht\z@+\dp\z@\relax - \dimen@ii\dimexpr\wd\z@-\dp\z@\relax - \setbox\z@\hbox{% - \kern\dimexpr\ht\z@+0.5em\relax - \wd\z@\z@ - \ht\z@\z@ - \dp\z@\z@ - \special{x:gsave}% - \special{x:rotate -90}% - \box\z@ - \special{x:grestore}}% - \wd\z@\dimen@ - \ht\z@\z@ - \dp\z@\z@ - \leavevmode - \raise\dimen@ii\box\z@ -} - -% horizontal box inside vertical typesetting -\protected\def\horizontal#1{% - \setbox\z@\vbox\bgroup - \hsize=#1% - \leftskip \z@ - \rightskip\z@ - \parindent\z@ - \everypar {}% - \spaceskip \fontdimen2\font - plus \fontdimen3\font - minus\fontdimen4\font - \ifdefined\xk@horiz@precjkopenparen - \let\precjkopenparen \xk@horiz@precjkopenparen - \let\precjkcloseparen\xk@horiz@precjkcloseparen - \let\precjkfullstop \xk@horiz@precjkfullstop - \fi -} -\protected\def\endhorizontal{% - \egroup - \dimen@\dimexpr\ht\z@+\dp\z@\relax - \dimen@ii\dimexpr\wd\z@+.5ex\relax - \setbox\z@\hbox\bgroup - \wd\z@\z@\ht\z@\z@\dp\z@\z@ - \special{x:gsave}% - \special{x:rotate 90}% - \box\z@ - \special{x:grestore}% - \egroup - \wd\z@\dimen@ - \ht\z@\dimen@ii - \dp\z@\z@ - \fboxsep=-\fboxrule - \leavevmode\lower.5ex\box\z@ -} - -\protected\def\vertlatin#1{\leavevmode\lower0.5ex\hbox{\latinmarks #1}} - \endinput - -%% example: -%\newhangulfontfamily\myvertfont -% [Script=Hangul,Vertical=RotatedGlyphs] -% {HCR Dotum LVT} -%\verticalem=1.05em -%\begin{vertical}{12em}\myvertfont -% 세로쓰기 영역. -% #1 = 세로길이 -%\end{vertical} - |