我[1ex]
在 a 中包含了间距命令,并尝试使用( )tabular
转换为 ODT 。但它不起作用。tex4ht
make4ht -f odt file
\documentclass{article}
\begin{document}
\begin{tabular}{lll}
one & two & three \\[1ex]
1 & 2 & 3
\end{tabular}
\end{document}
Java 解释器(我认为)给出了这个错误消息,并且从此一切都变得混乱:
org.xml.sax.SAXParseException; lineNumber: 59; columnNumber: 8;
The entity "nbsp" was referenced, but not declared.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1239)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
at xtpipes.Xtpipes.execute(Xtpipes.java:1300)
at xtpipes.Xtpipes.execute(Xtpipes.java:783)
handler="xtpipes.util.ScriptsManagerLH" > : While parsing file file:/tmp/tex/convert.tmp: : org.xml.sax.SAXParseException; lineNumber:
59; columnNumber: 8; The entity "nbsp" was referenced, but not declared.
--- Warning --- System return: 256
加载booktabs
包并使用\addlinespace
做转换成功。
答案1
问题是,表格中垂直空间的配置插入了 
不间断空间的实体。此实体未在 ODT xml 中声明,从而导致错误Xtpipes
。我将在 中修复此问题tex4ht
,同时您可以使用以下配置文件myconfig.cfg
:
\Preamble{xhtml}
\Configure{HBorder}
{<table:table-row \Hnewline table:style-name="hline-row">%
}
{<table:table-cell table:style-name="hline-cell"
table:value-type="string">%
<text:p text:style-name="hline-p-hr" />%
</table:table-cell>\Hnewline
}
{</table:table-row>\Hnewline
}
{<table:table-row\Hnewline table:style-name="cline-row">\Hnewline
}
{<table:table-cell table:style-name="cline-cell">%
<text:p text:style-name="cline-p" />%
</table:table-cell>\Hnewline
}
{<table:table-cell table:style-name="cline-cell">%
<text:p text:style-name="cline-p-hr" />%
</table:table-cell>\Hnewline
}
{</table:table-row>\Hnewline
}
{<tr\Hnewline class="vspace-si-delas" style="font-size-grr:\HBorderspace">%
}
{<td\Hnewline>\string&\csname :sharp\endcsname xA0;</td>%
}
{</tr>%
}
\begin{document}
\EndPreamble
此配置插入 
实体,应该没问题。使用以下方法编译:
make4ht -f odt -c myconfig.cfg file
LO 中的结果: