3

I'm not sure what macrocode environment intends to do with \box\@labels.

  • Initially \box\@labels is void.
  • When macrocode environment ends, it leaves some contents:

    \box15= \hbox(0.0+0.0)x0.0 .\glue 0.0 .\glue 0.0 .\glue -5.0 .\hbox(0.0+0.0)x0.0 .\glue 5.0

  • The content is still there when another list environment (say itemize) starts, and it is thrown away when the first \item appears.

MWE:

% \iffalse
\documentclass{article}
\usepackage{doc}
\begin{document}
  \DocInput{\jobname}
\end{document}
% \fi
%
% \makeatletter
% \tracingonline1
% \showboxdepth10000
% \showboxbreadth10000
%
% \showbox\@labels  ^^A -> void
%
%    \begin{macrocode}
\def\MACRO{}
%    \end{macrocode}
%
% \showbox\@labels  ^^A -> non-void???
%
% \begin{itemize}
% \showbox\@labels  ^^A -> non-void???
% \item a
% \showbox\@labels  ^^A -> void
% \item b
% \showbox\@labels  ^^A -> void
% \end{itemize}
%
% \showbox\@labels  ^^A -> void
%
\endinput

The reason why I'm asking is that we have the following issue in Japanese pLaTeX:

% \iffalse
\documentclass{article}
\usepackage{doc}
\usepackage{plext}
\begin{document}
  \DocInput{\jobname}
\end{document}
% \fi
%
%    \begin{macrocode}
\def\MACRO{}
%    \end{macrocode}
%
% \begin{minipage}<t>{10zw}
% The option `t' starts vertical writing.
% \begin{itemize}
% \item a
% \end{itemize}
% \end{minipage}
%
\endinput

This code generates an error:

! Incompatible direction list can't be unboxed.
\@item ...setbox \@labels \hbox {\unhbox \@labels 
                                                  \hskip \itemindent \hskip ...
l.17 % \item a

? 

because \box\@labels is used inside tate (vertical-writing) but at that time it still contains yoko (horizontal-writing) nodes.

1

0

You must log in to answer this question.

Browse other questions tagged .