Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

横ディレクション中の縦組の表の \multicolumn #17

Closed
aminophen opened this issue Aug 19, 2016 · 0 comments
Closed

横ディレクション中の縦組の表の \multicolumn #17

aminophen opened this issue Aug 19, 2016 · 0 comments
Labels

Comments

@aminophen
Copy link
Member

これは @y-yu さんが Qiita に投稿していらしたものです。

\documentclass{jarticle}
\usepackage{plext}
\begin{document}

\begin{tabular}<t>{|l|c|r|}
\hline
\multicolumn{3}{|c|}{セル1}\\ \hline
\multicolumn{2}{|c|}{セル2} & セル3 \\ \hline
セル4 & セル5 & セル6 \\ \hline
\end{tabular}

\end{document}

これを処理するとエラーが出ます:

Incompatible direction list can't be unboxed.
\@arstrut ...strutbox \else \unhcopy \@arstrutbox 
                                                  \fi 
l.7 \multicolumn{3}{|c|}{セル1}
                               \\ \hline
? 

私は、これが plext のバグのような気がします。

plext.sty を調べてみると

\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\hbox{\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}

という定義があります。なぜか「縦ディレクションでなく、かつ #1t の場合」だけ \hbox に入れてあって(上の ??? を付けた部分)、これをやめると正常に通ります。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant