1

I'm writing a paper that references a field in email headers called the Received field, and the Received field typically looks like this:

Received: from [email protected] (mail.example.com [127.0.0.1])
    by [email protected] with SMTP id 77778888FFFF
    for <[email protected]>; Thu, 22 Sep 2011 08:44:42 -0500 (CDT)

I want to put this in LaTeX, inside a quote to emphasize it, but in order to get the alignment right I have to create newlines after each line:

\begin{quote}
    Received: from [email protected] (mail.example.com [127.0.0.1]) \\
    by [email protected] with SMTP id 77778888FFFF \\
    for $<[email protected]$>$; Thu, 22 Sep 2011 08:44:42 -0500 (CDT)
\end{quote}

What I'm wondering is how can I make the second and third lines indented one level more than the first line? I would try hanging indentations except because all three lines are treated as separate paragraphs due to the new lines it doesn't work. Is there a way I can have a different level of indentation in the first line than in the others?

2 Answers 2

1

You could use the verbatim environment. As an advantage you dont have to escape <, >, etc. and there is no need to insert the linebreaks manually.

\documentclass{article}

\begin{document}
\begin{verbatim}
Received: from [email protected] (mail.example.com [127.0.0.1])
    by [email protected] with SMTP id 77778888FFFF
    for <[email protected]>; Thu, 22 Sep 2011 08:44:42 -0500 (CDT)
\end{verbatim}
\end{document}

enter image description here

1

Or use the quoting package... It allows both nesting of quoting environments and has options to treat the first line differently from the others.

enter image description here

\documentclass{article}

\usepackage{quoting}
\usepackage{lipsum}

\begin{document}

\lipsum[1]
\begin{quoting}
\lipsum[2]
\begin{quoting}
\lipsum[3]
\end{quoting}
\lipsum[4]
\end{quoting}
\lipsum[5]
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .