如何避免方程式接触表格中的 h 线

如何避免方程式接触表格中的 h 线

我在表格中列出了很长的方程式,我想避免这些方程式接触表格水平线。我为此使用了 struts,但第一行似乎 struts 无法正常工作。以下是我的 Latex 代码

\documentclass[fleqn,preprint,10pt]{elsarticle}
\usepackage{hyperref}
\hypersetup{pdfstartview={XYZ null null 1.00}}%to get pdf zoomed to 100%
\usepackage{amsmath}
\usepackage{breqn}%to automaticaly break math equation using \begin{dmath}.........\end{dmath}
\newcommand{\quotes}[1]{``#1''}%for adding double quotes like "quotes"
\newtheorem{thm}{Theorem}[section]% various theorems, numbered by section
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{cor}[thm]{Corollary}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{rem}[thm]{Remark}
\newtheorem{case}{Case}
\newtheorem{red}{Reduction}
\usepackage{caption}
\usepackage{makecell}%this package can be used to create new line within table cell using \makecell{line 1 \\ line2}
\usepackage{chngcntr}%for changing counter
    \usepackage{chngcntr}%for changing counter
    \counterwithin{case}{red}%number given to case within reduction, for this \usepackage{chngcntr} is necessary
    \counterwithin{red}{section}
    \numberwithin{equation}{section}% equations can be numbered within section
    \journal{Acta Applicandae Mathematicae}
    \usepackage{hyperref}
    \hypersetup{
         colorlinks   = true,
         citecolor    = gray
    }%to assign color to hyperlink
    \usepackage[margin=1in,left=0.75in,right=0.75in]{geometry}
    \usepackage{natbib}
    \biboptions{numbers,sort&compress}
    \usepackage{url}
    %\usepackage{pdfsync}
    \usepackage{srcltx}
    \usepackage{mathrsfs}%for cursive font
    \begin{document}
    \begin{flushleft}
      \resizebox{\textwidth}{!}{
      \newcommand\T{\rule{0pt}{3.6ex}} % Top strut
    \newcommand\B{\rule[-3.6ex]{0pt}{0pt}} % Bottom strut
    \begin{tabular}{c|c|c}
         \hline\hline
         Element $w_{i}$ in 1--dimensional sub--algebra $\Theta_{1}$\T\B&Nor$\left(w_{i}\right)$&$\mathscr{H}\left(w_{i}, w\right)\left(w\in\text{Nor}\left(w_{i}\right)/w_{i}\right)$\\
         \hline\hline
         $w_{1}=\,a_{3}V_{3}+a_{9}V_{9}+a_{10}V_{10}+V_{11}$ \T\B&$\begin{aligned}&\frac{2a_{9}^2}{(a_{3}-a_{10})(a_{3}-2a_{10})}V_{1}+a_{3}V_{3}+\frac{a_{9}}{a_{3}-a_{10}}V_{7}+\frac{a_{3}a_{9}}{a_{3}-a_{10}}V_{9}+V_{11},\\ &\frac{2a_{9}^{2}}{a_{10}(a_{3}-a_{10})(a_{3}-2a_{10})}V_{1}+\frac{a_{9}}{a_{10}(a_{3}-a_{10})}V_{7}+\frac{a_{9}}{a_{3}-a_{10}}V_{9}-V_{10}\end{aligned}$\T\B&$\begin{aligned}\mathscr{H}_{1}\left(w_{1}, \frac{2a_{9}^2}{(a_{3}-a_{10})(a_{3}-2a_{10})}V_{1}+a_{3}V_{3}+\frac{a_{9}}{a_{3}-a_{10}}V_{7}+\frac{a_{3}a_{9}}{a_{3}-a_{10}}V_{9}+V_{11}\right),\\\mathscr{H}_{1}^{\prime}\left(w_{1},
         \frac{2a_{9}^{2}}{a_{10}(a_{3}-a_{10})(a_{3}-2a_{10})}V_{1}+\frac{a_{9}}{a_{10}(a_{3}-a_{10})}V_{7}+\frac{a_{9}}{a_{3}-a_{10}}V_{9}-V_{10} \right)\end{aligned}$\T\B\\
         \hline
         $w_{2}=\,a_{3}V_{3}+V_{10}$&$V_{3}, V_{10}$\T\B&$\mathscr{H}_{2}(w_{2}, V_{3})$\\
         \hline
         $w_{3}=a_{{2}}V_{{2}}+V_{{3}}+a_{{5}}V_{{5}}+a_{{8}}V_{{8}}+a_{{9}}V_{{9}}+V_{{10}}$\T\B&$V_{3}+V_{10}, \frac{a_{2}}{a_{9}}V_{2}+\frac{a_{2}a_{5}-a_{2}a_{8}-2a_{8}a_{9}}{a_{2}a_{9}}V_{5}+V_{9}, \frac{a_{2}+2a_{9}}{a_{2}}V_{5}+V_{8},V_{4}$&$\mathscr{H}_{3}\left(w_{3}, V_{4}\right)$\\
         \hline
         $w_{4}=V_{{3}}+a_{{4}}V_{{4}}+a_{{5}}V_{{5}}+a_{{8}}V_{{8}}+a_{{9}}V_{{9}}+V_{{10}}$\T\B&$V_{5}, V_{4}, V_{3}+V_{10}, \frac{a_{8}}{a_{9}}V_{8}+V_{9}$&{Null}\\
         \hline
         $w_{5}=\frac{1}{2}V_{3}+a_{6}V_{6}+V_{10}$\T\B&$\frac{1}{3}V_{3}+V_{10}, V_{6}$&{Null}\\
         \hline
         $w_{6}=a_{{1}}V_{{1}}+2\,V_{{3}}+V_{{10}}$\T\B&$2V_{3}+V_{10}, V_{1}$&Null\\
         \hline
         $w_{7}=a_{3}V_{3}+V_{7}$\T\B&$V_{3}, V_{7}$&{Null}\\
         \hline
         $w_{8}=V_{2}+a_{5}V_{5}+a_{6}V_{6}+V_{9}$\T\B&$a_{5}V_{4}+3V_{5}+V_{8}+a_{6}V_{11},V_{2}+a_{5}V_{5}+a_{6}V_{6}+V_{9}, 3V_{4}+a_{6}V_{7}, V_{1}$&$\mathscr{H}_{8}^{(1)}\left(w_{1},a_{5}V_{4}+3V_{5}+V_{8}+a_{6}V_{11}\right), \mathscr{H}_{8}^{(2)}\left(w_{1},3V_{4}+a_{6}V_{7}\right), \mathscr{H}_{8}^{(3)}\left(w_{1},V_{1}\right)$\\
         \hline
         $w_{9}=a_{4}V_{4}+a_{5}V_{5}+a_{6}V_{6}+a_{8}V_{8}+V_{9}$\T\B&$(a_{5}a_{8}-a_{4})V_{4}-a_{6}V_{6}+a_{6}a_{8}V_{11}, a_{4}V_{4}+a_{6}V_{6}+a_{8}V_{8}+V_{9}, 2V_{4}+a_{6}V_{7}, V_{5}, V_{1}$&$\begin{aligned}&\mathscr{H}_{9}^{(1)}\left(w_{1},(a_{5}a_{8}-a_{4})V_{4}-a_{6}V_{6}+a_{6}a_{8}V_{11}\right), \mathscr{H}_{9}^{(2)}\left(w_{1}, a_{4}V_{4}+a_{6}V_{6}+a_{8}V_{8}+V_{9}\right),\\ &\mathscr{H}_{9}^{(3)}\left(w_{1}, 2V_{4}+a_{6}V_{7}\right), \mathscr{H}_{9}^{(4)}\left(w_{1}, V_{5}\right), \mathscr{H}_{9}^{(5)}\left(w_{1}, V_{1}\right)\end{aligned}$\\
         \hline
    \end{tabular}}\captionof{table}{Two dimensional sub--algebra from normalizer.}\label{table3}
    \end{flushleft}
    \end{document}

答案1

如果没有放大镜的话,你的方程式就无法读懂……

但这显然不是问题所在。为了使方程式至少稍微大一点,我建议减少列间距,省略表格开头和结尾的空格。此外,支柱 T 和 B 仅在一行中有方程式的行中产生影响,可以通过增加 来简单地替换\arraystretch。使用array而不是tabular环境可以进一步简化您的 MWE。这样您就不必在每个方程式上写$符号了。

因此,要解决您的问题,剩下两个单元格。在以下环境中添加空行似乎是最简单的方法aligned

\begin{aligned}
        ~\\[-2ex]    % <--- added empty line
        &\frac{2a_{9}^2}{(a_{3}-a_{10})(a_{3}-2a_{10})}V_{1}+a_{3}V_{3}+\frac{a_{9}}{a_{3}-a_{10}}V_{7}+\frac{a_{3}a_{9}}{a_{3}-a_{10}}V_{9}+V_{11},\\ &\frac{2a_{9}^{2}}{a_{10}(a_{3}-a_{10})(a_{3}-2a_{10})}V_{1}+\frac{a_{9}}{a_{10}(a_{3}-a_{10})}V_{7}+\frac{a_{9}}{a_{3}-a_{10}}V_{9}-V_{10}
        \\[-2ex]~   % <--- added empty line
        \end{aligned}

通过上述措施我获得:

在此处输入图片描述

完整的相关代码为:

\documentclass[fleqn,preprint,10pt]{elsarticle}
    \usepackage[margin=1in,left=0.75in,right=0.75in,showframe]{geometry}
    \usepackage{srcltx}
    \usepackage{mathrsfs}%for cursive font
\usepackage{amsmath}
\usepackage{breqn}%to automaticaly break math equation using \begin{dmath}.........\end{dmath}
\usepackage{caption}
\usepackage{makecell}%this package can be used to create new line within table cell using \makecell{line 1 \\ line2}
\usepackage{hyperref}
\hypersetup{
    pdfstartview={XYZ null null 1.00},%to get pdf zoomed to 100% 
    colorlinks   = true,
    citecolor    = gray
    }%to assign color to hyperlink

    \begin{document}
\begin{flushleft}
      \resizebox{\textwidth}{!}{
\newcommand\T{\rule{0pt}{3.6ex}} % Top strut
\newcommand\B{\rule[-3.6ex]{0pt}{0pt}} % Bottom strut
    \renewcommand{\arraystretch}{2}%1.2
    \setlength{\tabcolsep}{3pt}
$    \begin{array}{@{}l|l|l@{}}
         \hline\hline
\text{Element } w_{i} \text{ in 1--dimensional sub--algebra} \Theta_{1}
    &   \text{Nor}\left(w_{i}\right)
        &   \mathscr{H}\left(w_{i}, w\right)\left(w\in\text{Nor}\left(w_{i}\right)/w_{i}\right)\\
         \hline\hline
w_{1}=\,a_{3}V_{3}+a_{9}V_{9}+a_{10}V_{10}+V_{11}
    &   \begin{aligned}
        ~\\[-2ex]
        &\frac{2a_{9}^2}{(a_{3}-a_{10})(a_{3}-2a_{10})}V_{1}+a_{3}V_{3}+\frac{a_{9}}{a_{3}-a_{10}}V_{7}+\frac{a_{3}a_{9}}{a_{3}-a_{10}}V_{9}+V_{11},\\ &\frac{2a_{9}^{2}}{a_{10}(a_{3}-a_{10})(a_{3}-2a_{10})}V_{1}+\frac{a_{9}}{a_{10}(a_{3}-a_{10})}V_{7}+\frac{a_{9}}{a_{3}-a_{10}}V_{9}-V_{10}
        \\[-2ex]~
        \end{aligned}
    &   \begin{aligned}\mathscr{H}_{1}\left(w_{1},
            \frac{2a_{9}^2}{(a_{3}-a_{10})(a_{3}-2a_{10})}V_{1}+a_{3}V_{3}+\frac{a_{9}}{a_{3}-a_{10}}V_{7}+\frac{a_{3}a_{9}}{a_{3}-a_{10}}V_{9}+V_{11}\right),\\\mathscr{H}_{1}^{\prime}\left(w_{1},
         \frac{2a_{9}^{2}}{a_{10}(a_{3}-a_{10})(a_{3}-2a_{10})}V_{1}+\frac{a_{9}}{a_{10}(a_{3}-a_{10})}V_{7}+\frac{a_{9}}{a_{3}-a_{10}}V_{9}-V_{10}\right)
         \end{aligned}\\
         \hline
w_{2}=\,a_{3}V_{3}+V_{10}
    &   V_{3}, V_{10}&\mathscr{H}_{2}(w_{2}, V_{3})\\
         \hline
w_{3}=a_{{2}}V_{{2}}+V_{{3}}+a_{{5}}V_{{5}}+a_{{8}}V_{{8}}+a_{{9}}V_{{9}}+V_{{10}}
    &   V_{3}+V_{10}, \frac{a_{2}}{a_{9}}V_{2}+\frac{a_{2}a_{5}-a_{2}a_{8}-2a_{8}a_{9}}{a_{2}a_{9}}V_{5}+V_{9}, \frac{a_{2}+2a_{9}}{a_{2}}V_{5}+V_{8},V_{4}
        &   \mathscr{H}_{3}\left(w_{3}, V_{4}\right)\\
         \hline
w_{4}=V_{{3}}+a_{{4}}V_{{4}}+a_{{5}}V_{{5}}+a_{{8}}V_{{8}}+a_{{9}}V_{{9}}+V_{{10}}
    &   V_{5}, V_{4}, V_{3}+V_{10}, \frac{a_{8}}{a_{9}}V_{8}+V_{9}
        &   {Null}\\
         \hline
w_{5}=\frac{1}{2}V_{3}+a_{6}V_{6}+V_{10}
    &   \frac{1}{3}V_{3}+V_{10}, V_{6}
        &   {Null}\\
         \hline
w_{6}=a_{{1}}V_{{1}}+2\,V_{{3}}+V_{{10}}
    &   2V_{3}+V_{10}, V_{1}
        &   Null    \\
         \hline
w_{7}=a_{3}V_{3}+V_{7}
    &   V_{3}, V_{7}&{Null}\\
         \hline
w_{8}=V_{2}+a_{5}V_{5}+a_{6}V_{6}+V_{9}
    &   a_{5}V_{4}+3V_{5}+V_{8}+a_{6}V_{11},V_{2}+a_{5}V_{5}+a_{6}V_{6}+V_{9}, 3V_{4}+a_{6}V_{7}, V_{1}
        &   \mathscr{H}_{8}^{(1)}\left(w_{1},a_{5}V_{4}+3V_{5}+V_{8}+a_{6}V_{11}\right), \mathscr{H}_{8}^{(2)}\left(w_{1},3V_{4}+a_{6}V_{7}\right), \mathscr{H}_{8}^{(3)}\left(w_{1},V_{1}\right)\\
         \hline
w_{9}=a_{4}V_{4}+a_{5}V_{5}+a_{6}V_{6}+a_{8}V_{8}+V_{9}
    &   (a_{5}a_{8}-a_{4})V_{4}-a_{6}V_{6}+a_{6}a_{8}V_{11}, a_{4}V_{4}+a_{6}V_{6}+a_{8}V_{8}+V_{9}, 2V_{4}+a_{6}V_{7}, V_{5}, V_{1}
        &   \begin{aligned}
            ~\\[-2ex]
            &\mathscr{H}_{9}^{(1)}\left(w_{1},(a_{5}a_{8}-a_{4})V_{4}-a_{6}V_{6}+a_{6}a_{8}V_{11}\right), \mathscr{H}_{9}^{(2)}\left(w_{1}, a_{4}V_{4}+a_{6}V_{6}+a_{8}V_{8}+V_{9}\right),\\ &\mathscr{H}_{9}^{(3)}\left(w_{1}, 2V_{4}+a_{6}V_{7}\right), \mathscr{H}_{9}^{(4)}\left(w_{1}, V_{5}\right), \mathscr{H}_{9}^{(5)}\left(w_{1}, V_{1}\right)
            \\[-2ex]~
            \end{aligned}\\
         \hline
    \end{array}$
}
\captionof{table}{Two dimensional sub--algebra from normalizer.}
    \label{table3}
\end{flushleft}
    \end{document}

如您所见,我还将列类型从 更改cl。这给出了我更喜欢的形式,并且对方程式的垂直间距没有任何影响。

编辑: 除了上述解决方案之外,还有更多可能的替代方案。例如:

  • 不要使用垂直线,而是\hline使用\toprule,\midrule\bottomrule来自booktabs

  • 而是array使用带有或行和或列类型的mdwtab包。hlx{vhv}\hlx{vvhvv}McMl

在这种情况下,您不需要在多行方程中使用空行。

相关内容