2

Reledmac permits to have two kind of text blocks

  1. Regular text
  2. Blocks of paragraphs of critical texts that have their lines numbered and all sort of possibilities of critical notes, etc. This text is between the two commands \pstart... \pend My question is:
  • How can I change globally the margins of the critical text so that it is easily seen as separated by the non critical text? [this has been solved - see the comment below]
  • Can I have even and odd margins different?

Here is my MWE:

\documentclass[foolscap, 11pt]{octavo}
\usepackage{blindtext}
\usepackage[marginparwidth=40pt, headsep=20pt]{geometry}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{ebgaramond}

\usepackage{reledmac} \Xarrangement[A]{paragraph}

\begin{document} \section{First} THIS IS NORMAL TEXT \blindtext[1] \beginnumbering \pstart THIS IS TEXT I WOULD LIKE TO APPEAR WITH NARROWER MARGINS \blindtext[1] \pend \pstart A second paragraph in the same block to demonstrate how far the margin changes can stretch. \pend \endnumbering AND THIS IS AGAIN NORMAL TEXT \blindtext[1]

\end{document}

JamesT
  • 3,169
Haim
  • 487
  • To clarify (the question doesn't say it explicitly): Do you want the blocks of critical text by any chance to appear on their own separate page? If so, you could issue \newgeometry from the geometry package on the relevant pages, or just in conjunction with \beginnumbering. – marquinho Feb 09 '22 at 12:41
  • If the blocks appear in continuous text, on the other hand, \beginnumbering\leftskip=2.5em\rightskip=2.5em\pstart would help with the main text (not the footnotes). The call of \endnumbering resets the layout, so the next non-critical text has normal margins again. However, this won't work for the footnotes: parameters like \Xwidth[series]{} are to be set globally in the preamble, IIRC. -- I took the liberty to edit the unnecessary parts out of your example. – marquinho Feb 09 '22 at 13:17
  • It is blocks in continuous text and your second suggestion works thanks! – Haim Feb 09 '22 at 13:48
  • BUT 1) can I specify different margins for odds and even pages? and 2) how can avoid indentation? – Haim Feb 09 '22 at 13:50
  • For (2) issue \pstart\noindent (this is a general thing, also outside of reledmac). (1) is more complicated and my current suggestion cannot handle it. (Briefly put: the margin lengths are set when \beginnumbering is called. If the "critical" block breaks to the next page, it still uses the same lengths – it cannot switch left with right margin.) Could you please edit the question to include this request? This increases the chance that proficient users see it and find a solution :) – marquinho Feb 09 '22 at 14:46
  • Thanks! The original question is corrected. For the \noindent, I had tried but had placed the command right after \beginnumbering, and it did not work. – Haim Feb 09 '22 at 15:28
  • I guess you should add it after \pstarz – Maïeul Feb 13 '22 at 11:17
  • @Haim: I think I just cracked it! Please see my answer and leave feedback if it helped :) – marquinho Mar 26 '22 at 08:41

1 Answers1

2

EDIT

The current solution's interaction with reledmac is far from ideal.

It works nicely if no critical notes are needed, f.i., if reledmac is used only to have line numbering. (Which might be the focus of the original question, since no mention was made of footnotes.)

It also works with endnotes, but only if the custom tcolorbox is enclosed within the critical paragraph:

\pstart
 \begin{criticalmarginsbox}
  <Text>
 \end{criticalmarginsbox}
\pend

Finally, the solution does not work with critical footnotes properly: if the critical paragraph is enclosed within the custom tcolorbox, the footnotes are lost. If, on the other hand, the box is within the paragraph, the footnotes are realized correctly, but the line numbering in the margin is lost.

The original answer

Let's assume that your blocks of critical text are to have a larger inner and a smaller outer margin, 4em and 1em respectively.

Setting parity-dependent page margins can be easily done globally (f.i. with pkg geometry).

On the other hand, setting such margins on a paragraph basis is, in general, an open problem. This is because (to quote @Werner) TeX sets a complete paragraph at a time and doesn't take any account of page breaks and possible layout changes within a paragraph. Each single paragraph will use the same lengths, in the same absolute order, that were established at the start: it doesn't switch left with right depending on page parity.

Even a brute-force approach, like setting the margins via low-level macros at each paragraph start, is hopeless:

\leftskip=4em
\rightskip=1em
\pstart <text> \pend
\leftskip=1em
\rightskip=4em
\pstart <text> \pend

the margins are set once per paragraph regardless of page

Fortunately, this answer suggests a satisfactory automatic solution.

We exploit the functions of tcolorbox, specifically its ability to toggle properties based on page parity, and define a \tcolorbox without colors with the desired margins.

To take care of the indentation, we specify the option before upper={\parindent=0pt}, i.e., have the code \parindent=0pt issued every time a criticalmarginsbox begins.

tcolorbox adds some vertical spacing around the box. You might find this desirable, as it makes the critical blocks stand out. Otherwise, keys such as before skip balanced and friends can be used to suppress this, as in my example.

\documentclass[foolscap, 11pt]{octavo}
\usepackage[marginparwidth=40pt, headsep=20pt,showframe]{geometry}
\usepackage{fontspec}
\usepackage{ebgaramond}
\usepackage{blindtext}
\usepackage{reledmac}

\usepackage{tcolorbox} \tcbuselibrary{breakable} \newtcolorbox{criticalmarginsbox}{ parbox=false, left skip=4em, right skip=1em, breakable, toggle enlargement=evenpage, size=minimal, colback=white, before upper={\parindent=0pt}, before skip balanced=1pt, after skip balanced=0pt, extras={frame empty}}

\begin{document}

\section{First} \textbf{Normal text with standard margins.} \blindtext[1]

\beginnumbering \begin{criticalmarginsbox} \pstart \textbf{Text with narrower margins:} \blindtext[1] \pend \pstart \textbf{A second paragraph} in the same block to demonstrate that that the margin size is only page-sensitive. \pend \end{criticalmarginsbox} \endnumbering

\textbf{The normal text has standard margins again.} \blindtext[1]

\end{document}

with tcolorbox, the margins are flexible and page-sensitive

marquinho
  • 1,721