sideways threeparttable:使用方程式作为项目来缩短庞大方程式的探索

sideways threeparttable:使用方程式作为项目来缩短庞大方程式的探索

编辑:MWE 已根据要求重新设计。

我尝试threeparttable结合使用sidewaystable来生成一个包含一些庞大方程式的表格。为了提高可读性(见下文定义),我使用参数(C{0}、C{1}、C{2}、C{0})压缩了一些冗长的术语,这些术语在tablenotes表格部分进行了描述。

可读性将所有方程式放在一页纸上,这样就不必跳两页才能理解所有方程式的含义,让人们好奇你是如何创造这个奇迹的

它在编译时出现了一些错误,导致了以下的混乱:

在此处输入图片描述

当然,分项化改变了它的风格。由于使用的选项(如 MWE 中所述),方程大小的大小不一致在某种程度上是不可避免的,但如果大小“标准化”,那就太好了。

本质上,我如何使用 threeparttable 来生成格式整齐的表格,其中的项目只是描述变量的方程式?

欢迎任何帮助!

更新平均能量损失

    \documentclass[11pt,a4paper,twoside,openright]{book}

%** Preamble **
\usepackage[flushleft]{threeparttable}
\usepackage{siunitx}
\usepackage{rotating}
\usepackage{IEEEtrantools}
\usepackage{multirow}
\usepackage{enumitem}
\usepackage{booktabs}

%** End of Preamble **

\begin{document}

\begin{sidewaystable*}[p]
 \begin{threeparttable}
  \caption{Matrix elements of the electric dipole operator $\hat{p}_{0}^{1}$}
   \label{C1-tb8} % should go after \caption
    \sisetup{table-align-text-post=false}
     \setlength\tabcolsep{6pt}
      \begin{tabular*}{\textwidth}{l l}
        \toprule
        {$J', K'$} & {$\langle JKIF \vert \hat{H}_{Q} \vert J'K'IF\rangle$} \\
        \midrule
        $J, K$          & $C_{1}[3K^{2}-J(J+1)]\chi_{0}$\\
        $J, K+1$        & $C_{1}(2K+1)[\frac{3}{2}(2K+1)(J-K)]^{\tfrac{1}{2}}\chi_{-1}$\\
        $J, K+2$        & $C_{1}[\frac{3}{2}(J+K+1)(J+K+2)(J-K)(J-K-1)]^{\tfrac{1}{2}} \chi_{-2}$\\
        $J+1, K$        & $-3C_{2}K[(J+1)^{2}-K^{2}]^{\tfrac{1}{2}}\chi_{0}$\\
        $J+1, K\pm 1$   & $-C_{2}[(J \mp K)(J\pm K+2)(J\pm K+1)]^{\tfrac{1}{2}} \chi_{\mp 1}$\\
        $J+1, K\pm 2$   & $\pm C_{2}[\frac{3}{2}(J \mp K)(J \pm K +1)(J \pm K +2)(J \pm K + 3)]^{\tfrac{1}{2}} \chi_{ \mp 1}$\\
        $J+2, K$        & $3C_{3}[((J+1)^{2}-k^{2})((J+2)^{2})-K^{2}]^{\tfrac{1}{2}}\chi_{0}$\\
        $J+2, K\pm 1$   & $\mp 2C_{3}[\frac{3}{2}(J-K+1)(J+K+1+)(J\pm K +2)(J\pm K +3)]^{\tfrac{1}{2}}\chi_{ \mp 1}$\\
        $J+2, K\pm 1$   & $C_{3}[\frac{3}{2}(J \pm K +1)(J \pm K +2)(J \pm K +3)(J \pm K +4)^{\tfrac{1}{2}}]\chi_{ \mp 2}$\\
      \end{tabular*}
     \begin{tablenotes}\footnotesize\smallskip\raggedright          
    \item[$C_{0}$]$=F(F+1)-I(I+1)-J(J+1)$
    \item[$C_{1}$]$=\tfrac{3C_{0}(C_{0}+1)}{[2I(2I-1)(J+1)(2J-1)(2J+3)][4-I(I+1)J(J+1)]}$
    \item[$C_{2}$]$=\tfrac{F(F+1)-I(I+1)-J(J+2)}{8I(2I-1)J(J+1)(J+2)}[\tfrac{(F+I+J+2)(J+I-F+1)(F+J-I+1)(F+I-J)}{(2J+1)(2J+3)}]^{\tfrac{1}{2}}$
    \item[$C_{3}$]$=\tfrac{1}{16I(2I-1)J(J+1)(J+2)(2J+3)}[\tfrac{(F+I-J)(F+I+J+2)(F+I+J+3)}{(2J+1)(2J+5)}] \times [(I-F+J+1)(I-F+J+2)(F-I+J+1)(F-I+J+2)(F+I-J-1)]^{\tfrac{1}2}$
     \end{tablenotes}
 \end{threeparttable}
