2

I'm working with potentially long poems that may have (sub)section headers. Here's a famous example.

The trouble is: I seem to be unable to control the indentation of section headers within the verse environment. If I remove the verse environment altogether, then the headings flush left the way I'd like, but is it possible to do this within the verse? Within the verse environment, the headings are indented. In my ideal situation, everything would be flush-left.

Here's a minimal example:

\documentclass[12pt]{scrartcl}
\usepackage[letterpaper,margin=1in]{geometry}
\setlength{\parskip}{12pt}
\begin{document}
\begin{verse}
Lorem \textbf{ipsum} dolor sit amet, \emph{consectetur}\\adipisicing
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. Donec\\gravida quis augue in
tincidunt.\\Ut pulvinar ac sapien venenatis dignissim.

\section{Example Section}

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.

\subsection{Example subsection}

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.

\subsubsection{Example subsubsection}

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.
\end{verse}
\end{document}

This is a follow-up to a previous question about formatting within the verse environment.

1 Answer 1

3

Probably the simplest is to do:

\documentclass[12pt]{scrartcl}
\usepackage[letterpaper,margin=1in]{geometry}
\setlength{\parskip}{12pt}

\let\oldsection\section
\renewcommand\section[1]{%
\end{verse}\oldsection{#1}\begin{verse}}

\let\oldsubsection\subsection
\renewcommand\subsection[1]{%
\end{verse}\oldsubsection{#1}\begin{verse}}

\let\oldsubsubsection\subsubsection
\renewcommand\subsubsection[1]{%
\end{verse}\oldsubsubsection{#1}\begin{verse}}


\begin{document}
\begin{verse}
Lorem \textbf{ipsum} dolor sit amet, \emph{consectetur}\\adipisicing
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. Donec\\gravida quis augue in
tincidunt.\\Ut pulvinar ac sapien venenatis dignissim.

\section{Example Section}

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.

\subsection{Example subsection}

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.

\subsubsection{Example subsubsection}

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.

Fusce vulputatecongue dui, at dictum risus congue vel.\\Vivamus rutrum commodo nunc,
sed elementum velit consectetur nec.
\end{verse}
\end{document}

if you need a section not in verse use \oldsection

3
  • This helped, but then I had the opposite problem, where the headings were outdented from the rest of the text. In addition to this, it seems to help when I put \setlength{\leftmargini}{0em} after the \begin{document} Commented Feb 17, 2015 at 4:42
  • the verse is indented, the headings are exactly where they are as you described in the question if the section command is outside the verse "then the headings flush left the way I'd like, " Commented Feb 17, 2015 at 10:57
  • Perhaps my question was mis-phrased? I'd like everything to be flush left. Commented Feb 18, 2015 at 5:34

You must log in to answer this question.

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