1

I'm using the reledmac package to typeset a critical edition. I need to add numbers in margin inside a minipage environment, with two minipages placed side by side:

\documentclass[a4paper, 12pt, twoside, draft ]{article}

\usepackage[top=30mm,bottom=30mm,left=30mm,right=30mm]{geometry}

\usepackage{reledmac}

\usepackage{lipsum}

\setlength\parindent{0pt}

\begin{document}

\beginnumbering
\pstart
\firstlinenum{1}
\linenumincrement{1}

\lipsum[23]

\begin{minipage}[t]{0.45\textwidth}
\lipsum[23]
\end{minipage}\hfill
\begin{minipage}[t]{0.45\textwidth}
\lipsum[23]
\end{minipage}

\pend
\endnumbering

\end{document}

Here is the output:enter image description here

As you can see, inside the minipage it prints ONLY the first number.

I then tryed to use the ledgroup and ledgroupsized environment, as indicated in the reledmac package documentation, p. 45 (http://ctan.mirror.garr.it/mirrors/CTAN/macros/latex/contrib/reledmac/reledmac.pdf), but in this case, even if the numbering is working, I can't managed to obtain a proper side by side placing of the two minipages:

\documentclass[a4paper, 12pt, twoside, draft ]{article}

\usepackage[top=30mm,bottom=30mm,left=30mm,right=30mm]{geometry}

\usepackage{reledmac}

\usepackage{lipsum}

\setlength\parindent{0pt}

\begin{document}

\beginnumbering
\pstart
\firstlinenum{1}
\linenumincrement{1}

\lipsum[23]

\noindent\begin{ledgroupsized}[t]{0.45\textwidth}
\lipsum[23]
\end{ledgroupsized}\hfill
\begin{ledgroupsized}[t]{0.45\textwidth}
\lipsum[23]
\end{ledgroupsized}

\pend
\endnumbering

\end{document}

enter image description here.

I would ask how to obtain complete line numeration and side by side placing of the minipages.

Thank you!

8
  • the best should be to use the columns feature of the reledpar package, which is an extension of reledmac.
    – Maïeul
    Commented Mar 16, 2016 at 9:18
  • @Maïeul first of all, thank for your help and for developing this fantastic package. I'm trying to do it it with the columns in reledpar but I can't stand to make it work properly, it always gives me an interructed normal paragraph of numbered text. I read carefully the package instructions but really I don't know how to do. I'm looking for an output like the first photo in the answer, only with numbers in margin. Maybe you can tell me the correct code for that, for me is very important setting the text in that way
    – qwertxyz
    Commented Mar 16, 2016 at 21:00
  • What did you try ? I could look this week-end, but not before.
    – Maïeul
    Commented Mar 16, 2016 at 23:08
  • @Maïeul Thank you, this morning I managed to do it with \widthliketwocolumnstrue (p. 9 of the documentation): it.sharelatex.com/project/56ea88ce4b34d2d1396d5250, the problem now is that I can't use alphabetic characters inside the pairs environment and that when I load the reledpar package in the complete document it shows some sort of conflict with \tableofcontents (No room for a new \write . \tableofcontents; Missing number, treated as zero. \tableofcontents)
    – qwertxyz
    Commented Mar 17, 2016 at 10:45
  • sorry ? please provides MWE… alphabetic charater can be used inside pairs environnement. And there is normally no problem with \tableofcontents, but if don't need endnote, use noend option…
    – Maïeul
    Commented Mar 17, 2016 at 10:47

2 Answers 2

4

The versions 2.9.0 of reledmac and 2.8.0 of reledpar, just send on CTAN, provides an option continuousnumberingwithcolumns to allow alternating between normal text and parallel column text using continuing line numbering.

Use \linenumberLevenifblanktrue to print the left line number even if the line is blank.

Cf this MWE, adapted from the handbook.

\documentclass{article}
\usepackage[noend,nofamiliar,series={A},noeledsec]{reledmac}
\usepackage{polyglossia}
\setmainlanguage{latin}
\usepackage{libertineotf}
\usepackage[widthliketwocolumns,continuousnumberingwithcolumns]{reledpar}
\setlength{\Lcolwidth}{0.47\textwidth}
\setlength{\Rcolwidth}{0.47\textwidth}
\columnsposition{c}
\setlength{\beforecolumnseparator}{0.03\textwidth}
\setlength{\aftercolumnseparator}{0.03\textwidth}
\linenumberLevenifblanktrue

\AtBeginPairs{\sloppy}
\usepackage{lipsum}
\firstlinenum{1}
\linenumincrement{1}
\firstlinenumR{10000000}
\begin{document}

\begin{pairs}
\begin{Leftside} 
\beginnumbering  
\pstart  
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum feugiat dolor vitae urna laoreet dapibus. Ut pulvinar nisl ultrices ex viverra, ac imperdiet sem gravida. Pellentesque malesuada augue a interdum placerat. Aenean tincidunt euismod viverra. Maecenas consectetur ligula nisi, in dignissim nulla tempus et. Aenean non scelerisque odio. 
\pend  
\pausenumbering
\end{Leftside} 

\begin{Rightside}   
\beginnumbering  
\pstart  
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum feugiat dolor vitae urna laoreet dapibus. Ut pulvinar nisl ultrices ex viverra, ac imperdiet sem gravida. Pellentesque malesuada augue a interdum placerat. Aenean tincidunt euismod viverra. Maecenas consectetur ligula nisi, in dignissim nulla tempus et. Aenean non scelerisque odio. Phasellus cursus bibendum turpis quis finibus. Aliquam porttitor arcu sit amet consectetur varius. Suspendisse dapibus, enim quis laoreet feugiat, diam ex fringilla metus, non ullamcorper eros ante sed justo. Sed eget congue enim. Morbi dictum magna sed dictum condimentum. In mattis, velit ac facilisis eleifend, nisl orci ornare nisi, at dignissim ante purus eu lacus. Pellentesque et diam odio.
\pend  
\pausenumbering
\end{Rightside}  

\end{pairs}  
\Columns

\resumenumbering
\pstart  
Lorem \edtext{ipsum}{\Afootnote{ipsam}} dolor sit amet, consectetur adipiscing elit. Vestibulum feugiat dolor vitae urna laoreet dapibus. Ut pulvinar nisl ultrices ex viverra, ac imperdiet sem gravida. Pellentesque malesuada augue a interdum placerat. Aenean tincidunt euismod viverra. Maecenas consectetur ligula nisi, in dignissim nulla tempus et. Aenean non scelerisque odio. Phasellus cursus bibendum turpis quis finibus. Aliquam porttitor arcu sit amet consectetur varius. Suspendisse dapibus, enim quis laoreet feugiat, diam ex fringilla metus, non ullamcorper eros ante sed justo. Sed eget congue enim. Morbi dictum magna sed dictum condimentum. In mattis, velit ac facilisis eleifend, nisl orci ornare nisi, at dignissim ante purus eu lacus. Pellentesque et diam odio.
\pend  
\pausenumbering

\begin{pairs}  


\begin{Leftside} 
\resumenumbering  
\pstart  

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum feugiat dolor vitae urna laoreet dapibus. Ut pulvinar nisl ultrices ex viverra, ac imperdiet sem gravida. Pellentesque malesuada augue a interdum placerat. Aenean tincidunt euismod viverra. Maecenas consectetur ligula nisi, in dignissim nulla tempus et. Aenean non scelerisque odio. Phasellus cursus bibendum turpis quis finibus. Aliquam porttitor arcu sit amet consectetur varius. Suspendisse dapibus, enim quis laoreet feugiat, diam ex fringilla metus, non ullamcorper eros ante sed justo. Sed eget congue enim. Morbi dictum magna sed dictum condimentum. In mattis, velit ac facilisis eleifend, nisl orci ornare nisi, at dignissim ante purus eu lacus. Pellentesque et diam odio.
\pend  
\pausenumbering 
\end{Leftside}

\begin{Rightside}   
\resumenumbering  
\pstart  
\edtext{Lorem}{\Afootnote{Lorim}} ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum feugiat dolor vitae urna laoreet dapibus. Ut pulvinar nisl ultrices ex viverra, ac imperdiet sem gravida. Pellentesque malesuada augue a interdum placerat. 
\pend  
\pausenumbering
\end{Rightside}  
\end{pairs}  
\Columns

\resumenumbering  
\pstart  
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum feugiat dolor vitae urna laoreet dapibus. Ut pulvinar nisl ultrices ex viverra, ac imperdiet sem gravida. Pellentesque malesuada augue a interdum placerat. Aenean tincidunt euismod viverra. Maecenas consectetur ligula nisi, in dignissim nulla tempus et. Aenean non scelerisque odio. Phasellus cursus bibendum turpis quis finibus. Aliquam porttitor arcu sit amet consectetur varius. Suspendisse dapibus, enim quis laoreet feugiat, diam ex fringilla metus, non ullamcorper eros ante sed justo. Sed eget congue enim. Morbi dictum magna sed dictum condimentum. In mattis, velit ac facilisis eleifend, nisl orci ornare nisi, at dignissim ante purus eu lacus. Pellentesque et diam odio.
\pend  
\pausenumbering

\begin{pairs}  


\begin{Leftside} 
\resumenumbering  
\pstart  

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum feugiat dolor vitae urna laoreet dapibus. Ut pulvinar nisl ultrices ex viverra, ac imperdiet sem gravida. Pellentesque malesuada augue a interdum placerat. Aenean tincidunt euismod viverra. Maecenas consectetur ligula nisi, in dignissim nulla tempus et. Aenean non scelerisque odio. Phasellus cursus bibendum turpis quis finibus. Aliquam porttitor arcu sit amet consectetur varius. Suspendisse dapibus, enim quis laoreet feugiat, diam ex fringilla metus, non ullamcorper eros ante sed justo. Sed eget congue enim. Morbi dictum magna sed dictum condimentum. In mattis, velit ac facilisis eleifend, nisl orci ornare nisi, at dignissim ante purus eu lacus. Pellentesque et diam odio.
\pend  
\pausenumbering 
\end{Leftside}

\begin{Rightside}   
\resumenumbering  
\pstart  
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum feugiat dolor vitae urna laoreet dapibus. Ut pulvinar nisl ultrices ex viverra, ac imperdiet sem gravida. Pellentesque malesuada augue a interdum placerat. Aenean tincidunt euismod viverra. Maecenas consectetur ligula nisi, in dignissim nulla tempus et. Aenean non scelerisque odio. Phasellus cursus bibendum turpis quis finibus. Aliquam porttitor arcu sit amet consectetur varius. Suspendisse dapibus, enim quis laoreet feugiat, diam ex fringilla metus, non ullamcorper eros ante sed justo. Sed eget congue enim. Morbi dictum magna sed dictum condimentum. In mattis, velit ac facilisis eleifend, nisl orci ornare nisi, at dignissim ante purus eu lacus. Pellentesque et diam odio.
\pend  
\endnumbering
\end{Rightside} 
\end{pairs}  

\Columns
\resumenumbering  
\pstart  
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum feugiat dolor vitae urna laoreet dapibus. Ut pulvinar nisl ultrices ex viverra, ac imperdiet sem gravida. Pellentesque malesuada augue a interdum placerat. Aenean tincidunt euismod viverra. Maecenas consectetur ligula nisi, in dignissim nulla tempus et. Aenean non scelerisque odio. Phasellus cursus bibendum turpis quis finibus. Aliquam porttitor arcu sit amet consectetur varius. Suspendisse dapibus, enim quis laoreet feugiat, diam ex fringilla metus, non ullamcorper eros ante sed justo. Sed eget congue enim. Morbi dictum magna sed dictum condimentum. In mattis, velit ac facilisis eleifend, nisl orci ornare nisi, at dignissim ante purus eu lacus. Pellentesque et diam odio.
\pend  
\pausenumbering

\end{document}
1
  • Thank you for your help! Now I can obtain the intended layout.
    – qwertxyz
    Commented Mar 24, 2016 at 16:41
0

Thanks to Maïeul Rouquette, I have managed to obtain what I'm looking for, by using the reledpar package with \widthliketwocolumnstrue. Furthermore, Maïeul helped me to add alphabetical counter inside the pairs environment with \linenumberstyle*{alph}:

\documentclass[a4paper, 12pt, twoside, draft ]{article}
\usepackage[top=30mm,bottom=30mm,left=30mm,right=30mm]{geometry}
\usepackage{reledmac}
\usepackage{reledpar}
\setlength{\Lcolwidth}{0.45\textwidth}
\setlength{\Rcolwidth}{0.45\textwidth}
\usepackage{lipsum}
\setlength\parindent{0pt}
\widthliketwocolumnstrue



\begin{document}

\linenumberstyle*{alph}
\firstlinenum{1}
\linenumincrement{1}

\begin{pairs}  
\begin{Rightside}   

\beginnumbering  
\pstart  
\firstlinenum{80}
\linenumincrement{1}
\lipsum[23]
\pend  
\endnumbering  
\end{Rightside}  

\begin{Leftside} 

\beginnumbering  
\pstart  

\lipsum[23]
\pend  
\endnumbering  
\end{Leftside} 
\end{pairs}  
\Columns  

\beginnumbering  
\pstart  
\setlinenum{13}
\lipsum[23]
\pend  
\endnumbering 

\end{document}

Here is the final output, that is exactly what I'm looking for: enter image description here

6
  • Notes that a \linenumberstyle*{alph} is an hack to turn around a bug of reledpar and that I will add feature, I hope this week-end, to automatically get the correct linenumber.
    – Maïeul
    Commented Mar 17, 2016 at 16:55
  • could you try the branch issue368 of reledmac ? It will add feature for continuoous numbering. See the example issue368.tex on github.com/maieul/ledmac/archive/issue368.zip (and please make feedback on github.com/maieul/ledmac/issues/368)
    – Maïeul
    Commented Mar 19, 2016 at 17:04
  • sorry, can you explain how can I do to try the branch issue368?
    – qwertxyz
    Commented Mar 20, 2016 at 17:22
  • the branc have been tested, and so deleted. I am waiting for English correction before publishing it on CTAN. However, I don't think I will publish it before wedesday.
    – Maïeul
    Commented Mar 20, 2016 at 19:05
  • So you can dowload the pre-release branch on github.com/maieul/ledmac/archive/2.9.0-2.8.0.zip. Run the .ins file with pdflatex or xelatex to get the .sty file. It is the new version of the package. Look on raw.githubusercontent.com/maieul/ledmac/… to have an example of the syntax.
    – Maïeul
    Commented Mar 20, 2016 at 19:08

You must log in to answer this question.

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