\end{sidewaystable*}

答案1

从您的代码片段中,我尝试编写 MWE(最小工作示例),这是一个虽小但完整的文档,它应该可以重现您的问题。

我不会使用threeparttable。相反,tablenotes我建议使用简单的文本和aligned数学环境来计算方程式:

\documentclass{IEEEtran}
\usepackage{rotating}
\usepackage{array, booktabs}
\usepackage{caption}
\usepackage{mathtools}

\begin{document}
\begin{sidewaystable*}[p]
  \caption{Matrix elements of the electric dipole operator $\hat{p}_{0}^{1}$}
   \label{C1-tb8} % should go after \caption
      \begin{tabular*}{\textwidth}{*{2}{>{$}l<{$}}}
        \toprule
J', K'          & \langle JKIF \vert \hat{H}_{Q} \vert J'K'IF\rangle    \\
\midrule
J, K          & C_{1}\bigl[3K^{2}-J(J+1)\bigr]\chi_{0}\\
J, K+1        & C_{1}(2K+1)\bigl[\frac{3}{2}(2K+1)(J-K)\bigr]^{\tfrac{1}{2}}\chi_{-1}\\
J, K+2        & C_{1}\bigl[\frac{3}{2}(J+K+1)(J+K+2)(J-K)(J-K-1)\bigr]^{\tfrac{1}{2}} \chi_{-2}\\
J+1, K        & -3C_{2}K\bigl[(J+1)^{2}-K^{2}\bigr]^{\tfrac{1}{2}}\chi_{0}\\
J+1, K\pm 1   & -C_{2}\bigl[(J \mp K)(J\pm K+2)(J\pm K+1)\bigr]^{\tfrac{1}{2}} \chi_{\mp 1}\\
J+1, K\pm 2   & \pm C_{2}\bigl[\frac{3}{2}(J \mp K)(J \pm K +1)(J \pm K +2)
                                          (J \pm K + 3)\bigr]^{\tfrac{1}{2}} \chi_{ \mp 1}\\
J+2, K        & 3C_{3}\bigl[((J+1)^{2}-k^{2})((J+2)^{2})-K^{2}\bigr]^{\tfrac{1}{2}}\chi_{0}\\
J+2, K\pm 1   & \mp 2C_{3}\bigl[\frac{3}{2}(J-K+1)(J+K+1+)(J\pm K +2)
                                           (J\pm K +3)\bigr]^{\tfrac{1}{2}}\chi_{ \mp 1}\\
J+2, K\pm 1   & C_{3}\bigl[\frac{3}{2}(J \pm K +1)(J \pm K +2)(J \pm K +3)
                                      (J \pm K +4)^{\tfrac{1}{2}}\bigr]\chi_{\mp 2}\\
      \midrule
      \end{tabular*}

Where are:\\[1ex]  
\small  
$\begin{aligned}
    C_{0} & = F(F+1)-I(I+1)-J(J+1)                                  \\
    C_{1} & = \frac{3C_{0}(C_{0}+1)}
                   {[2I(2I-1)(J+1)(2J-1)(2J+3)][4-I(I+1)J(J+1)]}    \\[1ex]
    C_{2} & = \dfrac{F(F+1)-I(I+1)-J(J+2)}{8I(2I-1)J(J+1)(J+2)}
                \biggl[\dfrac{(F+I+J+2)(J+I-F+1)(F+J-I+1)(F+I-J)}
                            {(2J+1)(2J+3)}\biggr]^{\frac{1}{2}}     \\[1ex]
    C_{3} & = \dfrac{1}{16I(2I-1)J(J+1)(J+2)(2J+3)}
                \biggl[\dfrac{(F+I-J)(F+I+J+2)(F+I+J+3)}{(2J+1)(2J+5)}\biggr]\times%
                \biggl[(I-F+J+1)(I-F+J+2)(F-I+J+1)(F-I+J+2)(F+I-J-1)\biggr]^{\tfrac{1}2}
