Lyx wiki 建议,如果我想tabularx
在使用 GUI 构建的表时使用,我可以使用以下序言:
%% Hack by Heiko Oberdiek (on de.comp.text.tex)
\usepackage{tabularx}
%% Redefine the standard table
\let\ORIGtabular\tabular
\let\ORIGendtabular\endtabular
\let\ORIGtabularx\tabularx
\renewcommand*{\tabularx}{%
\def\tabular{%
\let\endtabular\ORIGendtabular
\ORIGtabular
}%
\ORIGtabularx
}
\renewcommand{\tabular}{%
%% The width of the table. Adjust if needed
\tabularx{\linewidth}%
}
\renewcommand{\endtabular}{\endtabularx}
我很喜欢这个tabulary
包,想重现上面的替换,但要用tabulary
代替。但是,简单地用 代替tabularx
上面tabulary
的 不起作用。有没有办法让它起作用,或者 的设计tabulary
与这种替换不兼容?
样本:
%% LyX 2.1.3 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{tabulary}
\makeatother
\usepackage{babel}
\begin{document}
%% Hack by Heiko Oberdiek (on de.comp.text.tex)
%% Redefine the standard table
\let\ORIGtabular\tabular
\let\ORIGendtabular\endtabular
\let\ORIGtabulary\tabulary
\renewcommand*{\tabulary}{%
\def\tabular{%
\let\endtabular\ORIGendtabular
\ORIGtabular
}%
\ORIGtabulary
}
\renewcommand{\tabular}{%
%% The width of the table. Adjust if needed
\tabulary{\linewidth}%
}
\renewcommand{\endtabular}{\endtabulary}
\begin{tabular}{|c|c|c|}
j & fj & j\\
\end{tabular}
\end{document}
错误:[编译 ~/nexo/techinal_notes/HFE_Study/hfe_study.tex]
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Missing number, treated as zero \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Illegal unit of measure (pt inserted) \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Missing number, treated as zero \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Illegal unit of measure (pt inserted) \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Missing number, treated as zero \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Illegal unit of measure (pt inserted) \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 Extra alignment tab has been changed to \cr \end{tabular}
E: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 TeX capacity exceeded, sorry [grouping levels=255] \end{tabular}
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 No suitable columns!
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (10.0pt), resetting to 5.26984pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (5.26984pt), resetting to -5.48495pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-5.48495pt), resetting to -17.75346pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-17.75346pt), resetting to -31.53568pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-31.53568pt), resetting to -46.83159pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-46.83159pt), resetting to -63.6412pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-63.6412pt), resetting to -81.96452pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-81.96452pt), resetting to -101.80154pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-101.80154pt), resetting to -123.15227pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-123.15227pt), resetting to -146.0167pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-146.0167pt), resetting to -170.39482pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-170.39482pt), resetting to -196.28665pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-196.28665pt), resetting to -223.69218pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-223.69218pt), resetting to -252.61142pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-252.61142pt), resetting to -283.04436pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-283.04436pt), resetting to -314.991pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-314.991pt), resetting to -348.45134pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-348.45134pt), resetting to -383.42538pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-383.42538pt), resetting to -419.91313pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-419.91313pt), resetting to -457.91458pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-457.91458pt), resetting to -497.42973pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-497.42973pt), resetting to -538.45859pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-538.45859pt), resetting to -581.00114pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-581.00114pt), resetting to -625.0574pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-625.0574pt), resetting to -670.62737pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-670.62737pt), resetting to -717.71103pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-717.71103pt), resetting to -766.3084pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-766.3084pt), resetting to -816.41946pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-816.41946pt), resetting to -868.04424pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-868.04424pt), resetting to -921.18271pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-921.18271pt), resetting to -975.83488pt
W: /home/brodsky3/nexo/techinal_notes/HFE_Study/hfe_study.tex:48 tymin too large (-975.83488pt), resetting to -1032.00076pt
77 errors, 33 warnings, 0 badboxes
[Finished in 0.25s]
谢谢你!