3

Working on psalm indentation with macro

\def\par{\ifvmode\noindent\else\endgraf\fi}
\obeylines

given by David Carlisle here I came across next problem of verses which doesn't fit in a single line. That's the case

I tried to put there additional indentation with \hangindent but didn't succeed.

Here is some MWE:

\documentclass[12pt,a4paper]{article}
\usepackage[
    left=4cm,
    right=4cm,
    showframe]{geometry}

\begin{document}

\begingroup
\setlength{\parskip}{0pt}
\def\par{\ifvmode\noindent\else\endgraf\fi}
\obeylines
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor
\endgroup
\end{document}

I aim at something like that: that I'm trying to achieve

6

Something like this?

enter image description here

\documentclass[12pt,a4paper]{article}
\usepackage[
    left=4cm,
    right=4cm,
    showframe]{geometry}

\begin{document}

\begingroup
\setlength{\parskip}{0pt}
\def\par{\ifvmode\hangindent40pt\noindent\else\endgraf\hangindent40pt\fi}
\obeylines
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor
\endgroup
\end{document}
  • That's it! Thanks again. I was trying to put \hangindent somewhere in "preamble" of the group but didn't think of editing the conditional. – Precluch Mar 24 '17 at 21:17
2

This answer is a little redundant, since David Carlisle has provided a beautiful answer. But I'm so impressed at how this will help me typeset Bible quotes that I want to provide a fuller example of how I'd use this method to typeset biblical poetry. It's so much better than me previous efforts built around the list environment. Any suggestions for improvement welcome.

\documentclass[twocolumn]{article}
\usepackage[b5paper,margin=2cm]{geometry}
\usepackage{lettrine}
\pagestyle{empty}
\setlength\parindent{1em}
\renewcommand*{\thefootnote}{\emph{\alph{footnote}}}
\def\vs#1{\textsuperscript{#1}}
\def\ch#1{\lettrine[findent=0.5em,nindent=0em]{#1}{}}
\newlength\psalmleftskip
\setlength\psalmleftskip{1em}
\newlength\psalmindent
\setlength\psalmindent{1em}
\newenvironment{psalm}
  {\raggedright
   \leftskip\psalmleftskip
   \parskip 0pt
   \parindent\psalmindent
   \def\vs##1{\llap{\textsuperscript{##1}}}
   \def\par{%
     \ifvmode
       \def\vs####1{\llap{\textsuperscript{####1}}}
       \noindent
     \else
       \def\vs####1{\hspace{-\psalmindent}\llap{\textsuperscript{####1}}\hspace{\psalmindent}}
       \endgraf
     \fi
     \hangindent=3\psalmindent}
   \obeylines}
  {}
\begin{document}
\section*{Job}

\subsubsection*{Elihu}

\ch{32}So these three men stopped answering Job, because he was righteous in
his own eyes. \vs{2}But Elihu son of Barakel the Buzite, of the family of Ram,
became very angry with Job for justifying himself rather than God. \vs{3}He
was also angry with the three friends, because they had found no way to refute
Job, and yet had condemned him.\footnote{\emph{3} Masoretic Text; an ancient
Hebrew scribal tradition \emph{Job, and so had condemned God}} \vs{4}Now Elihu
had waited before speaking to Job because they were older than he. \vs{5}But
when he saw that the three men had nothing more to say, his anger was aroused.

\vs{6}So Elihu son of Barakel the Buzite said:\medskip

\begin{psalm}
  ``I am young in years,
  and you are old;

  that is why I was fearful,
  not daring to tell you what I know.

  \vs{7}I thought, `Age should speak;
  advanced years should teach wisdom.'

  \vs{8}But it is the spirit\footnote{\emph{8} Or \emph{Spirit}; also in verse 18} in a person,
  the breath of the Almighty, that gives them understanding.

  \vs{9}It is not only the old\footnote{\emph{9} Or \emph{many}; or \emph{great}} who are wise,
  not only the aged who understand what is right.\medskip

  \vs{10}``Therefore I say: Listen to me;
  I too will tell you what I know.

  \vs{11}I waited while you spoke,
  I listened to your reasoning;

  while you were searching for words,
  \vs{12}I gave you my full attention.

  But not one of you has proved Job wrong;
  none of you has answered his arguments.

  \vs{13}Do not say, `We have found wisdom;
    let God, not a man, refute him.'

  \vs{14}But Job has not marshaled his words against me,
  and I will not answer him with your arguments.
\end{psalm}

\newpage

\section*{Psalms}

\subsubsection*{\centering Psalm 63\footnote{In Hebrew texts 63:1--11 is
numbered 63:2--12.}}

\begin{center}
  \emph{A psalm of David. When he was in the Desert of Judah.}
\end{center}

\begin{psalm}
  \vs{1}You, God, are my God,
  earnestly I seek you;

  I thirst for you,
  my whole being longs for you,

  in a dry and parched land
  where there is no water.\medskip

  \vs{2}I have seen you in the sanctuary
  and beheld your power and your glory.

  \vs{3}Because your love is better than life,
  my lips will glorify you.

  \vs{4}I will praise you as long as I live,
  and in your name I will lift up my hands.

  \vs{5}I will be fully satisfied as with the richest of foods;
  with singing lips my mouth will praise you.\medskip

  \vs{6}On my bed I remember you;
  I think of you through the watches of the night.

  \vs{7}Because you are my help,
  I sing in the shadow of your wings.

  \vs{8}I cling to you;
  your right hand upholds me.\medskip

  \vs{9}Those who want to kill me will be destroyed;
  they will go down to the depths of the earth.

  \vs{10}They will be given over to the sword
  and become food for jackals.\medskip

  \vs{11}But the king will rejoice in God;
  all who swear by God will glory in him,
  while the mouths of liars will be silenced.
\end{psalm}
\end{document}

enter image description here

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.