Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow up #872 - issue with stanza numbering #894

Closed
andreaacri opened this issue Jan 1, 2021 · 12 comments
Closed

Follow up #872 - issue with stanza numbering #894

andreaacri opened this issue Jan 1, 2021 · 12 comments

Comments

@andreaacri
Copy link

andreaacri commented Jan 1, 2021

Version

XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020)

TeX Engine

xelatex

Regression

Description

I have a problem with the newly introduced feature to customise apparatus numbering (see #872). In both reledmac and reledpar, the stanza numbering after a page break is not consequential, i.e. ‘forgets’ to advance of one number (so, we find stanza 5 in the apparatus lemma notes instead of 6; in my MWE we have two 5 instead of 5 [= prose passage] and 6 [= stanza and prose passage]). This affects only the stanzas (both stanza and astanza environments), not the prose paragraphs (\pstart and \pstartdiv).

I have tried to use \setcounter{mydivision}{1} but it does not fix the issue (it only works in the prose paragraphs; is that the right command to use to restart the numbering in every new section in reledpar, i.e. \begin{pages}, \begin {Leftside} etc.?)

Minimal Working Example

\documentclass[11pt,twoside]{book}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage[nomath]{libertinus}
\usepackage[parapparatus,noresetlinenumannotation]{reledmac}
\Xarrangement[A]{paragraph}
\Xarrangement[B]{paragraph}
\Xarrangement[C]{paragraph}
\Xarrangement[D]{paragraph}
\newcommand{\sktl}{\itshape\skipnumbering}
\newcommand{\ab}{\itshape\skipnumbering}
\newcommand{\cd}{\itshape\skipnumbering}
\setlength{\parindent}{0pt}
\AtEveryPend{\ifinstanza\else\vspace{\parskip}\fi}
\hidenumberingonrightpage
\sethangingsymbol{}
\linenumincrement{1}
\firstlinenum{1}
\firstsublinenum{1}
\sublinenumincrement{1}
\setlength{\stanzaindentbase}{20pt}
\setstanzaindents{2,2,2}
\setcounter{stanzaindentsrepetition}{1}
\Xnolinenumberifannotation[A,D]
\Xwraplinenumannotation{}

\newcounter{mydivision}
\Xtxtbeforenumber[A,D]{{\themydivision}}
\Xtxtbeforenumber[B,C]{{\themydivision}.}
\newcommand{\newdiv}{\refstepcounter{mydivision}}
\newcommand{\pstartdiv}{\pstart[\newdiv]\setline{1}\ledsidenote{\ \textbf{\themydivision}}}
\makeatletter
\Xwraplinenumannotationside{\@gobble}
\makeatother

\begin{document}

\beginnumbering


\skipnumbering
\pstart
\centering{||} O{||} \textit{avighnam astu}{||} O{||}
\pend

\pstartdiv
\noindent{}\edtext{saṅ}{\Bfootnote{em.; sa LOr}} saṅgrahakāri sira movus{|} liṅnira{|}
\pend

\begin{stanza}
\ab\linenumannotation{a}\edtext{śūnyaś}{\Afootnote{em.; śūnya A}}  ca \edtext{nirbbāṇādhikaḥ{|} \linenumannotation{b}śivāṅgatve}{\Afootnote{em; nirbbhāṇādhika{|} śśivaṅgatve A, B}} nirīkṣyate{|}&
\cd\linenumannotation{c}kutaḥ tadvākyam atulaṁ{|} \linenumannotation{d}śrutvā devo \edtext{’vatiṣṭhati}{\Afootnote{em; vatiṣṭha{|} ca A, B}}{||} \normalshape 1\&[ ]
\end{stanza}


\pstart
\resetlinenumannotation{}nāhan takvanaknaniṅ hulun ri bhaṭāra{|} hana ya pada śūnya{|} ya sinaṅguh ka\-mo\-kṣan{|} ṅa{|} viśeṣa ya{|} ya śiva ṅaranya{|} \textit{nirīkṣyate}{|} katon pva ya de saṅ \edtext{yogīśvara}{\lemma{\ldots{}gīśvara}\Cfootnote{B om.}}{|} sājñā bhaṭāra{|} an maṅkana kottamaniṅ vuvus saṅ ṛṣi{|} ya ta kaṛṅĕ de bhaṭāra{||} 
\pend

\pstartdiv
\linenumannotation{a}\edtext{\textit{\edtext{kenopāyenax bhagavanx}{\Afootnote{em.; meyopāyena bhagavān LOr}\Dfootnote{unmetrical (\textit{bha-vipulā} with short second syllable)}}}{|}\linenumannotation{b}\textit{sukhayogasya lakṣaṇaṁ}}{\lemma{kenopāyena \ldots\ lakṣaṇam}\Cfootnote{cf. BhK 25.1}}{|} \resetlinenumannotation{}\edtext{nihanxy}{\Bfootnote{conj.; nāhan A}} takvananiṅ hulun ri kita bha\-ṭā\-ra{|} ndya kunaṅ \edtext{upāyanikā}{\Bfootnote{corr.; opāyanikā A}} saṅ paṇḍita{|} mataṅyan kapaṅguhāvaknikaṅ sukhādhyātmika{||} 
\pend

\pstartdiv
\textit{deva uvāca}{|} \edtext{mojar ta}{\Bfootnote{mojar PDok}} bhaṭāra{|} liṅnira{||}
\pend

\begin{stanza}
\skipnumbering\itshape
\linenumannotation{a}svaśarīre mahāyogī{|} \linenumannotation{b}\edtext{paśyate}{\Dfootnote{for dr̥śyate?}} hr̥dayāntare{|}&
\skipnumbering\linenumannotation{c}\itshape\edtext{vākyan}{\Dfootnote{vācyan ?}}  te parameśānam{|} \linenumannotation{d}\edtext{sūryyāyutasamaprabham}{\Afootnote{em.; °tamamapra° all mss.}}{||} \normalshape 3\&[ ]
\end{stanza}


\pstart
\resetlinenumannotation{}nihan \edtext{vuvusaniṅ}{\Bfootnote{vuvusniṅ PDok}} hulun i kita{|} ikā saṅ mahāyogī{|} sira tumon bhaṭāra \edtext{parameśvara}{\Bfootnote{prameśvara PDok}}{|} sateja sira lāvan tejaniṅ āditya sāyuta{|} \edtext{ṅkā ri śarīranira}{\Bfootnote{ṅkā riṅ śarīraniraṅ PDok}}  mvaṅ ri hatinira{||} 
\pend

\pstartdiv
\linenumannotation{a}\edtext{\textit{\edtext{kenopāyena bhagavan}{\Afootnote{em.; meyopāyena bhagavān LOr}\Dfootnote{unmetrical (\textit{bha-vipulā} with short second syllable)}}}{|}\linenumannotation{b}\textit{sukhayogasya lakṣaṇaṁ}}{\lemma{kenopāyena \ldots\ lakṣaṇam}\Cfootnote{cf. BhK 25.1}}{|} \linenumannotation{}\edtext{nihanx}{\Bfootnote{conj.; nāhan A}} takvananiṅ hulun ri kita bha\-ṭā\-ra{|} ndya kunaṅ \edtext{upāyanikā}{\Bfootnote{corr.; opāyanikā A}} saṅ paṇḍita{|} mataṅyan kapaṅguhāvaknikaṅ sukhādhyātmika{|} \linenumannotation{c}another Sanskrit half-line{|} old javanese prose{||} 
\pend

\pstartdiv
\linenumannotation{a}\edtext{\edtext{\textit{kenopāyena bhagavan}}{\Afootnote{em}} \linenumannotation{b}{|}\textit{sukhayogasya lakṣaṇaṁ}{|} \linenumannotation{c}\textit{some more Sanskrit some more Sanskrit spanning two lines}}{\lemma{ddd}\Cfootnote{kenopāyena...}}\resetlinenumannotation{}\edtext{nihanx}{\Bfootnote{conj.; nāhan A}} takvananiṅ hulun ri kita bha\-ṭā\-ra{|} ndya kunaṅ \edtext{upāyanikā}{\Bfootnote{corr.; opāyanikā A}} saṅ paṇḍita{|} mataṅyan kapaṅguhāvaknikaṅ sukhādhyātmika{||} 5
\pend

\begin{stanza}
\ab\linenumannotation{a}\edtext{śūnyaś}{\Afootnote{em.; śūnya A}}  ca \edtext{nirbbāṇādhikaḥ{|} \linenumannotation{b}śivāṅgatve}{\Afootnote{em; nirbbhāṇādhika{|} śśivaṅgatve A, B}} nirīkṣyate{|}&
\cd\linenumannotation{c}kutaḥ tadvākyam atulaṁ{|} \linenumannotation{d}śrutvā devo \edtext{’vatiṣṭhati}{\Afootnote{em; vatiṣṭha{|} ca A, B}}{||} \normalshape 6\&[ ]
\end{stanza}

\pstartdiv
\resetlinenumannotation{}nāhan takvanaknaniṅ hulun ri bhaṭāra{|} hana ya pada śūnya{|} ya sinaṅguh ka\-mo\-kṣan{|} ṅa{|} viśeṣa ya{|} ya śiva ṅaranya{|} \textit{nirīkṣyate}{|} katon pva ya de saṅ \edtext{yogīśvara}{\lemma{\ldots{}gīśvara}\Cfootnote{B om.}}{|} sājñā bhaṭāra{|} an maṅkana kottamaniṅ vuvus saṅ ṛṣi{|} ya ta kaṛṅĕ de bhaṭāra{||} 6
\pend

\endnumbering

\end{document}

Workaround

@maieul
Copy link
Owner

maieul commented Jan 1, 2021

I am not sur to understand well. The stanza part startting with śūnyaś ca nirbbāṇādhikaḥ| śivāṅgatve nirīkṣyate| should be numbered 6 and not 5? I though, with your august example, that division number should be increased only at the begining of prose section (that, when we add it in the right side).

To restart division, you should use \setcounter{mydivision}{0} not \setcounter{mydivision}{1} (as first mydiv will increase it.

@andreaacri
Copy link
Author

The stanza should definitely be numbered 6 as the numeration follows the convention "numeration by paragraph", and one "paragraph" = one stanza + prose passage, or only prose passage.

If I use \setcounter{mydivision}{0}, the stanza numbering is messed up: the first stanza is 0, and on subsequent pages, they are two numbers less than what they should be (e.g. 2a where I would expect 4a). Please let me know if I need to produce a MWE for that problem as well.

@maieul
Copy link
Owner

maieul commented Jan 1, 2021

It was not so clear. For example the paragraph 1 starts with stanza, so I thought we must increase number only at new prose passage, not stanza one...

And so what about line numbering?

YOur scheme is definitivly not clear for not specialist, like me. But you have all the tool to produce it, just you must clarify.

@andreaacri
Copy link
Author

Paragraph 1 (as well as 3) actually starts with a single prose line, which is part of the same paragraph (I take it as an introductory line to the stanza).

The concept is this: the text is bilingual, and revolves around verses (stanzas), each one of which is provided with a "commentary" or "translation" in prose (just like 6 in the example). I call this structure a "dyad", whose numeration in the output is given on the right margin (in the MWE, from 1 to 6). The numeration of these "paragraphs" is actually exactly the same as that of the stanzas. There are also cases where no "quoted" stanza is given, but rather embedded as fragments within the prose. In that case, I consider that prose passage a "paragraph", which follows the same numeration of the stanzas. See for instance paragraph 2.

Line numbering in the example is perfectly fine, just as I want it. The problem is in the stanza numbering in the apparatus. Strangely enough, the first page is OK, and the problem always occurs from the second page onwards. I don't understand why.

@maieul
Copy link
Owner

maieul commented Jan 1, 2021

Well, I confirm that is not clear.

  • Why śūnyaś ca nirbbāṇādhikaḥ| śivāṅgatve nirīkṣyate should have the same number that saṅ saṅgrahakāri sira movus| liṅnira| (that is 1.) but śūnyaś ca nirbbāṇādhikaḥ| śivāṅgatve nirīkṣyate| should have a different number than kenopāyena bhagavan |sukhayogasya lakṣaṇaṁ| some more Sanskrit some more (that is 6 vs 5)? How could it be possible to know it automatically, and so latex.
  • And what about nāhan takvanaknaniṅ hulun ri bhaṭāra| hana ya pada śūnya|. Should it be 7 instead of 6 ?
  • Should we put the "6" number it the rigth margin close to śūnyaś ca nirbbāṇādhikaḥ| śivāṅgatve nirīkṣyate| ?

Line numbering in the example is perfectly fine, just as I want it. The problem is in the stanza numbering in the apparatus. Strangely enough, the first page is OK, and the problem always occurs from the second page onwards. I don't understand why.

That is not linked in any case to page. If we change to a3 paper, the problem still happen. The problem, that you don't understand, it that we can't guess automatically your "paragraph" number. We should increase it manually. That is done with the \refstepcounter{mydivision}, called by \newdiv, called as optional argument of \pstart in the \pstartdiv macro. So, if sometime the division must be increase at the very beginning of a stanza part, you may call \newdiv as optional argument of \stanza (or astanza environment).

In summary: computer does not do magic, but only what you ask to do....

@andreaacri
Copy link
Author

andreaacri commented Jan 1, 2021 via email

@maieul
Copy link
Owner

maieul commented Jan 2, 2021

You are in the good way

I will look now at your problem of spurious space now.

@maieul
Copy link
Owner

maieul commented Jan 2, 2021

(well, looking about your explanation on the numbering schemes : sorry, but I don't read sanskrite nore old javanese, so for me all your texts are the same.... I could'nt know which was commentaries and which was not).

@maieul
Copy link
Owner

maieul commented Jan 2, 2021

Note \setromanfont is a switching command, not a command with the text in argument. So you should do {\setromanfont[Numbers=OldStyle]{MinionProIE-Regular}#1} instead of \setromanfont[Numbers=OldStyle]{MinionProIE-Regular}{#1}

@andreaacri
Copy link
Author

andreaacri commented Jan 2, 2021 via email

@maieul
Copy link
Owner

maieul commented Jan 2, 2021

Sorry, type

{\setromanfont[Numbers=OldStyle]{MinionProIE-Regular}#1} instead of \setromanfont[Numbers=OldStyle]{MinionProIE-Regular}{#1}

@maieul
Copy link
Owner

maieul commented Jan 2, 2021

I would have suggest that !

@maieul maieul closed this as completed Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants