如何格式化方程描述?

如何格式化方程描述?

等式后的一小段代码

  \begin{tabbing}    
    where \= $fTTsc$:~  traveling time (office to site and back to office).\\
           \>$fTIsc$:~time to get safety instructions (this is specially true in \\
          \>\; industrial environment)\\
           \>$fSNETtsc$:~setting up survey network.\\                   
    \end{tabbing}

关于代码

我如何使用 tab 或其他东西,以便(第 1 行旅行,第 2 行时间,第 3 行环境)呈垂直排列。

where   
     fTTsc:     traveling time (office to site and back to office).

     fTIsc:     time to get safety instructions (this is specially true in 
                industrial environment)

     fSNETtsc:  setting up survey network. 

我正在手动分解(这花费了 15 个句子很多时间)但如何自动完成以使其看起来完美且美观。

time to get safety instructions (this is specially true in \\
          \>\; industrial environment)\\

答案1

悄悄窃取此答案(点击)

\documentclass[preview,border=12pt,12pt]{standalone} % change it back to your own document class
%\documentclass[12pt]{article}
\usepackage{array,tabularx}

\newenvironment{conditions*}
  {\par\vspace{\abovedisplayskip}\noindent
   \tabularx{\columnwidth}{>{$}l<{$} @{${}={}$} >{\raggedright\arraybackslash}X}}
  {\endtabularx\par\vspace{\belowdisplayskip}}

\begin{document}

An equation just to start
\begin{equation}
        fTTsc+ fTIsc + fSNEtsc = 0
\end{equation}
where:
\begin{conditions*}
        fTTsc       &   traveling time (office to site and back to office)\\
        fTIsc       &   time to get safety instructions (this is specially true in industrial environment) \\
        fSNETtsc    &   setting up survey network
\end{conditions*}

\end{document}

在此处输入图片描述

答案2

这里有两种方法可以做到——根据真实数据、方程式等进行调整。

        \documentclass[ a4paper]{article}

        \usepackage[utf8]{inputenc}
        \usepackage[T1]{fontenc}
        \usepackage{lmodern}
        \usepackage[showframe, nomarginpar]{geometry} 
        \usepackage{array, mathtools}

        \begin{document}
        \[ \text{Some more or less complex equation, } \]%
        where:  \begin{tabular}[t]{!{\vrule width0.8pt}>{$ }l<{$}@{\ }l@{}}
        fTTsc:  & traveling time (office to site and back to office).\\
         fTIsc:   &    \parbox[t]{0.5\textwidth}{time to get safety instructions (this is specially true in
                    industrial environment)}\\
         fSNETtsc: &   setting up survey network.
         \end{tabular}
         \vskip 2ex

         \begin{align*}
         \text{Some}  & \enspace \text{more or less complex equation} \\
           \text{where: } &\mathrlap{ \begin{alignedat}[t]{2}
         fTTsc: & \   & &  \text{traveling time (office to site and back to office) }\\
         fTIsc:   & &    &     \parbox[t]{0.42\textwidth}{time to get safety instructions (this is specially true in industrial environment)} \\
          fSNETtsc: & &    &   \text{setting up survey network.}
         \end{alignedat}}\\
         \text{Another} &\quad\text{somewhat more complex equation}
         \end{align*}

        \end{document}​

在此处输入图片描述

答案3

当我遇到这个问题时,我写了一个包eqexpl(自 2018 年 11 月 14 日起,该功能可在 CTAN 上使用)。您可以使用它添加序言

\usepackage{eqexpl}
\eqexplSetIntro{where} % set parenthesis in the left of the first item
\eqexplSetDelim{:} % set delimiter to ":"

然后在文档中

\begin{eqexpl}
  \item{fTTsc}traveling time (office to site and back to office).
  \item{fTIsc}time to get safety instructions
    (this is specially true in industrial environment)
  \item{fSNETtsc}setting up survey network. 
\end{eqexpl}

括号只能设置在项目的左侧,而不是上方,在这种情况下您可以保留其默认值(无)并在环境前手动添加“where”。

相关内容