dcpurton / scripture

A LaTeX style for typesetting Bible quotations
LaTeX Project Public License v1.3c
10 stars 0 forks source link

Drop cap indent stays switched on for subsequent paragraphs #89

Open veromary opened 2 months ago

veromary commented 2 months ago

I've tried to pare it down to a minimal example. Sometimes, after a few paragraphs, it starts indenting as if there's a drop cap even though there's no chapter number. Most of the time I can reset it by using "\end{scripture} \begin{scripture}" or putting the subsection headings outside the environment, but then I need extra code to soak up the extra vertical space. I typeset a book of gospels last year without this being much of an issue. It's puzzling.

test.pdf


\documentclass{article}
\usepackage{scripture}

\begin{document}
\begin{scripture}

\subsection{Jesus Heals a Paralytic}

\ch{2}And when he returned to Caperna-um after some days, it was reported that he was at home. 

\subsection{Jesus Calls Levi}

\vs{13}He went out again beside the sea; and all the crowd gathered about him, and he taught them. 
 the son of Alphaeus sitting at the tax office, and he said to him, ``Follow me.'' And he rose and followed him.

\vs{15}And as he sat at table in his house, many tax collectors and sinners were sitting with Jesus and his disciples; for there were many who followed him. 
\vs{17}And when Jesus heard it, he said to them, ``Those who are well have no need of a physician, but those who are sick; I came not to call the righteous, but sinners.''

\subsection{The Question about Fasting}

\vs{19}And Jesus said to them, ``Can the wedding guests fast while the bridegroom is with them? As long as they have the bridegroom with them, they cannot fast. 
\vs{21}No one sews a piece of unshrunk cloth on an old garment; if he does, the patch tears away from it, the new from the old, and a worse tear is made. 

\end{scripture}

\end{document}
dcpurton commented 2 months ago

Oooo.

I admit the scripture environment is very picky about what you put inside it. Everything is a LaTeX list and LaTeX lists fiddle with \par in odd ways. Combine that with the scripture environment trying to manage \parshape across paragraphs and I'm not surprised that problems arise.

I'll see if I can track down exactly what is going on, but in the mean time for the case where your section headings are not in an inner environment (e.g., poetry, hanging, etc.) try adding this to your preamble:

\makeatletter
\AddToHook{cmd/subsection/before}{%
  \parshape 1 \@totalleftmargin \linewidth}
\makeatother

Trying to put section headings within inner environments is probably a bad idea.

Using \section and friends for headings is a reasonable feature to try and make work, so I'll see if I can make things more robust.

dcpurton commented 2 months ago

I typeset a book of gospels last year without this being much of an issue. It's puzzling.

I changed how the main scripture environment works. It used to not use a LaTeX list, but now it does (there were too many weird problems with spacing). I would say that if you tried to recompile your document with the current version, it would fail.

veromary commented 2 months ago

Thank you!