如何将方程式写入表格而不溢出?

如何将方程式写入表格而不溢出?

我正在尝试制作一个嵌入方程式、项目符号等的表格。这是我现在所拥有的: 在此处输入图片描述

我的问题是,如何让关键方程式很好地适应内部,而不会溢出?此外,在缺点部分,我看到“敏感”和“优化”这两个词之间有很大差距。另外,正如您所见,“Integral Loquation Fine-Dining”(这没有任何意义)偏离了中心。我该如何解决这个问题?此外,如何在 \align 内对齐方程式?在表格环境中使用 & 会导致麻烦。

我希望方程式嵌套在里面,并向左对齐,并且旋转的文本在其框中适当居中。

我将非常感激您为我提供的任何建议。这是我目前拥有的代码。

\documentclass[12pt]{article}

\setlength{\oddsidemargin}{0in}  %left margin position, reference is one inch
\setlength{\textwidth}{6.5in}    %width of text=8.5-1in-1in for margin
\setlength{\topmargin}{-0.5in}    %reference is at 1.5in, -.5in gives a start of about 1in from top
\setlength{\textheight}{9in}     %length of text=11in-1in-1in (top and bot. marg.) 

\usepackage{amsmath,amssymb, mathtools}
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{enumitem}


\begin{document}


\renewcommand{\baselinestretch}{1.0}
\begin{small}
\begin{center}
%\caption{\label{T:Summary}Table 1. Summary of bottom-up parameterization techniques used for polymer coarse-graining.}
\resizebox{\columnwidth}{!}{
\footnotesize
    \begin{tabular}{
    | m{\dimexpr.06\linewidth-2\tabcolsep-1.3333\arrayrulewidth} 
    | m{\dimexpr.5\linewidth-2\tabcolsep-1.3333\arrayrulewidth} 
    | m{\dimexpr.2\linewidth-2\tabcolsep-1.3333\arrayrulewidth} 
    | m{\dimexpr.22\linewidth-2\tabcolsep-1.3333\arrayrulewidth} 
    | m{\dimexpr.22\linewidth-2\tabcolsep-1.3333\arrayrulewidth} |}
    \cline{2-5}
     \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{\textbf{Key Equation(s)}} & \multicolumn{1}{c|}{\textbf{Key Inputs}} & 
     \multicolumn{1}{c|}{\textbf{Advantages}} &
     \multicolumn{1}{c|}{\textbf{Disadvantages}} \\
     \cline{2-5}  \hline 
    \rotatebox[origin=c]{90}{\parbox[c]{1.25in}{ \centering \textbf{Relative \\  Tomfoolery}}} &
    \parbox[c]{0.28\linewidth}{
    \begin{align*}
    T_{\rm rel} = \beta \left\langle A_\text{GG} - B_\text{FF}\right\rangle_\text{FF} -\beta(A_\text{GG} - A_\text{GG}) + \langle T_{\rm map} \rangle  _{AA}
    \end{align*}
    
    }& 
    \begin{itemize}[leftmargin=*]
    \item \ldots 
    \item \ldots 
    \end{itemize}&
    \begin{itemize}[leftmargin=*]
        \item \ldots
        \item \ldots
    \end{itemize} 
    & 
    \begin{itemize}[leftmargin=*]
        \item Sensitive optimization 
    \end{itemize} \\ 
    \hline 
    \rotatebox[origin=c]{90}{\parbox[c]{1.5in}{ \centering \textbf{Integral Loquation Fine-Dining}}} 
    &
    \begin{align*}
    \hat{a}_{ee}(k)=  \frac{n_b^2 \hat{q}_{mm}(0) \left[\hat{\mu}_{bm}(k) \right]^2}{1 + v_{m}\rho_{m} \hat{\lambda}_{mm}(0) \hat{\zeta}_{mm}(k)} \\ 
    \hat{\nu}_{bb}(k)=  
    \frac{\hat{j}_{bb}(k)}{n_{b} \hat{\zeta}_{bh}(k) \left[ n_{b} \hat{\omega}_{bb}(k) + \rho_{b} \hat{y}_{bb}(k) \right] } 
    \end{align*}\newline&
    \begin{itemize}[leftmargin=*]
        \item \ldots
        \item \ldots
        \item \ldots 
    \end{itemize} &
    \begin{itemize}[leftmargin=*]
        \item \ldots
        \item \ldots 
    \end{itemize}
    &
    \begin{itemize}[leftmargin=*]
        \item \ldots 
        \item \ldots 
    \end{itemize} \\ 
    \hline 
    \end{tabular} }
\end{center}
\end{small}
\renewcommand{\baselinestretch}{1.5}

\normalsize


\end{document}

答案1

在此处输入图片描述

