调整第二行的开始

调整第二行的开始

在此处输入图片描述

问题:我怎样才能推动第二行,使其准确地从第一行开始的位置开始,而不会干扰理想的行距?

我的 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带有选项的包shortlabelshttps://tex.stackexchange.com/a/2294/[(1)],并指定与环境开始时相同的标签enumerate。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}
\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}

相关内容