maieul / ledmac

package reledmac for latex
http://www.ctan.org/tex-archive/macros/latex/contrib/reledmac
54 stars 28 forks source link

Parallel columns: lineation numbering not workink #513

Closed Doc73 closed 8 years ago

Doc73 commented 8 years ago

Cf. issue #368 In this MWE, lineation{page} isn't working, probably due to parallel text splitted in two pages. In fact, if we remove lines betwen %%%%%%, we obtain right line numbering.

Here is the MWE:

% !TeX program = xelatex
% !TeX encoding = UTF-8
% !TeX spellcheck = it_IT

\documentclass[b5paper]{book}

\usepackage{fontspec}
\setmainfont{Linux Libertine O}

\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}

\usepackage[noledgroup,noeledsec,series={A,B,C}]{reledmac}
\lineation{page}
\linenummargin{inner}
\sidenotemargin{outer}
\Xnotefontsize[A,B,C]{\footnotesize}
\renewcommand*{\ledlsnotefontsetup}%
    {\raggedleft\it\footnotesize}
\renewcommand*{\ledrsnotefontsetup}%
    {\raggedright\it\footnotesize}
\setsidenotesep{ \emph{|} }
\Xnonumber[A,B]
\Xnumberonlyfirstinline[C]
\Xnumberonlyfirstintwolines[C]
\Xinplaceofnumber[A,B,C]{0em}
\Xnolemmaseparator[A,B]
\Xnonbreakableafternumber[C]
\Xinplaceoflemmaseparator[A,B]{0em}
\Xinplaceoflemmaseparator[C]{.5em}
\addtolength{\skip\Afootins}{2em plus.4em minus.4em}
\Xbeforenotes[A]{2em plus.4em minus.4em}
\Xafternote[A,B,C]{2em plus.4em minus.4em}
\Xarrangement[A,C]{paragraph}
\Xarrangement[B]{normal}
\labelpstarttrue

\usepackage[widthliketwocolumns,continuousnumberingwithcolumns]{reledpar}
\setlength{\Lcolwidth}{0.48\textwidth}
\setlength{\Rcolwidth}{0.48\textwidth}
\setlength{\beforecolumnseparator}{0.02\textwidth}
\setlength{\aftercolumnseparator}{0.02\textwidth}
\columnsposition{J}
\AtBeginPairs{\sloppy}

\begin{document}

\beginnumbering
\numberpstarttrue

\pstart
    Paragraph nr. 1] Quel ramo del lago di Como, che volge a mezzogiorno, tra due catene non interrotte di monti, tutto a seni e a golfi, a seconda dello sporgere e del rientrare di quelli, vien, quasi a un tratto, a ristringersi, e a prender corso e figura di fiume, tra un promontorio a destra, e un'ampia costiera dall'altra parte; e il ponte, che ivi congiunge le due rive, par che renda ancor più sensibile all'occhio questa trasformazione, e segni il punto in cui il lago cessa, e l'Adda rincomincia, per ripigliar poi nome di lago dove le rive, allontanandosi di nuovo, lascian l'acqua distendersi e rallentarsi in nuovi golfi e in nuovi seni.
\pend

\pstart\edlabel{test}%
    \edtext{}{\Bfootnote{{\textbf{\pstartref{test}}}\enspace nel mezzo del cammin}}%
    Paragraph nr. 2%
\pend

\pstart\edlabel{test}%
    \edtext{}{\Bfootnote{{\textbf{\pstartref{test}}}\enspace nel mezzo del cammin}}%
    Paragraph nr. 3%
\pend

\pausenumbering
\begin{pairs}
\begin{Leftside}
\resumenumbering
\numberpstartfalse
    \pstart\noindent Q. Mucius augur multa narrare de C. Laelio socero suo memoriter et iucunde solebat nec dubitare illum in omni sermone appellare sapientem; ego autem a patre ita eram deductus ad Scaevolam sumpta virili toga, ut, quoad possem et liceret, a senis latere numquam discederem; itaque multa ab eo prudenter disputata, multa etiam breviter et commode dicta memoriae mandabam fierique studebam eius prudentia doctior. \textbf{A}\pend
\pausenumbering
\end{Leftside}