我添加了内联评论,还有其他几个可以做出的选择。

\documentclass[12pt]{article}

\setlength{\oddsidemargin}{0in}  %left margin position, reference is one inch
\setlength{\textwidth}{6.5in}    %width of text=8.5-1in-1in for margin
\setlength{\topmargin}{-0.5in}    %reference is at 1.5in, -.5in gives a start of about 1in from top
\setlength{\textheight}{9in}     %length of text=11in-1in-1in (top and bot. marg.) 

\usepackage{amsmath,amssymb, mathtools}
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{enumitem}


\begin{document}


\renewcommand{\baselinestretch}{1.0}
% better to use \small (or here \footnotesize as you have already
\begin{center}
%\caption{\label{T:Summary}Table 1. Summary of bottom-up parameterization techniques used for polymer coarse-graining.}
% never scale tables it inroduces inconsistent sizes and invalidates teh previous small and following \footnotesize
%%\resizebox{\columnwidth}{!}{
\footnotesize
\setlength\extrarowheight{2pt}
% 6 vertical rules distributed over 5 columns 1.2 not 1.333
% and this adds up to way more than \linewidth
    \begin{tabular}{@{}
    | m{\dimexpr.08\linewidth-2\tabcolsep-1.2\arrayrulewidth} 
    | m{\dimexpr.42\linewidth-2\tabcolsep-1.2\arrayrulewidth} 
    | m{\dimexpr.17\linewidth-2\tabcolsep-1.2\arrayrulewidth} 
    | m{\dimexpr.17\linewidth-2\tabcolsep-1.2\arrayrulewidth} 
    | m{\dimexpr.17\linewidth-2\tabcolsep-1.2\arrayrulewidth} |@{}}
    \cline{2-5}
     \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{\textbf{Key Equation(s)}} & \multicolumn{1}{c|}{\textbf{Key Inputs}} & 
     \multicolumn{1}{c|}{\textbf{Advantages}} &
     \multicolumn{1}{c|}{\textbf{Disadvantages}} \\
     \cline{2-5}  \hline 
    \rotatebox[origin=c]{90}{\hspace{5pt}\textbf{\begin{tabular}[b]{c}Relative \\  Tomfoolery\end{tabular}}} &
% this parbox is doing nothing useful an m column is already a parbox    \parbox[c]{0.28\linewidth}{
    \begin{multline*}
    T_{\mathrm{rel}} % \rm has not been defined by default in latex since 1993 {\rm rel}
    % use \mathrm not \text in the following as well
 = \beta \left\langle A_\mathrm{GG} - B_\mathrm{FF}\right\rangle_\mathrm{FF}\\{} -\beta(A_\mathrm{GG} - A_\mathrm{GG}) + \langle T_{\rm map} \rangle  _{AA}
    \end{multline*}
    
    & 
    \begin{itemize}[leftmargin=*]
    \item \ldots 
    \item \ldots 
    \end{itemize}&
    \begin{itemize}[leftmargin=*]
        \item \ldots
        \item \ldots
    \end{itemize} 
    & 
    \begin{itemize}[leftmargin=*]
        \item Sensitive optimization 
    \end{itemize} \\ 
    \hline 
    \rotatebox[origin=c]{90}{\hspace{5pt}\textbf{\begin{tabular}[b]{c}Integral Loquation\\ Fine-Dining\end{tabular}}} 
    &
% extra braces to guard th einner alignment (I don't think they should be needed, hmm)
   {\begin{align*}
    \hat{a}_{ee}(k) &=  \frac{n_b^2 \hat{q}_{mm}(0) \left[\hat{\mu}_{bm}(k) \right]^2}{1 + v_{m}\rho_{m} \hat{\lambda}_{mm}(0) \hat{\zeta}_{mm}(k)} \\ 
    \hat{\nu}_{bb}(k)&=  
    \frac{\hat{j}_{bb}(k)}{n_{b} \hat{\zeta}_{bh}(k) \left[ n_{b} \hat{\omega}_{bb}(k) + \rho_{b} \hat{y}_{bb}(k) \right] } 
    \end{align*}}
% never have \newline or \\ after a math display \newline
&
    \begin{itemize}[leftmargin=*]
        \item \ldots
        \item \ldots
        \item \ldots 
    \end{itemize} &
    \begin{itemize}[leftmargin=*]
        \item \ldots
        \item \ldots 
    \end{itemize}
    &
    \begin{itemize}[leftmargin=*]
        \item \ldots 
        \item \ldots 
    \end{itemize} \\ 
    \hline 
    \end{tabular}
\end{center}


\renewcommand{\baselinestretch}{1.5}

% not needed, already normalsize \normalsize


\end{document}

相关内容