使用 \begin{description} 使标签在同一行开始

使用 \begin{description} 使标签在同一行开始

我想使用 \begin{description} 制作描述列表,并将长标签对齐到同一起点。

\begin{description}[leftmargin= 1.27cm, labelwidth=6cm]
    \item[h_{\mathrm{obs}_i}] : the cleaned and corrected ISSH measurements of i\textsuperscript{th} along-track point..
    \item[i] : the index for every satellite pass's co-located observation point time series.
    \item[h_{0i}] : the averaged sea surface heights of i\textsuperscript{th} along-track point.
    \item[h_{1i} t_j] : the trend part (linear sea level change).
    \item[h_{2i}cos(\omega_1 \cdot t_j)+h_{3i}sin(\omega_1 \cdot t_j)] : annual ocean variability signals.
    \item[h_{4i}cos(\omega_2 \cdot t_j)+h_{5i}sin(\omega_2 \cdot t_j)] : semiannual ocean variability signals.
    \item[\omega_1 \; \text{and}\;\omega_2] : the angular frequencies for annual and semiannual variations $\omega_1 = 2\pi/12$ and $\omega_2=2\pi/6$ respectively.
    \item[t_j] : the time difference between observation and reference epoch time $t_j=t_i-t_0$.
    \item[s] : the number of the selected satellite missions,
    \item[b_k] : the bias term, $k = (1, 2, 3, \cdots, s)$. 
    \end{description}

我的代码产生以下结果:

在此处输入图片描述

但是我想要的是以下结果:

在此处输入图片描述

答案1

正如@daleif 所说,请提供完整的 MWE。

您可以通过leftmargin正确设置来实现这一点。这是我在以下几行中所做的:

\documentclass{article}
\usepackage{enumitem,mathtools}

\newlength\mylabelwidth
\setlength\mylabelwidth{6cm}
\newlength\myleftmargin
\settowidth\myleftmargin{: }
\addtolength\myleftmargin\mylabelwidth
\addtolength\myleftmargin\labelsep

\begin{document}
    \begin{description}[leftmargin=\myleftmargin, labelwidth=\mylabelwidth]
        \item[$h_{\mathrm{obs}_i}$]: the cleaned and corrected ISSH measurements of i\textsuperscript{th} along-track point..
        \item[$i$] : the index for every satellite pass's co-located observation point time series.
        \item[$h_{0i}$] : the averaged sea surface heights of i\textsuperscript{th} along-track point.
        \item[$h_{1i} t_j$] : the trend part (linear sea level change).
        \item[$h_{2i}\cos(\omega_1 \cdot t_j)+h_{3i}\sin(\omega_1 \cdot t_j)$] : annual ocean variability signals.
        \item[$h_{4i}\cos(\omega_2 \cdot t_j)+h_{5i}\sin(\omega_2 \cdot t_j)$] : semiannual ocean variability signals.
        \item[$\omega_1 \; \text{and}\;\omega_2$] : the angular frequencies for annual and semiannual variations $\omega_1 = 2\pi/12$ and $\omega_2=2\pi/6$ respectively.
        \item[$t_j$] : the time difference between observation and reference epoch time $t_j=t_i-t_0$.
        \item[$s$] : the number of the selected satellite missions,
        \item[$b_k$] : the bias term, $k = (1, 2, 3, \cdots, s)$. 
    \end{description}
\end{document}

我想补充一点,我不太喜欢你描述中的冒号。由于你的描述是按对齐方式排版的,因此空格可能会被放大,这样你就无法让每行完全对齐,请参见倒数第二行:“the”比“missions”更靠右。

结果

因此我建议删除冒号并将长度规范更改为

\newlength\mylabelwidth
\setlength\mylabelwidth{6cm}
\newlength\myleftmargin
\setlength\myleftmargin{\dimexpr\mylabelwidth+\labelsep\relax}

相关内容