\end{aligned}$
    \end{sidewaystable*}
\end{document}

在此处输入图片描述

答案2

如果您加载geometry,(假设您不使用边注),您的表格可以适合文本宽度,而且无论如何,您不需要threeparttable:只需添加另一行和\multicolumn,并使用来自和来自 的medsize环境。我还借此机会改进了字母索引的放置:nccmathmultlinedmathtoolsχ

\documentclass[11pt, a4paper, twoside, openright]{book}
%% Avoiding extra whitespaces between paragraphs
\raggedbottom
\usepackage{geometry}
% *********************************** Charset & Language *********************************
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
%\usepackage{datetime}
\usepackage[toc,page]{appendix}
\usepackage{verse}
\usepackage{titlesec}
\usepackage{xpatch}
\usepackage{epigraph}

% *********************************** Chemistry *********************************
\usepackage{chemformula}
\usepackage[version=4]{mhchem} % are they incompatible?

% *********************************** SI Units *********************************
\usepackage{siunitx} % use this package module for SI units

% *********************************** Graphics *********************************
%\usepackage{awesomebox} % this package is awesome (lol) but I need to explore it more
\usepackage{rotating}
\usepackage{wrapfig}
\usepackage{graphicx}
\usepackage{fancybox}
\usepackage[tikz]{bclogo}
\usepackage{eso-pic}
%\usepackage{subfigure}

% *********************************** Equations *********************************
\usepackage{IEEEtrantools} % This specifies the IEEEtrantools package for beautiful equations in LaTeX
% \usepackage{l3packages} % for tidy fractions
%\usepackage{physics}
\usepackage{mathtools, nccmath}
\usepackage{nicematrix}

% ********************************** Tables ************************************
\usepackage{multirow}
\usepackage{multicol}
\usepackage{pdflscape}
\usepackage{enumitem}
\usepackage[export]{adjustbox} % for vertical align of image
\usepackage[flushleft]{threeparttable}
\usepackage{booktabs}
\usepackage{afterpage}
\usepackage{caption}
%\usepackage{lipsum}
%\usepackage{tabularx}
\usepackage{tabstackengine}

