我将以下输入输入到 doxygen ->生成乳胶(这是简单的 CANVAS 板):
@section book_canvas CANVAS analysis
<center><table>
<tr><th colspan="2">Key Partners<th colspan="2">Key Activities<th colspan="2">Value Propositions<th colspan="2">Customer Relationship<th colspan="2">Customer Segment
<tr><td colspan="2" rowspan="3">Test<td colspan="2">Test<td colspan="2" rowspan="3">Test<td colspan="2">Test<td colspan="2" rowspan="3">Test
<tr><th colspan="2">Key Resources<th colspan="2">Channels
<tr><td colspan="2">Test<td colspan="2">Test
<tr><th colspan="5">Cost Structure<th colspan="5">Revenue Streams
<tr><td colspan="5">Test<td colspan="5">Test
</table></center>
生成如下内容:
\begin{center}\tabulinesep=1mm
\begin{longtabu} spread 0pt [c]{*{10}{|X[-1]}|}
\hline
\rowcolor{\tableheadbgcolor}\multicolumn{2}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Key Partners}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Key Activities}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Value Propositions}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Customer Relationship}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Customer Segment }}\\\cline{1-10}
\endfirsthead
\hline
\endfoot
\hline
\rowcolor{\tableheadbgcolor}\multicolumn{2}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Key Partners}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Key Activities}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Value Propositions}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Customer Relationship}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Customer Segment }}\\\cline{1-10}
\endhead
\multicolumn{2}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\multirow{3}{\linewidth}{Test}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{Test}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\multirow{3}{\linewidth}{Test}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{Test}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\multirow{3}{\linewidth}{Test }}\\\cline{3-4}\cline{7-8}
\rowcolor{\tableheadbgcolor}\multicolumn{2}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Key Resources}}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Channels }}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}\\\cline{3-4}\cline{7-8}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{Test}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{Test }&\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}\\\cline{1-10}
\rowcolor{\tableheadbgcolor}\multicolumn{5}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*2)*5/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Cost Structure}}&\multicolumn{5}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*2)*5/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Revenue Streams }}\\\cline{1-10}
\multicolumn{5}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*2)*5/10}|}{Test}&\multicolumn{5}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*2)*5/10}|}{Test }\\\cline{1-10}
\end{longtabu}
\end{center}
当我在其上运行 latex make.bat 时,我得到:
(./book.tex [5] (c:/texlive/2018/texmf-dist/tex/latex/wasysym/uwasy.fd)
(c:/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd)
(c:/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd)
! Misplaced \omit.
\multispan ->\omit
\@multispan
l.58 \end{longtabu}
当使用 HTML 时,输出看起来很好。
我该如何修复它?
答案1
您没有提供可用的测试文档,但是当我添加一些猜测的定义时,如果我注释掉,它就会起作用\rowcolor
。\rowcolor
应该在那个位置工作,并且在longtable
,但tabu
似乎在某处改变了定义。
\documentclass{article}
\usepackage{longtable,tabu,calc,colortbl,multirow}
\newcommand\tableheadbgcolor{red}
\begin{document}
\begin{longtable}{*{10}{|l|}|}
\hline
\rowcolor{\tableheadbgcolor}%
\multicolumn{2}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Key Partners}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Key Activities}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Value Propositions}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Customer Relationship}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Customer Segment }}\\\cline{1-10}
\endfirsthead
\hline
\endfoot
\hline
\rowcolor{yellow}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Key Partners}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Key Activities}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Value Propositions}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Customer Relationship}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Customer Segment }}\\\cline{1-10}
\endhead
\multicolumn{2}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{
\multirow{3}{\linewidth}{Test}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{Test}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{
\multirow{3}{\linewidth}{Test}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{Test}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*5)*2/10}|}{
\multirow{3}{\linewidth}{Test }}\\\cline{3-4}\cline{7-8}
\rowcolor{\tableheadbgcolor}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Key Resources}}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Channels }}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}\\\cline{3-4}\cline{7-8}
\multicolumn{2}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{Test}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{Test }&
\multicolumn{2}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*3)*2/10}|}{}\\\cline{1-10}
\rowcolor{\tableheadbgcolor}
\multicolumn{5}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*2)*5/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Cost Structure}}&
\multicolumn{5}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*2)*5/10}|}{\cellcolor{\tableheadbgcolor}\textbf{ Revenue Streams }}\\\cline{1-10}
\multicolumn{5}{|p{(\linewidth-\tabcolsep*10-\arrayrulewidth*2)*5/10}|}{Test}&
\multicolumn{5}{p{(\linewidth-\tabcolsep*10-\arrayrulewidth*2)*5/10}|}{Test }\\\cline{1-10}
\end{longtable}
\end{document}