1

TL;DR How to center all stanzas without breaking the indentation provided by the astanza environment? The result should be the same indentation provided by astanza, but every stanza itself is centered on the page regarding on its line length.

I am currently creating a Latex document in a twoside class which contains a bilingual text: On the left side (the left page) there is always a latin text and on the right side (the right page) there is the german translation. For this I am using reledpar. I have stanzas (astanza) on the left side and the translation on the right side and I always let a headline / title preceed the actual stanza / translation.

Now I am wondering how I can center the stanzas on the page regarding their line length without breaking the nice indentation provided by the astanza environment.

My MWE produces the following output (here a link to the PDF): Stanza left aligned

But what I want to have is basically (This was just done via gimp): Stanza center aligned

This is my MWE:

\documentclass[12pt,a4paper,twoside]{scrbook}
\usepackage[]{reledmac}
\usepackage[]{reledpar}

% Set stanza indentation
\setstanzaindents{0,0,1,0,1,0,1,0,1}

\begin{document}
\large
\begin{pages}
    \begin{Leftside}
        \beginnumbering
            \begin{astanza}[This is the original title]
                verse verse verse 1!&  
                verse verse verse 2!&   
                verse verse verse 3! This is a long one!&
                verse verse verse 4!\&  
            \end{astanza}
        \endnumbering
    \end{Leftside}
    \begin{Rightside}
        \beginnumbering
            \begin{astanza}[This is the translated title]
                This is the long translation of the original poem. The translation is not done verse by verse synced to the original text.\&
            \end{astanza}
        \endnumbering
    \end{Rightside}
\end{pages}
\Pages
\end{document}
  • I don't understand. You are speaking of astanza, but your MWE does not use it. – Maïeul Aug 28 '17 at 8:45
  • Thank you for adding that comment! I have not noticed that by accident I put in the wrong MWE. I updated the MWE and also included a link to the output PDF as well as pictures of the current output as well as the desired output. – Naturjoghurt Aug 28 '17 at 17:42
1

I have thought, and I go to the conclusion that strictly meaning, you question does not make sense.

"every stanza itself is centered on the page" means that the middle on the line is one the middle of the page (horizontally) -> so the begining of a verse (without indentation) can’t be on a fix point "indentation provided by astanza breaks" start, by definition, from a fix a point.

In other words: - with stanzaindent, the referring point is the begining of the line of verse - with centering setting, the referring point is the middle of the line of verse

You can't have a real centering and a stanza indentation in the same time. What you can do, is to have a enough long indentation to make illusion of centering

Here an example

\documentclass[12pt,a4paper,twoside]{scrbook}
\usepackage[noend,noeledsec]{reledmac}
\usepackage[]{reledpar}

% Set stanza indentation
\setstanzaindents{0,6,7}
\setcounter{stanzaindentsrepetition}{2}
\begin{document}
\the\textwidth
\large
\begin{pages}


\begin{Leftside}

\beginnumbering
\begin{astanza}[\centering This is the original title]
verse verse verse 1!&
verse verse verse 2!&
verse verse verse 3! This is a long one!&
verse verse verse 4!\&
\end{astanza}
\endnumbering
\end{Leftside}
\begin{Rightside}
\beginnumbering
\pstart[\centering This is the translated title]
This is the long translation of the original poem. The translation is not done verse by verse synced to the original text.
\pend
\endnumbering
\end{Rightside}
\end{pages}
\Pages
\end{document}

Also notes:

  1. The use the stanzaindentsrepetition counter
  2. For right side, the use of \pstart, as we are in a prose mode
  • Actually you can have centering and stanza indentation but I suspect not with reledmac: you'd need to set each line in a tabular with a single {l}, and then center the result. Because tabular sets its width to the width of the longest cell in this case, you can center the result. – Peter Flynn Jul 20 '18 at 20:54
  • but means nothing! What is a centering with standza indentation? cf my first paragraph.... – Maïeul Jul 20 '18 at 21:25
  • No, it's very important. You center the poem horizontally. Not the lines of the poem, the whole poem. Within that centered block, the line-indents are relative to the LH edge of the block. I just wrote a tiny package to do it, it needs the longest line of the poem before you start, so it can measure it (easier to automate when transforming from TEI XML to LaTeX). – Peter Flynn Jul 23 '18 at 9:10
  • ok, but that is not really centered. – Maïeul Jul 23 '18 at 15:48
  • The effect is the same, however: you take\textwidth minus the length of longest line, divide the result by two, and divide that result by the \stanzaindentbase and take the integer of the quotient. This is the multiple of \stanzaindentbase's which you add to every value in the argument to \setstanzaindents. This is why reledmac is so wonderful :-) – Peter Flynn Jul 24 '18 at 11:35
1

You can use \centering before the pages environment.

Notes also that \setstanzaindents{0,0,1,0,1,0,1,0,1} can be simplified using the stanzaindentsrepetition counter.

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.