\begin{Rightside}
\beginnumbering
\numberpstartfalse
    \pstart\noindent Quinto Mucio l'augure raccontava spesso, a memoria e in modo piacevole, molti episodi della vita di Caio Lelio, suo suocero, e in ogni discorso non esitava a chiamarlo "il Saggio". A Scevola ero stato affidato da mio padre, quando presi la toga virile, perché non mi staccassi mai dal fianco del vecchio, nei limiti del possibile e del consentito. Perciò, fissavo nella mente molti dei suoi accorti ragionamenti e anche molte delle sue massime secche e gustose, e cercavo di migliorare la mia educazione facendo tesoro della sua esperienza di vita. \textbf{B}\pend
\pausenumbering
\end{Rightside}
\end{pairs}
\Columns

\resumenumbering
\numberpstarttrue

\pstart \edlabel{itm:Ri33}\edtext{}{\Bfootnote{{\textbf{\pstartref{itm:Ri33}}}\enspace cf. Poll. 5.143, Hesych. σ 2293 (ex Cyr.), sed ex Platonis ipsius verbis quam e fontibus quibusdam sch. sumptum mihi videtur}}333a13 \textit{συμβόλαια Slings: ξυμβόλαια ADT}]\pend

\pausenumbering
\begin{pairs}
\begin{Leftside}
\resumenumbering
\numberpstartfalse
    \pstart\noindent \textbf{a)} σημείωσαι τίνα τὰ ξυμβόλαιά φησιν, ὅτι τὰ κοινωνήματα. \textbf{A}\pend
\pausenumbering
\end{Leftside}

\begin{Rightside}
\resumenumbering
\numberpstartfalse
    \pstart\noindent \textbf{b)} ὅτι συμβόλαια φησὶ τὰ κοινωνήματα. \textbf{T}\pend
\pausenumbering
\end{Rightside}
\end{pairs}
\Columns

\numberpstarttrue
\resumenumbering

\pstart%
    Paragraph nr. 5%
\pend

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pausenumbering
\begin{pairs}
\begin{Leftside}
\resumenumbering
\numberpstartfalse
    \pstart
    Quel ramo del lago di Como, che volge a mezzogiorno, tra due catene non interrotte di monti, tutto a seni e a golfi, a seconda dello sporgere e del rientrare di quelli, vien, quasi a un tratto, a ristringersi, e a prender corso e figura di fiume, tra un promontorio a destra, e un'ampia costiera dall'altra parte; e il ponte, che ivi congiunge le due rive, par che renda ancor più sensibile all'occhio questa trasformazione, e segni il punto in cui il lago cessa, e l'Adda rincomincia, per ripigliar poi nome di lago dove le rive, allontanandosi di nuovo, lascian l'acqua distendersi e rallentarsi in nuovi golfi e in nuovi seni.
    \pend
\pausenumbering
\end{Leftside}

\begin{Rightside}
\resumenumbering
\numberpstartfalse
    \pstart
    Quel ramo del lago di Como, che volge a mezzogiorno, tra due catene non interrotte di monti, tutto a seni e a golfi, a seconda dello sporgere e del rientrare di quelli, vien, quasi a un tratto, a ristringersi, e a prender corso e figura di fiume, tra un promontorio a destra, e un'ampia costiera dall'altra parte; e il ponte, che ivi congiunge le due rive, par che renda ancor più sensibile all'occhio questa trasformazione, e segni il punto in cui il lago cessa, e l'Adda rincomincia, per ripigliar poi nome di lago dove le rive, allontanandosi di nuovo, lascian l'acqua distendersi e rallentarsi in nuovi golfi e in nuovi seni.
    \pend
\pausenumbering
\end{Rightside}
\end{pairs}
\Columns

\resumenumbering
\numberpstarttrue
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pstart%
    Paragraph nr. 6%
\pend

\pstart%
    Paragraph nr. 7%
\pend

\pstart%
    Paragraph nr. 8%
\pend

\pstart%
    Paragraph nr. 9%
\pend

\pstart%
    Paragraph nr. 10%
\pend

\pstart%
    Paragraph nr. 11%
\pend

\pstart%
    Paragraph nr. 12%
\pend

\pstart%
    Paragraph nr. 13%
\pend

\pstart%
    Paragraph nr. 14%
\pend

\pstart%
    Paragraph nr. 15%
\pend

\pstart%
    Paragraph nr. 16%
\pend

\pstart%
    Paragraph nr. 17%
\pend

\pstart%
    Paragraph nr. 18%
\pend

\pstart%
    Paragraph nr. 19%
\pend

\pstart%
    Paragraph nr. 20%
\pend

\pstart%
    Paragraph nr. 21%
\pend

\pstart%
    Paragraph nr. 22%
\pend

\pstart%
    Paragraph nr. 23%
\pend

\pstart%
    Paragraph nr. 24%
\pend

\endnumbering

\end{document}
Doc73 commented 8 years ago

This is the result after lots of compilations: issue.pdf

maieul commented 8 years ago

there is also a problem with false number wrotten I right column. I will look as soon as possible

maieul commented 8 years ago

\columnsposition{J} means nothing

maieul commented 8 years ago

you must use \lineation*{page} and not just \lineation{page}. It will restart also lineation for right colum.

However, there is a problem with \linenummargin{inner} when ousing parallel column > in left page, it make the left number be between the columns. I have to think of a good way to avoid it

Doc73 commented 8 years ago

Tested right now \lineation*{page}, but it doesn't work, at least with this MWE. Can't understand the issue with \linenummargin{inner}...

Anyway, I'll wait your solution. Thank you very much.

maieul commented 8 years ago

I can assure you that is working when running latexmk on the file https://github.com/maieul/ledmac/blob/6446e884b1a490ede45c47988bb739099bbc7206/issue513.tex, derivated from your file.

The problem with \linenummargin{inner} is relativly easy to understand. For left pages, eg even pages. (2, 4, 6 etc.), "inner" means "at right". So with \linenummargin{inner}, the line number of the left column are, in even page, on the right of the column, so between the left and the right column.

Cf this screenshot, you can see the linenumber just along the left of the right column, so between the two column.

inner-column-leftpage

The solution I will propose is to add the possibility to tell that left side line number has to be print only on odd / on even page, and same for right side line number. For the one column text, nothings will change.

Doc73 commented 8 years ago

Yes, with your modifications it works, altough after lots of runs.

Your idea is not bad, because in the outer margin I insert marginal notes, that may overlap with the line numbers. For this reason, I'd prefer to have only numbers in inner margin.

maieul commented 8 years ago

it will be problematic for you if you to insert marginal note for left column in right page, I guess�

Doc73 commented 8 years ago

Yes, I noticed the problems, but I think I can solve them linking marginal notes not to the scholium, but to its lemma, according to this schema:

Lemma\ledsidenote{Bla}
Left side
Right side
Doc73 commented 8 years ago

Or, alternatively, is it possible to let ledsidenote go into marginal space anyway?

maieul commented 8 years ago

should be a new issue for next time

Le 24 mars 2016 � 22:48, Domenico notifications@github.com a �crit :

Or, alternatively, is it possible to let ledsidenote go into marginal space anyway?

� You are receiving this because you commented. Reply to this email directly or view it on GitHub

Doc73 commented 8 years ago

However, I tried your changes in my book and the aforementioned problem remains: after the first case of parallel text, the line numbering restarts.

I will try to reproduce the issue with a MWE.

ledmac

maieul commented 8 years ago

do you use latexmk to be sure to have run the good number of time ?

Doc73 commented 8 years ago

Boh! I don't know this latexmk, but I compiled the document several times

maieul commented 8 years ago

You don't know latexmk ? You should look on it. It ensure you to compile the good number of time, has it run LaTeX everytime before auxiliary file be stable.

Doc73 commented 8 years ago

Just tried with latexmk (very very very slow: it made 4 or 5 compilations), but same result.

maieul commented 8 years ago

hum. so yes, need mwe. I don't see what could be the problem

Doc73 commented 8 years ago

I think it is related to the fact that in first rightside env I am forced to write \beginnumbering, otherwise I get lots of errors.

BTW, later or tomorrow I'll provide a MWE.

maieul commented 8 years ago

it is normal to have that� and normally should be taken in account.

Doc73 commented 8 years ago

It is very difficult reproduce this bug, but in my MWE other bugs in lineation numbers appeared.... I'll try again and again! :sob:

Doc73 commented 8 years ago

It is completely absurd!!!!!!

I tried preparing a zip file containg the main file and the chapter where I found this bug to send to you via mail, in their original and unmodified form, but there are issues, also after lots and lots of compilations, with marginal notes, but NOT in lineation numbers. NOT THE ISSUE THAT I HAVE SHOWN ABOVE!

I do not know what to tell you...

maieul commented 8 years ago

I don' know�

maieul commented 8 years ago

I close this issue. When you will have a real MWE, please open a new one.