0

I Want to write two parallels texts. I can do it this way :

\begin{document}
  \begin{pairs}
    \begin{Leftside}
     \beginnumbering
     \pstart
      TEXT
     \pend
     \endnumbering
   \end{Leftside}
   \begin{Rightside}
     \beginnumbering
      \pstart
       TRANSLATION
      \pend
      \endnumbering
    \end{Rightside}
  \end{pairs}
\Columns
\end{document}

But it does not work when I write :

\begin{document}
\begin{pairs}
    \begin{Leftside} \beginnumbering
     \pstart
      TEXT
     \pend
    \end{Leftside}

    \begin{Rightside} \beginnumbering
        \pstart
         TRANSLATION
         \pend
    \end{Rightside}
\end{pairs}

\Columns

\begin{pairs}
    \begin{Leftside} \memorydump
        \pstart
         TEXT
        \pend
      \endnumbering \end{Leftside}
        \begin{Rightside} \memorydump
        \pstart
        \pend
       \endnumbering    \end{Rightside}
      \end{pairs}
      \Columns

\end{document}

I guess the problem must come from \memorydump, but I don't get why.

happybobby
  • 29
  • 4
  • Did you really check that the structure of your document is correct? See this answer as reference: https://tex.stackexchange.com/a/308318/47927 . You write that you don't forget \endnumbering, why don't you put it in the code of your example then? In order to help you, it would be best to have a minimal (non-)working example. Also, what is \renewcommand{\Rlineflag}{} supposed to do? – Jasper Habicht Aug 14 '21 at 16:58
  • 5
    if you only show a fragment of your code and do not say what errors you get from your full code, it is very hard to help. – David Carlisle Aug 14 '21 at 17:23
  • I edited the post. I hope it's better now. – happybobby Aug 14 '21 at 19:32
  • Jasper Habict : \renewcommand{\Rlineflag}{} is supposed to delete the line numbering for the page on the right side. I don't need line numbers for the translation. – happybobby Aug 14 '21 at 19:35
  • 1
    You have to close all environments carefully. Two things made it work for me: (1) call \Columns outside pairs-environment. (2) Close the numbering sections with \endnumbering – mxordn Aug 15 '21 at 12:34
  • It works fin when I do what mxordn tells me, but it does not work when I use \memorydump. However, this is a command I need. – happybobby Aug 16 '21 at 08:07
  • @happybobby you still have not posted an example document, nor said what error you got. – David Carlisle Aug 04 '22 at 10:55

1 Answers1

1

tl;dr

Dump \memorydump (which doesn't interact optimally with reledmac) and use \pausenumbering and \resumenumbering instead (see reledmacmanual §5.2.7 and my answer here).


Your use of \memorydump appears functionally equivalent to the very skimpy example in the "manual" part of the reledpar documentation (§7.2). In fact, the "official" example doesn't compile either. The bad form consists in removing an \endnumbering before closing Leftside which, however, is what the manual shows us to do. It also tells us to place a \memorydump first thing in the next Leftside environment.

What does \memorydump do? According to the "code" part of the documentation (§III, p. 37):

\memorydump is a shorthand for \pausenumbering\resumenumbering. This will clear the memorised stuff for the previous chunks while keeping the numbering going.

Basically, to call \memorydump is to call \endnumbering and \beginnumbering directly after one another. But then, no matter where you place \memorydump, you mess with the very delicate hierarchy and arrangement of environments that is needed to operate reledpar. No matter where you use it, it will break things.

It is hard to tell from the question what you are actually trying to achieve. (Please clarify the question, if you are still interested.)

Assuming your aim is to preserve continuous line numbering across a "break" – meaning that you break down long chunks of texts by ending the `Leftside and pages (etc.) environments and printing the \Pages every once in a while, allowing for more natural page breaks and text distribution – then the solution is the same as detailed in my other answer.

Just before the break, use \pausenumbering instead of \endnumbering and right after, use \resumenumbering instead of \beginnumbering (these are explained in the reledmacmanual §5.2.7).

\documentclass{article}
\usepackage[a6paper]{geometry}   % just for the screenshots
\usepackage{blindtext}
\usepackage[series={A},noend, noeledsec, noledgroup, nopenalties]{reledmac}
\usepackage{reledpar}

\begin{document}

\begin{pages} \begin{Leftside} % \beginnumbering \pstart \blindtext \pend % %\endnumbering % endnumbering --> resets line counting \pausenumbering % pausenumbering --> continuous numbering \end{Leftside} % \begin{Rightside} \beginnumbering % \pstart \blindtext \blindtext \pend % %\endnumbering % endnumbering --> resets line counting \pausenumbering % pausenumbering --> continuous numbering \end{Rightside} \end{pages} \Pages

\begin{pages} \begin{Leftside} %\beginnumbering % beginnumbering --> restarts line numbering from 1 here \resumenumbering % resumenumbering --> continuous numbering % \pstart \blindtext \pend % \endnumbering \end{Leftside}

\begin{Rightside} %\beginnumbering % beginnumbering --> restarts line numbering from 1 here \resumenumbering % resumenumbering --> continuous numbering % \pstart \blindtext \blindtext \pend % \endnumbering \end{Rightside} \end{pages} \Pages

\end{document}

first two pages with continued numbering latter two pages with continued numbering another two pages with continued numbering

marquinho
  • 1,721