maieul / ledmac

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

Stanzas and eledmac #236

Closed Doc73 closed 9 years ago

Doc73 commented 9 years ago

Dear Maieul, I'm trying to typeset a document with prose and poetry, but I'm finding it hard to understand the documentation about stanza environment. With the following example I get a myriad of errors:

% !TeX program = xelatex
% !TeX encoding = UTF-8
% !TeX spellcheck = it_IT
% !TeX root = Teodicea2.tex
% !BIB TS-program = biber

\documentclass{book}

\usepackage{fontspec}
    \setmainfont[Ligatures=TeX, %
        Numbers=OldStyle, %
        Scale=0.95 %
        ]{Linux Libertine O}

\usepackage{polyglossia}
    \setmainlanguage[babelshorthands=true]{italian}
    \setotherlanguages{latin,greek,german}
        \setkeys{greek}{variant=polytonic}
        \setkeys{german}{babelshorthands=true}

\usepackage{eledmac,eledpar}
    \lineation{page}
    \linenummargin{inner}
    \footparagraph{A}
    \footparagraph{B}
    \footparagraph{C}

\begin{document}
%\beginnumbering
\stanza
Nec tamen, haec cum sint hominumque boumque labores&
uersando terram experti, nihil improbus anser&
Strymoniaeque grues et amaris intiba fibris&
officiunt aut umbra nocet. pater ipse colendi&
haud facilem esse uiam uoluit, primusque per artem&
mouit agros, curis acuens mortalia corda&
nec torpere graui passus sua regna ueterno.&
ante Iouem nulli subigebant arua coloni:&
ne signare quidem aut partiri limite campum&
fas erat; in medium quaerebant, ipsaque tellus&
omnia liberius nullo poscente ferebat.&
ille malum uirus serpentibus addidit atris&
praedarique lupos iussit pontumque moueri,&
mellaque decussit foliis ignemque remouit&
et passim riuis currentia uina repressit,&
ut uarias usus meditando extunderet artis&
paulatim, et sulcis frumenti quaereret herbam,&
ut silicis uenis abstrusum excuderet ignem.&
tunc alnos primum fluuii sensere cauatas;&
nauita tum stellis numeros et nomina fecit&
Pleiadas, Hyadas, claramque Lycaonis Arcton.&
tum laqueis captare feras et fallere uisco&
inuentum et magnos canibus circumdare saltus;&
atque alius latum funda iam uerberat amnem&
alta petens, pelagoque alius trahit umida lina.&
tum ferri rigor atque argutae lammina serrae&
(nam primi cuneis scindebant fissile lignum),&
tum uariae uenere artes. labor omnia uicit&
improbus et duris urgens in rebus egestas.&
prima Ceres ferro mortalis uertere terram&
instituit, cum iam glandes atque arbuta sacrae&
deficerent siluae et uictum Dodona negaret.&
mox et frumentis labor additus, ut mala culmos&
esset robigo segnisque horreret in aruis&
carduus; intereunt segetes, subit aspera silua&
lappaeque tribolique, interque nitentia culta&
infelix lolium et steriles dominantur auenae.&
quod nisi et adsiduis herbam insectabere rastris&
et sonitu terrebis auis et ruris opaci&
falce premes umbras uotisque uocaueris imbrem,&
heu magnum alterius frustra spectabis aceruum&
concussaque famem in siluis solabere quercu.\&
%\endnumbering

\end{document}
%%% Local Variables:
%%% coding: utf-8
%%% mode: latex
%%% TeX-engine: xetex
%%% TeX-master: t
%%% End:

Am I wrong in something or there is a bug?

Best regards, Domenico

maieul commented 9 years ago

You must use \beginnumbering \endnumbering + \setstanzaindents (to set the indentation of verse and hangingverse) + stanzaindentrepetition (to set it for everytime).

See 1ab40ed and the begining of § 5.

I am hesitating to add clearer message : it will implie to do many test, which we make a slower compilation.=

Doc73 commented 9 years ago

Ok! Thanks!

Maybe could you add clearer info in doc?

Other questions: 1) could be possible set number of first verse manually? As you can see, this text is taken from Vergil's Georgics; 2) in \setstanzaindents{2,0} it is not clear the meaning of the numbers and, if I change one of them, nothing appens; 3) is it possible add a manual indent in random verses? It would be useful in epic poems, for example.

In short, IMHO, it might be useful to add some short example in the documentation.

Thank you very much again!

maieul commented 9 years ago

sorry, but in my senses the handbook (not mine !) is very clear

The numerical entries must be whole numbers, 0 or greater, separated by commas without embedded spaces. The first entry gives the hanging indentation to be used if the stanza line requires more than one print line.

In order to use the stanza macros, one must set the indentation values. First the value of \stanzaindentbase should be set, unless the default value 20pt is desired. Every stanza line indentation is a multiple of this.

To specify these multiples one invokes, for example \setstanzaindents{3,1,2,1,2}.

I have also added an example in the example folder

So in the MWE:

See e43070b for must explicit example

So for your question: a) You could do something like \setstanzaindent{0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} etc and don't use stanzaindentrepetition b) I have answered in this message c) You could do it with setstanzaindent.

Maybe I could add a \stanzaindentexception with will do an exception when called at the begining of a specific verse :

Doc73 commented 9 years ago

No, no, sorry! In item nr. 1 (a), I was not clear! In my MWE numbering starts with 1, but I wish it started at, for example, 150.

As for the point 3 (c), I think of continue poems, like the Iliad or the Aeneid, in which the indentation does not follow fixed rules.

maieul commented 9 years ago

the way the indentation is managed is independant of the line number. i understand for c. It's possible : you just have to define a list of indent for each verse. I am trying to make it easier ...

Doc73 commented 9 years ago

Yes, I understand that point 1 (a) is independet from line number! They are different questions!

Many thanks!

Il giorno gio 22 gen 2015 alle 20:12, Maïeul Rouquette notifications@github.com ha scritto:

the way the indentation is managed is independant of the line number. i understand for c. It's possible : you just have to define a list of indent for each verse. I am trying to make it easier ... — Reply to this email directly or view it on GitHub.

maieul commented 9 years ago

for the case where we have a general repetition rule for indent with exception, I have created two command \stanzaindentexception and \stanzaindentexception* which, called at the begining of a verse, could change the indent for a specific verse.

See the file issue226 in the branch issue226.

Is it what you need for Homer?=

maieul commented 9 years ago

I you want to re-write the handbook, send a proposition.

Doc73 commented 9 years ago

Tomorrow, I'll try your suggestions.

But I would remember that English is not my language.... Il 22/gen/2015 22:09 "Maïeul Rouquette" notifications@github.com ha scritto:

I you want to re-write the handbook, send a proposition.

— Reply to this email directly or view it on GitHub https://github.com/maieul/ledmac/issues/236#issuecomment-71099158.

maieul commented 9 years ago

it is not mine too;-) you can just send an idea of structure.

Doc73 commented 9 years ago

@maieul Issue226 or issue236? I can't find an issue226! Later I'll try! I hope today! :-(

maieul commented 9 years ago

236

Doc73 commented 9 years ago

Great! The commands work as expected, altough I can't understand the difference between the starred and the not starred version.

The real problem is that the system of repetition seems to me not necessary: it does concern, for example, at least for the classics, a few poetic genres, but NOT epos, drama, etc.

In short, I would suggest to implement, if possible, a system in which by default we can put manual indentation where it is needed. The repetition can become, in short, a possibility at our disposal, but not the norm!

In this way, the code would become simpler, since we could also insert indentation by hand, without even resorting to the system of repetition.

What do you think about my opinion?

maieul commented 9 years ago

the difference between the two version is in managing repetition.

If you don't need repetition, just use

setstanzaindents{2,0}
\setcounter{stanzaindentrepetition}{1}

and use the \stanzaindentexception (which could be rename in \stanzaindent) in each verse.

The \setcounter{stanzaindentrepetition}{1} could not be the default value, because it will break the standard behavior. And I think there is more poems with regular indent than without ...=

maieul commented 9 years ago

I have changed stanzaindentexception to stanzaindent.

For the ≠ between starred and not starred version, see the verses arounde verses 10 and around verses 16. The indentation are not the same...=

Doc73 commented 9 years ago

Ah, ok! I now understand!

I can try to rewrite part of the documentation, but I do not promise anything, because I'm very busy!

About the other question, if it's possible to let numbering start from a certain number, for example 140, should I open a new ticket? This feature can be useful in the case of partial editions of longer texts.

maieul commented 9 years ago

I don't understand what is your need for your last problem. \setline is not enough?

Doc73 commented 9 years ago

Ah! \setline is perfect!

Simply, I didn't know it.

Mani thanks!!!

maieul commented 9 years ago

I will publish new version. for handbook change, take time...