在 lyx 中均匀分割多行表的列

在 lyx 中均匀分割多行表的列

我想要一张这样的桌子:

% Preview source code

%% LyX 2.0.6 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[spanish,english]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{lipsum}
\usepackage{array}
\newcolumntype{C}{>{\centering\arraybackslash}m{10em}}
\usepackage{amsmath}

\makeatother

\usepackage{babel}
\addto\shorthandsspanish{\spanishdeactivate{~<>}}

\begin{document}
\selectlanguage{spanish}%
\begin{center}
\begin{table}
\begin{centering}
\begin{tabular}[b]{|c|C|C|C|}
\hline 
Fkrmula & \multicolumn{3}{c|}{$\frac{2\alpha}{\beta+5.4\cos{\left(\pi\gamma\right)}}$}\tabularnewline
\hline 
Error & \multicolumn{3}{c|}{$\sqrt{4\left\lvert {\frac{\Delta_{\alpha}}{\beta+5.4\cos{\left(\pi\gamma\right)}}}\right\rvert ^{2}+4\left\lvert {\frac{\Delta_{\beta}\alpha}{\left(\beta+5.4\cos{\left(\pi\gamma\right)}\right)^{2}}}\right\rvert ^{2}+116.64\pi^{2}\left\lvert {\frac{\Delta_{\gamma}\alpha\sin{\left(\pi\gamma\right)}}{\left(\beta+5.4\cos{\left(\pi\gamma\right)}\right)^{2}}}\right\rvert ^{2}}$ }\tabularnewline
\hline 
Variable & $\beta$ & $\gamma$ & $\alpha$\tabularnewline
\hline 
Valor & $1.02$ & $0.600$ & $5.0$\tabularnewline
\hline 
Error & $0.10$ & $0.006$ & $0.5$\tabularnewline
\hline 
Error en resultado & $2.4$ & $2.3$ & $1.5$\tabularnewline
\hline 
Error total & \multicolumn{3}{c|}{$3.7$}\tabularnewline
\hline 
Resultado & \multicolumn{3}{c|}{$-15\pm4$}\tabularnewline
\hline 
\end{tabular}
\par\end{centering}

\caption{Errores}
\end{table}

\par\end{center}\selectlanguage{english}%

\end{document}

三个小柱子均匀分布。我试过此解决方案,但当我设置正确的宽度参数时,列数才大致相等。问题是我不知道单元格内会有什么(因为表格是自动生成的),也不知道列数,也不想每次都手动设置宽度;也就是说,第二行中的公式可以更长或更短,并且每个表格的 var 列数可以不同。

理想情况下,生成的表应该可以在普通 lyx gui(不是 ERT)中编辑。

另外,我希望公式的垂直间距更大。

相关内容