調整第二行的起始位置

調整第二行的起始位置

在此輸入影像描述

問題:我怎麼能以這樣的方式推動第二行,使其準確地從第一行開始的地方開始,而不影響理想的行間距?

我的 MWE 是:

\documentclass[12pt, a4paper]{article}
\usepackage[top=0.7 in,bottom=0.5 in,left=0.6 in,right=0.6 in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{parskip}
%line spacing
\renewcommand{\baselinestretch}{1.10} 
%reduce top margin
\addtolength{\headsep}{-0.45cm}

\begin{document}
(1)~This is the first line. This is the first line. This is the first line. This is the first line. This is the first line. This is the first line.


\end{document} 

答案1

擴充 @moewe 的註解:您可以使用環境enumerate對行進行編號,這會自動對齊文字。預設情況下,數字顯示為等1.2.一個簡單的方法是使用enumitem帶有選項的包shortlabels,如下所示https://tex.stackexchange.com/a/2294/[(1)],並指定環境開始時的標籤enumerate。微量元素:

\documentclass[12pt, a4paper]{article}
\usepackage[top=0.7 in,bottom=0.5 in,left=0.6 in,right=0.6 in]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{parskip}
\usepackage[shortlabels]{enumitem}
%line spacing
\renewcommand{\baselinestretch}{1.10} 
%reduce top margin
\addtolength{\headsep}{-0.45cm}

\begin{document}
\begin{enumerate}[(1)]
\item This is the first line. This is the first line. This is the first line. This is the first line. This is the first line. This is the first line.
\item This is the second line.
\end{enumerate}

\end{document}

結果:

在此輸入影像描述

編輯:如果您不想縮進,則可以更改leftmargin環境參數enumerate。如果將其設為\labelwidth,則邊距將足夠大以允許列印數字並且縮排消失。然而,標籤的寬度比印刷的數字稍大,因此它看起來與常規文字仍然有點不對齊。這在印刷上不一定是壞事,但如果您願意,可以透過手動設定標籤寬度將數字進一步向左移動。

微量元素:

\blindtext
\begin{enumerate}[(1),leftmargin=\labelwidth]
\item This is the first line. This is the first line. This is the first line. This is the first line. This is the first line. This is the first line.
\item This is the second line.
\end{enumerate}
\begin{enumerate}[(1),labelwidth=7.6mm,leftmargin=\labelwidth]
\item This is the first line. This is the first line. This is the first line. This is the first line. This is the first line. This is the first line.
\item This is the second line.
\end{enumerate}

結果:

在此輸入影像描述

答案2

如果您需要常規列表之外的更多內容,或者您​​喜歡非常簡化的語法,可以使用linguex.請注意,如下例所示,項目和未編號段落之間是否有多個空白行很重要,這與 LaTeX 文件中的大多數情況不同,其中空白行 (= \par) 的數量無關緊要。

姆韋

\documentclass{book}
\usepackage{linguex}
\usepackage{lipsum} % for nice dummy text (always "This is the first line" is boring ...)

\begin{document}

\lipsum[1][1-2]

\ex. \lipsum[1][3-4]

\ex. \lipsum[1][5-6]

\lipsum[6][1-3]

\ex. \lipsum[1][7-9]


\lipsum[2][1-3]

\ex. \lipsum[3][1-3]

\ex. \lipsum[4][1-3]

\lipsum[5][1-4]

\end{document}

相關內容