5

enter image description here

Question: How can i push the second line in such a way that it will start exactly, where the first line started without disturbing ideal line spacing?

My MWE is:

\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} 
  • 3
    Does this number indicate you want to enumerate? – TeXnician Mar 7 at 8:50
  • 2
    I suggest you use \begin{enumerate} \item This is ... \item This is another .... \end{enumerate} for lists. The indentation should be more visually pleasing then. – moewe Mar 7 at 8:50
  • @moewe will not enclose the counter with parentheses by default. – Denis Mar 7 at 8:56
  • @Denis Well yes, but that is something that can be configured (quite easily even with packages like enumitem) if so desired. The question is not so much whether or not enumerate gives the exact expected output from the start (it can be configured quite extensively), the question is whether semantically it is the right choice here, i.e. if the OP wants to typeset a numbered list. – moewe Mar 7 at 8:58
  • @moewe Sure. This was the motivation of my obvious answer that builds on your comment. – Denis Mar 7 at 9:00
7

To expand on the comment by @moewe: you can use the enumerate environment to number the lines, which aligns the text automatically. By default the numbers appear as 1., 2. etc. There are several ways to change the appearance of the numbers. An easy way is to use the enumitem package with the option shortlabels as in https://tex.stackexchange.com/a/2294/, and specify the label as [(1)] at the start of your enumerate environment. 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}

Result:

enter image description here

Edit: if you don't want an indent then you can change the leftmargin parameter of the enumerate environment. If you set it to \labelwidth then the margin will be just big enough to allow the number to be printed and the indent is gone. However, the width of the label is slightly bigger than the printed number, so it still looks a little bit misaligned with regular text. This may not necessarily be bad typographically, but if you want you can shift the number further left by manually setting the labelwidth.

MWE:

\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}

Result:

enter image description here

6

In case that you need some more that a conventional list, or you like a very simplified syntax, there are linguex. Note that as show in the example below, it matter if there are more of one blank line between the item and a not numbered paragraph, unlike in most situations in LaTeX documents, where the number of blank lines (=\par) is irrelevant.

mwe

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.