# Paragraph indented to absolute horizontal position.

I am in the following situation: I need to have some text on the first line of a paragraph indented to the normal paragraph indentation point, then I need further text on that same line, as well as all subsequent lines in the paragraph, to be indented to a specific horizontal location (in my case, 2 inches). How can I achieve this?

EDIT: None of the solutions take into account that I need further text on the first line to be indented to the same length as additional lines. Your answers get me almost there, but not quite.

-
I'm not sure what you mean by your latest eidt. How can you simultaneously have a normal indentation on the first line and have the "further text on the same line" indented? Where does the further text begin? Is it like a heading? Can you post an image of what this would look like? –  Alan Munn Mar 19 '11 at 23:20
@Alan: Example: i.imgur.com/CRvwG.jpg –  Brennan Vincent Mar 19 '11 at 23:27
So is the first part logically a section/subsection heading or a list of some sort? This makes a difference, because if it is, there are better methods than any of us have proposed. –  Alan Munn Mar 19 '11 at 23:43

## 5 Answers

You can use the hanging package to do this:

\documentclass{article}
\usepackage{hanging}
\newcommand{\lipsum}{Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
adipiscing vitae, felis.}
\begin{document}
\lipsum\lipsum\par
\hangpara{2in}{1}
\indent\lipsum\lipsum
\end{document}


Edit

If what you need is more like a list, you can use the enumitem package to define a description environment. This seems to be closer to what you want.

\documentclass{article}
\usepackage{enumitem}
\setdescription{style=sameline,leftmargin=2in}
\newcommand{\lipsum}{Lorem ipsum dolor sit amet, consectetuer
adipiscing elit. Ut purus elit, vestibulum ut, placerat ac,
adipiscing vitae, felis.}
\begin{document}
\begin{description}
\item[A description]\lipsum
\item[Another description]\lipsum
\end{description}

\end{document}


-
Thanks for the answer. Please see my latest edit. –  Brennan Vincent Mar 19 '11 at 23:16
I'm not sure what the titlesec package is for, but this is perfect otherwise. Thanks! –  Brennan Vincent Mar 20 '11 at 2:26
@Brennan sorry, that was in from another alternative I was playing with. It needn't be there at all. I'll remove it from my answer. –  Alan Munn Mar 20 '11 at 2:32

Like this (Plain)?

\hsize=.7\hsize
\parindent=20pt
\def\lipsum{Lorem ipsum dolor sit amet. }
\lipsum\lipsum\lipsum\lipsum\lipsum\lipsum
\lipsum\lipsum\lipsum\lipsum\lipsum\lipsum

\leftskip=2in
\lipsum\lipsum\lipsum\lipsum\lipsum\lipsum
\lipsum\lipsum\lipsum\lipsum\lipsum\lipsum
\bye


Depending on what you want, you could also use \hoffset.

-
Thanks for the answer. Please see my latest edit. –  Brennan Vincent Mar 19 '11 at 23:17

The TeX primitive \parshape can do what you want.

\dimen0\hsize
\advance\dimen0 by -2in
\parshape=2 0pt \hsize 2in \dimen0
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex
ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore
eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue
duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod
mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem.
Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui
sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit
litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum
clarifiant sollemnes in futurum.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex
ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore
eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue
duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod
mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem.
Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui
sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit
litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum
clarifiant sollemnes in futurum.

\bye


(this is a plain tex example; if you wanted it in LaTeX just copy and paste it between \begin{document}...\end{document} but omit \bye)

Parshapes are documented in the TeXBook. Google found me a passage in The Advanced TeXBook which also helps. The basic usage is that \parshape expects a number then a sequence of pairs of dimensions. Each pair of dimensions represents the indentation and width of each line. The number at the beginning is the index of the pair which should be used once the sequence of pairs is exhausted.

The first two lines of the sample set the temporary dimension \dimen0 to the default paragraph width \hsize minus 2 inches. The \parshape line says that the first line should be a normal line (no indentation, width \hsize), the second should be indented by 2 in and \hsize- 2 in wide (so it ends at the same place as above), and subsequent lines should follow the specification for the second line. Apparently the regular first line paragraph indentation comes after the parshape is applied, so you don't need to adjust the first line for that.

Notice that \parshape applies only to the current paragraph. If you want every paragraph to be set that way, use the \everypar token register. Replace line 3 above to read

\everypar{\parshape=2 0pt \hsize 2in \dimen0}

-
Thanks for the answer. Please see my latest edit. –  Brennan Vincent Mar 19 '11 at 23:16

yet another variation using tex primitives within a latex wrapper:

\documentclass{article}
\usepackage{lipsum}

\begin{document}
\lipsum[1]

\indent\hangindent2in
\lipsum[1]
\end{document}


this isn't as "pure" latex as the hanging package, but it's compact and pretty easy to remember.

-
I agree. The main advantage of hanging over this solution is (i) the second argument of the \hanging command implements the \hangafter command, which can vary the number of lines before the hanging paragraph starts. So \hanging{2in}{3} = \hangindent2in\hangafter3. That gets a little harder (but not much harder) to remember. And (ii) it also implements an environment for multiple hanging paragraphs. –  Alan Munn Mar 19 '11 at 15:29
Thanks for the answer. Please see my latest edit. –  Brennan Vincent Mar 19 '11 at 23:18
@Brennan -- here's a mod that takes into account your edit, namely that you need what's at the beginning of the first line to be within the "margin": change \indent\hangindent2in to \leavevmode\hangindent2in \hbox to2in{<initial text>\hfil}\lipsum[1] making sure there is no space (or line break) between the end of the \hbox and the start of the \lipsum. –  barbara beeton Mar 22 '11 at 15:17

Taking into account the EDIT to the original questin, you could use two minipages or a tabular (if page breaks won't occur inside the indented text); the following code shows these options:

\documentclass[12pt]{article}
\usepackage{lipsum}

\newlength\mylen
\setlength\mylen{\textwidth}
\addtolength\mylen{-2in}
\addtolength\mylen{-\parindent}

\begin{document}

some text before the minipages

\begin{minipage}[t]{2in}
first line of text
\end{minipage}%
\begin{minipage}[t]{\mylen}
some more text \lipsum[1]
\end{minipage}

\newpage

some text before the table

\noindent\begin{tabular}{@{\hspace*{\parindent}}p{2in}@{}p{\mylen}@{}}
first line of text & some more text \lipsum[1]
\end{tabular}

\end{document}


If page breaks are to be allowed, you could load the longtable package and use longtable instead of tabular.

An image of the result using minipages:

-