我在表格中使用多行,在生成 HTML 输出时出现错误“缺少数字,视为零”,PDF 生成正常。可能是什么问题?这是我的示例代码
\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{table}
\centering
\begin{tabular}{|c|c|c|}
Header 1 & Header 2 & Header 3 \\
\multirow{2}{*}{Test} & stuff & stuff \\
& Body 2 & Body 3
\end{tabular}
\end{table}
\end{document}
答案1
软件包multirow
最近更新了,宏的定义tex4ht
已更改。我将发布一个修复程序tex4ht
,但更新将在 TeX 发行版中提供,这需要几天时间。同时,您可以multirow.4ht
在包含 TeX 文件的目录中创建文件,内容如下:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% multirow.4ht 2009-05-21-09:32 %
% Copyright (C) 2004--2009 Eitan M. Gurari %
% %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
% version 1.3c of this license or (at your option) any %
% later version. The latest version of this license is %
% in %
% http://www.latex-project.org/lppl.txt %
% and version 1.3c or later is part of all distributions %
% of LaTeX version 2005/12/01 or later. %
% %
% This work has the LPPL maintenance status "maintained".%
% %
% This Current Maintainer of this work %
% is Eitan M. Gurari. %
% %
% If you modify this program your changing its signature %
% with a directive of the following form will be %
% appreciated. %
% \message{signature} %
% %
% [email protected] %
% http://www.cse.ohio-state.edu/~gurari %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version 2009-05-21-09:32}
\def\@xmultirow[#1]#2[#3]#4[#5]#6{%
\expandafter\multirow@piii#3\relax\end%
\multirow@dima=#2\ht\@arstrutbox
\advance\multirow@dima#2\dp\@arstrutbox
\ifdim#2pt<\z@\multirow@dima=-\multirow@dima\fi
\advance\multirow@dima \multirow@cntb\bigstrutjot
\if*#4\multirow@vbox{#1}{}{\hbox{\strut#6\strut}}%
\else \if=#4\multirow@setcolwidth{#6}%
\multirow@vbox{#1}{\hsize\multirow@colwidth\@parboxrestore}{\strut#6\strut\par}%
\else \multirow@vbox{#1}{\hsize#4\@parboxrestore}{\strut#6\strut\par}%
\fi \fi
\ifdim#2pt>\z@
\if#1t\relax\multirow@dima=\ht0\else
\multirow@dima=\ht\@arstrutbox
\ifmultirow@prefixt \advance\multirow@dima\bigstrutjot\fi
\if#1b\relax \advance\multirow@dima\dp\@arstrutbox
\ifmultirow@prefixb \advance\multirow@dima\bigstrutjot\fi
\fi
\fi
\else
\if#1b\relax\else
\advance\multirow@dima-\dp\@arstrutbox
\ifmultirow@prefixb \advance\multirow@dima-\bigstrutjot\fi
\if#1t\relax\advance\multirow@dima-\ht\@arstrutbox
\ifmultirow@prefixt \advance\multirow@dima-\bigstrutjot\fi
\advance\multirow@dima\ht0
\fi
\fi
\fi
\advance\multirow@dima#5\relax
\leavevmode\a:multirow
\setbox0\vtop{\vskip-\multirow@dima\box0\vss}\dp0=\z@
\ifmultirowdebug{\showboxdepth=5 \showboxbreadth=10 \showbox0}\fi
\box0\b:multirow
}
\NewConfigure{multirow}{2}
\Hinput{multirow}
\endinput
结果如下: