我如何正确对齐列表中的各个部分?

我如何正确对齐列表中的各个部分?

我无法将章节/小节与其对应的章节/小节对齐。请参见以下示例:

在此处输入图片描述

以下是迄今为止输入的所有代码:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{comment}

\begin{document}

\section{Operational rules for constructing an upper line with a basic step motion}

\subsection{The basic step motion}

\begin{enumerate}

 \item The final pitch in the basic step motion must be a tonic.
 
 \item The first pitch in the basic step motion must be a tonic triad member a third, a fifth, or an octave above the final pitch.
 
 \item These two pitches must be joined by inserting the pitches of intervening diatonic degrees to form a descending step motion.
 
\subsection{Beginning of Two-Voice Setting}
 
\end{enumerate}

\end{document}

我已经看到一些与边距和以英寸为单位移动文本相关的问题,但我很好奇是否存在我可能遗漏的更简单的方法。

谢谢。

答案1

在枚举环境中有第二个子节 (1.2)。更改如下:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{comment}

\begin{document}

\section{Operational rules for constructing an upper line with a basic step motion}

\subsection{The basic step motion}

\begin{enumerate}

 \item The final pitch in the basic step motion must be a tonic.
 
 \item The first pitch in the basic step motion must be a tonic triad member a third, a fifth, or an octave above the final pitch.
 
 \item These two pitches must be joined by inserting the pitches of intervening diatonic degrees to form a descending step motion.

\end{enumerate}

\subsection{Beginning of Two-Voice Setting}

\end{document}

答案2

前提:我怀疑这个解决方案虽然看起来可行,但有点复杂。也许一些大师可以找到一个优雅的解决方案。

我不明白为什么要把 放在\subsection里面enumerate,正如@Fran- 指出的那样。但是\subsection向右移动了\leftmargin。然后我们必须将 的缩进\subsection从修改\z@-\leftmargin,但前提是命令是在列表中给出的。这可以通过 轻松完成etoolbox

\pretocmd{\list}{\patchcmd{\subsection}{\z@}{-\leftmargin}{}{}}{}{}

平均能量损失

\documentclass{article}
\usepackage{etoolbox}

\makeatletter
\pretocmd{\list}{\patchcmd{\subsection}{\z@}{-\leftmargin}{}{}}{}{}
\pretocmd{\list}{\patchcmd{\subsubsection}{\z@}{-\leftmargin}{}{}}{}{}
\makeatother

\begin{document}

\section{Operational rules for constructing an upper line with a basic step motion}

\subsection{The basic step motion}

\begin{enumerate}

 \item The final pitch in the basic step motion must be a tonic.
 
 \item The first pitch in the basic step motion must be a tonic triad member a third, a fifth, or an octave above the final pitch.
 
 \item These two pitches must be joined by inserting the pitches of intervening diatonic degrees to form a descending step motion.

\subsection{Teginning of Two-Voice Setting}
\subsection*{A non-numbered subsection}
\subsubsection{A subsubsection}

\item Another item

\subsection*{A non-numbered section}
 
\end{enumerate}

\subsection{Teginning of Two-Voice Setting}
\subsubsection{A subsubsection}

\subsection*{Another non-numbered subsection}


\end{document}

在此处输入图片描述

相关内容