
Вопрос:Как мне переместить вторую строку таким образом, чтобы она начиналась точно там, где началась первая строка, не нарушая при этом идеального межстрочного интервала?
Мой 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
среды. 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}