3

My understanding of \markboth is that it sets tags for use in the header, but it does not immediately produce any output in the document. However, I'm finding that if you call \markboth within a reledmac stanza, it does produce visible output in the document.

Here's an example of the type of output I'm referring to: enter image description here As you can see, calling \markboth from within a reledmac stanza produces a blank line of output in the document.

The MWE to demonstrate this is here:

\documentclass[10pt,openany]{book}

\usepackage{reledmac}
\usepackage{fancyhdr}
\usepackage[paperheight=9in,paperwidth=6in,asymmetric]{geometry}

\pagestyle{fancy}
\fancyhead[LE,RO]{\rightmark--\leftmark}

\newcommand{\showverse}[2]{%
    \raisebox{0.5ex}{#2}\nobreak\hspace*{0.2em}%
}

\setstanzaindents{2,1}
\setcounter{stanzaindentsrepetition}{1}
\setlength{\stanzaindentbase}{30pt}
\firstlinenum{100}

\begin{document}

\markboth{1:1}{1:1}\showverse{1}{1}Now is the time for all good men to come to the aid of their country.
\markboth{1:1}{1:1}\showverse{1}{2}Now is the time for all good men to come to the aid of their country.
\markboth{1:1}{1:1}\showverse{1}{3}Now is the time for all good men to come to the aid of their country.

\beginnumbering
\stanza
This is a line of verse&
\markboth{1:4}{1:4}\showverse{1}{4}And another line of verse& % <=== \markboth produces visible output
And the last line of verse\&
\endnumbering

\end{document}

Removing the \markboth command produces this output: enter image description here

Does anyone know of a way I can call \markboth from within a reledmac stanza without producing this blank line output? Also, does anyone see something I'm doing wrong that is causing this?

0

1 Answer 1

1

You must use \doinsidethislinehook as explained on § 5.7 of the handbook.

\documentclass[10pt,openany]{book}

\usepackage{reledmac}
\usepackage{fancyhdr}
\usepackage[paperheight=9in,paperwidth=6in,asymmetric]{geometry}

\pagestyle{fancy}
\fancyhead[LE,RO]{\rightmark--\leftmark}

\newcommand{\showverse}[2]{%
    \raisebox{0.5ex}{#2}\nobreak\hspace*{0.2em}%
}

\setstanzaindents{2,1}
\setcounter{stanzaindentsrepetition}{1}
\setlength{\stanzaindentbase}{30pt}
\firstlinenum{100}

\begin{document}

\markboth{1:1}{1:1}\showverse{1}{1}Now is the time for all good men to come to the aid of their country.
\markboth{1:1}{1:1}\showverse{1}{2}Now is the time for all good men to come to the aid of their country.
\markboth{1:1}{1:1}\showverse{1}{3}Now is the time for all good men to come to the aid of their country.

\beginnumbering
\stanza
This is a line of verse&
\doinsidethislinehook{\markboth{1:4}{1:4}}\showverse{1}{4}And another line of verse& % <=== \markboth produces visible output
And the last line of verse\&
\endnumbering

\end{document}
```
1
  • Thank you so much! Feb 25, 2023 at 3:18

You must log in to answer this question.

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