% *****************************************************************************
% *************************** Bibliography and References ********************
\usepackage[backend=biber,style=chem-angew]{biblatex}
\usepackage{csquotes,xpatch}
\usepackage{linegoal}
% ******************************************************************************
% ************************* User Defined Commands ******************************
% ******************************************************************************
\newcommand{\tn}[1]{\textsuperscript{#1}}
\newcommand{\TN}[1]{\makebox[0pt][l]{\tn{#1}}}

% To set the University Crest at the center of the page
\newcommand\AlCentroPagina[1]{%
\AddToShipoutPicture*{\AtPageCenter{%
\makebox(0,0){\includegraphics%
[width=0.9\paperwidth]{#1}}}}}

% *********** To change the name of Table of Contents / LOF and LOT ************

%\renewcommand{\contentsname}{My Table of Contents}
%\renewcommand{\listfigurename}{My List of Figures}
%\renewcommand{\listtablename}{My List of Tables}

% ********************** TOC depth and numbering depth *************************
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{2}

% ******************************** New Macros **********************************
\newcommand{\dvt}{\dv{}{t}}
\newcommand{\bracket}[3]{\(\langle #1 \lvert #2 \rvert #3 \rangle\)}
\renewcommand{\thechapter}{\Roman{chapter}}

\newcommand{\attrib}[1]{%
    \nopagebreak{\raggedleft\footnotesize #1\par}}
\renewcommand{\poemtitlefont}{\normalfont\large\itshape\centering}

\makeatletter
\newcommand*{\compress}{@minipagetrue}
\makeatother
\begin{document}

\begin{table*}[!htp]
  \caption{Matrix elements of the electric dipole operator $\hat{p}_{0}^{1}$}
   \label{C1-tb8} % should go after \caption
    \sisetup{table-align-text-post=false}
     \setlength\tabcolsep{6pt}
      \begin{tabular*}{\textwidth}{*{2}l}
        \toprule
        {$J', K'$} & {$\langle JKIF \vert \hat{H}_{Q} \vert J'K'IF\rangle$} \\
        \midrule
        $J, K$ & $C_{1}[3K^{2}-J(J+1)]\chi_{0}$\\
        $J, K+1$ & $C_{1}(2K+1)[\frac{3}{2}(2K+1)(J-K)]^{\tfrac{1}{2}}\chi_{_{\scriptstyle -1}}$\\
        $J, K+2$ & $C_{1}[\frac{3}{2}(J+K+1)(J+K+2)(J-K)(J-K-1)]^{\tfrac{1}{2}}\chi_{_{\scriptstyle -2}}$\\
        $J+1, K$ & $-3C_{2}K[(J+1)^{2}-K^{2}]^{\tfrac{1}{2}}\chi_{_{\scriptstyle 0}}$\\
        $J+1, K±1$ & $-C_{2}[(J ∓ K)(J± K+2)(J± K+1)]^{\tfrac{1}{2} \chi_{_{\scriptstyle ∓ 1}}}$\\
        $J+1, K±2$ & $± C_{2}[\frac{3}{2}(J ∓ K)(J ± K +1)(J ± K +2)(J ± K + 3)]^{\tfrac{1}{2}} \chi_{_{\scriptstyle ∓ 1}}$\\
        $J+2, K$ & $3C_{3}[((J+1)^{2}-k^{2})((J+2)^{2})-K^{2}]^{\tfrac{1}{2}}\chi_{_{\scriptstyle 0}}$\\
        $J+2, K±1$ & $∓ 2C_{3}[\frac{3}{2}(J-K+1)(J+K+1+)(J± K +2)(J± K +3)]^{\tfrac{1}{2}}\chi_{_{\scriptstyle ∓ 1}}$\\
        $J+2, K±1$ & $C_{3}[\frac{3}{2}(J ± K +1)(J ± K +2)(J ± K +3)(J ± K +4)^{\tfrac{1}{2}}]\chi_{_{\scriptstyle ∓ 2}}$ \\[2ex]
 \multicolumn{2}{p{\textwidth}}{
{where:}\enspace \smash{\rule[-28.3ex]{0.4pt}{30ex}}\enspace $\begin{medsize}
\begin{aligned}[t]
\text C_{0} & =F(F+1)-I(I+1)-J(J+1)\\[0.5ex]
  C_{1} & =\frac{3C_{0}(C_{0}+1)}{\bigl[2I(2I-1)(J+1)(2J-1)(2J+3)\bigr]\bigl[4-I(I+1)J(J+1)\bigr]} \\[1ex]
  C_{2} &=\begin{multlined}[t] \frac{F(F+1)-I(I+1)-J(J+2)}{8I(2I-1)J(J+1)(J+2)}\times{}\\[-1ex] \biggl[ \frac{(F+I+J+2)(J+I-F+1)(F+J-I+1)(F+I-J)}{(2J+1)(2J+3)}\biggr]^{\tfrac{1}{2}}\end{multlined}\\[1ex]
  C_{3} & =\begin{multlined}[t]\frac{1}{16I(2I-1)J(J+1)(J+2)} \biggl[\frac{(F+I-J)(F+I+J+2)(F+I+J+3)}{(2J+1)(2J+3)(2J+5)}\biggr] ×{}\\[-1ex] \bigl[(I-F+J+1)(I-F+J+2)(F-I+J+1)(F-I+J+2)(F+I-J-1)\bigr]^{\tfrac{1}2}\end{multlined}
\end{aligned}
\end{medsize}$
}
      \end{tabular*}
\end{table*}

\end{document} 

在此处输入图片描述

相关内容