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

Wrong indents (ragged left) for verses following a verse that is as width as \textwidth #138

Closed
tweh opened this issue Oct 23, 2013 · 13 comments

Comments

@tweh
Copy link
Contributor

tweh commented Oct 23, 2013

There seems to be a bug, as you can se in the image the verses of the second stanza are set ragged left but indeed they shouldn’t be …

ragged left verses

\documentclass{scrbook}% [1] using book instead

\usepackage{eledmac}
\usepackage[%
    shiftedpstarts% [2] disabling this
]{eledpar}

\setstanzaindents{1,0}% [3] replacing 1 by 0
\setcounter{stanzaindentsrepetition}{1}

\begin{document}
\begin{pages}
\begin{Leftside}
    \beginnumbering
    \stanza
    xxxxxx xx x xxxxxx xxxxxxxx xxxxxxx. xxxxx &
    xxxx xxxxx xxxxxxx xxxxxx xxxxxxx xxxxxxx.
    \&

    \stanza
    xxx xxxxx xxxxx xxxxxx xxx xxxxxx, xxxxx &
    xxx xxxxxxx xxxxxxxxx xxxxx xxxxxxx xx xxxx: &
    xxxx xxxxxx xxxxxx, xxxx xxxxxxx, xxxxx xxxxxxx &
    \&
    \endnumbering
\end{Leftside}
\begin{Rightside}
    \beginnumbering
    \stanza
    xxxxxx xx xxxxxxxx xxxxxx, xxxx xxx xxxxxxx xxx xxxxxx xxxxxx xxxxxxxxxxxx. &
    Die Hand selbst brachte als hellklingende Stellvertreterin der Zunge die Stimme hervor.
    \&

    \stanza
    xxxxx xxx xxx xxxxx xxxx xxx xxxxx xxx xxxxx xxx xxxx, xxxxxxx xxx xxxxxx &
    xxxxxx xxx xxx xxxx xxxäxxxxxx xxxx xx xxxxx xxxxxxxxxx &
    xxxx xxxxx xxxx xxxxxxx xxx, xxxx xxxxx, xxx xxx xxx xxxxxxxxxx &
    \&
    \endnumbering
\end{Rightside}
\Pages 
\end{pages} 
\end{document}

I guess the problem is that the second verse has nearly exactly the same width as \textwidth, removing some letters will solve the problem. Furthermore [1] replacing the document class (which changes \textwidth), [2] disabling shiftedpstarts and [3] setting the first indent to 0 will “solve” the problem but all these are no option for me …

I hope you got a quick fix for this because the book should be published very soon.

@maieul
Copy link
Owner

maieul commented Oct 23, 2013

I will try this night, and if I can't debug, this week-end

@tweh
Copy link
Contributor Author

tweh commented Oct 23, 2013

That's great. Merci!

@tweh
Copy link
Contributor Author

tweh commented Oct 23, 2013

Good morning,

I got two additional questions:

  1. The counter stanzaindentsrepetition seems not to work fully correct. When I use
    \setstanzaindents{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,%
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,%
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,%
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,%
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
    everything is fine (exempt the known issue and question 2 below ...) but with
    \setstanzaindents{1,0}
    \setcounter{stanzaindentsrepetition}{1}
    I get a “missing number” error for each verse ... any ideas?
  2. The first number in \setstanzaindents is used to indent the part of a verse running in the next line, but this line should be indented by a fixed value (i.e. \stanzaindentbase) but flush right (or ragged left). This was the behavior but it seems to have changed and I’m not sure. As I understand the manual of eledmac a line should never flush right and always be indented by n_\stanzaindentbase, right? And if this is the designed behavior is it possible to achieve that an additional line ail be set flush right , i.e. by defining \hangingsymbol as \hspace_{\fill}?

Kind regards,
Tobi

@maieul
Copy link
Owner

maieul commented Oct 23, 2013

For you additional question, please open 2 distinct tickets.

@tweh
Copy link
Contributor Author

tweh commented Oct 23, 2013

While trying to set up a MWE for the first question it came out the the problem was caused by a creepy aux file (of an other \included chapter) so theres no problem anymore.

I posted #139 for my second question. I hope you can understand what I was trying to say :-)

@maieul
Copy link
Owner

maieul commented Oct 23, 2013

First, you must not add space between your punct and the &.

So

`xxxxxx xx xxxxxxxx xxxxxx, xxxx xxx xxxxxxx xxx xxxxxx xxxxxx xxxxxxxxxxxx.&``

and not

`xxxxxx xx xxxxxxxx xxxxxx, xxxx xxx xxxxxxx xxx xxxxxx xxxxxx xxxxxxxxxxxx. &``

and

`Die Hand selbst brachte als hellklingende Stellvertreterin der Zunge die Stimme hervor.&``

and not

Die Hand selbst brachte als hellklingende Stellvertreterin der Zunge die Stimme hervor. \&

Second, could you try https://github.com/maieul/ledmac/compare/issue138 > download the zip, run the .ins file to obtain the .sty file, put the .sty file above your .tex ? I hope this will solve your problem

@tweh
Copy link
Contributor Author

tweh commented Oct 24, 2013

Works fine in the MWE and in the real document too, thank you very much!

Maybe you can add (at least I didn’t found it) to the manual that there must be no spaces before & and \& since in tabulars, which is where the normal TeX user knows the & from it doesn’t matter, fruthermore I like to have the \& in its own line, but a % seems to work here:

\stanza
   vers 1&
   vers 2%
\&

@maieul
Copy link
Owner

maieul commented Oct 24, 2013

yes, I will add this, this week end or this night when I will prepare the new release.

maieul added a commit that referenced this issue Oct 24, 2013
@maieul maieul closed this as completed Oct 26, 2013
maieul added a commit that referenced this issue Aug 14, 2014
@maieul maieul reopened this Mar 19, 2015
maieul added a commit that referenced this issue Mar 19, 2015
@maieul
Copy link
Owner

maieul commented Mar 19, 2015

I have reopened this issue. Could you confirm to me that the branch "issue138" solve this problem and allow space between the end of the verse and the & ?

maieul added a commit that referenced this issue Mar 20, 2015
@tweh
Copy link
Contributor Author

tweh commented Mar 20, 2015

Seems to work fine! With the current CTAN-version I had the problem that the right line number was missing, which is kind of strange since I didn’t saw this problem in my real document, but with this branch the number is shown and every thing works.

@maieul
Copy link
Owner

maieul commented Mar 20, 2015 via email

@maieul
Copy link
Owner

maieul commented Mar 20, 2015

I will publish on CTAN tomorrow, I think.

@maieul maieul closed this as completed Mar 20, 2015
@tweh
Copy link
Contributor Author

tweh commented Mar 20, 2015

Thanks … maybe you can have a look at #257 before publishing the new version :-)

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