
tabularx
新版本的套件會2014/04/22 v2.09
產生錯誤,程式碼如下,之前編譯沒有錯誤:
\documentclass{article}
\usepackage{array}
\usepackage{tabularx}
\def\myfooA{\tabularx{\linewidth}{|X|}}
\def\myfooB{\endtabularx}
\newenvironment{myfoo}{\myfooA}{\myfooB}
\begin{document}
\begin{myfoo}
Test
\end{myfoo}
\end{document}
我確實需要\myfooA
和\myfooB
對於我的應用程序,所以我不能\tabularx
直接在環境定義中使用(這將適用於新tabularx
版本)。
我該如何改變\myfooA
並\myfooB
與之合作\tabularx 2.09
?
附錄: 以下是停止工作的應用程式的 MWE:
\documentclass{article}
\usepackage{array}
\usepackage{tabularx}
\usepackage[table]{xcolor}
\usepackage{tcolorbox}
\begin{document}
\begin{tcolorbox}[tabularx={X},title=My table]
Group
\end{tcolorbox}
\end{document}
更新:David Carlisle 使用 tabularx v2.10 解決了這個問題
答案1
tabularx
正如 LariFari 所指出的,它需要樂觀地閱讀文件才能表明它以前應該可以工作,或者現在可以工作,但以前確實可以工作,所以我傾向於認為這是在2.09中不起作用的錯誤
latex/required/tools
已在 ctan 上更新為 tabularx 2.10,再次允許這種用法。
我正在刪除最初發佈在這裡的解決方法,因為它只需要幾天,而且不是那麼強大。