5

To comply with the braindead thesis style guide for my university, I need to be able to indent a whole paragraph using the same indentation level that is used to indent the first line in regular paragraphs. The following Libreoffice screenshot shows what I want:

How I want it to look

Note how the indentation for all the lines in the first paragraph is the same as the indentation for the first line of the second paragraph. How can I obtain a similar layout in Latex?

I'm aware of this similar question but all the answers there involve indenting by a known quantity and I don't know how big the regular paragraph indentation is.


Here is the source for the Latex that I want to tweak:

\documentclass[]{minimal}

\newcommand{\lorem}{%
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
}

\begin{document}

\lorem \\
\vspace*{1em} \\
\lorem \\

\end{document}
  • +0.5 for braindead and another +0.5 for the question itself ;-), but you're after \leftskip50pt or something. – user31729 Mar 31 '16 at 21:00
  • some document classes define a \normalparindent so it's not necessary to know the exact value. in such a case it suffices to set the indicated paragraph within a group, with \leftskip=\normalparindent \parindent=0pt and end the paragraph with a blank line or \par before ending the group. but not knowing the characteristics of the document class you're using (minimal is no help), we can't say more. – barbara beeton Mar 31 '16 at 21:03
  • Off-topic: Why should the minimal class be avoided – user31729 Mar 31 '16 at 21:11
  • hahaha, what a misleading name. I just wanted a minimal example :) – hugomg Mar 31 '16 at 21:14
8

You can use a list (many paragraphs and more semantic) or set \leftskip

\documentclass{article}

\usepackage{lipsum}

\begin{document}
\lipsum[1]

\begin{list}{}{\leftmargin=\parindent\rightmargin=0pt}
\item
\lipsum[1]
\end{list}

\leftskip=\parindent \noindent\lipsum[1]

\end{document}

enter image description here

| improve this answer | |
  • 2
    +1 yes using a list structure is much better than setting the tex primitive parameters directly (as in the other answers) especially if the indented text uses a nested list or needs to use \linewidth etc. – David Carlisle Mar 31 '16 at 21:11
  • what about tex.stackexchange.com/questions/237551/… :-) – touhami Mar 31 '16 at 21:20
  • @touhami: It is probably a bit overdoing. Also I think there is a \par missing towards the end. – Ulrike Fischer Mar 31 '16 at 21:34
  • I found it a good idea. – touhami Mar 31 '16 at 22:35
4

Something like this? Setting the \leftskip value temporarily (in a group!) to some 'arbitrary' value will change the indentation of a whole paragraph. Using \parindent0pt will kill the indentation of the first line as well.

The same can be done with \rightskip (of course, it's better to use \setlength{...}{} )

\documentclass{article}

\newcommand{\lorem}{%
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
}

\begin{document}

{\leftskip100pt\parindent0em
\lorem

}

\vskip\baselineskip

\lorem 

\vskip\baselineskip

And once again:

{\leftskip100pt\parindent0em\rightskip20pt
\lorem

}


\end{document}

enter image description here

| improve this answer | |
3

Here is a solution

\documentclass{minimal}

\newcommand{\lorem}{%
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
}

\begin{document}
\parshape 1 \parindent \dimexpr\linewidth-\parindent\relax
\noindent\lorem

\lorem

\end{document} 
| improve this answer | |
1

For my purposes, the most important thing was finding out that the size of the paragraph indentation is given by \parindent. With this number in hand, there are many, many different ways to achieve the result that I want. The solution in this answer is very simple and worked for me.

% adjustwidth comes from the "changepage" package but it
% is also available if you use the "memoir" package (like I am)
\begin{adjustwidth}{\parindent}{0pt}
\lipsum[1]
\end{adjustwidth}
| improve this answer | |

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.