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} 
Sebastiano
  • 54,118
SandyM
  • 2,757
  • 4
    Does this number indicate you want to enumerate? – TeXnician Mar 07 '19 at 08:50
  • 3
    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 07 '19 at 08:50
  • @moewe will not enclose the counter with parentheses by default. – Denis Mar 07 '19 at 08: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 07 '19 at 08:58
  • @moewe Sure. This was the motivation of my obvious answer that builds on your comment. – Denis Mar 07 '19 at 09:00
  • @Texnician I don't want enumerate – SandyM Mar 07 '19 at 09:26
  • Since this looks like a prime example for enumerate usage it may help to explain why you don't want to use it and what exactly you intend on doing here. – moewe Mar 07 '19 at 09:49
  • @moewe In enumerate there is an indent. I don't want it. – SandyM Mar 07 '19 at 10:11
  • Do you mean the indent to the left? I.e. that the (1) does not start where it would start when you write normal paragraph text? That could probably be changed. The more important question is whether semantically we are talking about a numbered list/enumeration here. Is that the case? – moewe Mar 07 '19 at 10:13
  • @snehal the indent can be removed, see the edit on my answer. – Marijn Mar 07 '19 at 11:01

2 Answers2

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

Marijn
  • 37,699
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}
Fran
  • 80,769