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

Arbitrary number for \gresetinitiallines #1488

Open
jperon opened this issue Feb 28, 2020 · 2 comments · May be fixed by #1491
Open

Arbitrary number for \gresetinitiallines #1488

jperon opened this issue Feb 28, 2020 · 2 comments · May be fixed by #1491

Comments

@jperon
Copy link
Contributor

jperon commented Feb 28, 2020

Woud it be possible to have more than 2 lines for the initial ?
I tried a workaround with wrapfigure, which sounds promising, but the length of the lines doesn't adjust, so they get out of margin :

\documentclass[12pt]{article}

\usepackage{gregoriotex,libertine,wrapfig}

\begin{document}

\begin{wrapfigure}[3]{l}{0.25\textwidth}
{\fontsize{120pt}{140pt}\selectfont I}
\end{wrapfigure}
\makeatletter\gre@noinitial\makeatother
\gabcsnippet{(c3)
()N(ed~)vo(e)cá(ehgh)bit(fd~) me,(e.) *(,)
et(fde) e(ef/hg)go(h) ex(h)áu(hhh)di(fe)am(e.f!gwh) e(hfge)um :(e.) (:)
e(fde)rí(ehh)pi(f)am(fdf) e(fgFE'f)um,(fe..) (;)
et(ef~) glo(e)ri(ef/hg)fi(g)cá(gi/jhhf)bo(h_g) e(hghf)um :(f.) (:)
lon(hg~)gi(h)tú(i)di(h)ne(hhh) di(f)é(fgFE'f)rum(fe..) (;)
ad(e!f'g)im(gf~)plé(fgE'C)bo(c!e'f) e(fgFE'f)um.(fe..) (::)
}


\end{document}

Perhaps it could be related to #1418

@rpspringuel
Copy link
Contributor

This is something that's been on my ideal list of features for a while now, but I've not had a chance to work on it. Right now the readjustment of the line length that is necessary after the initial is handled within the manual line breaks and so it's necessary for the gabc code to contain multiple z or Z in order for multiline initials. I'd like to move that into the automatic line breaking mechanisms to remove this dependency and make it (and the placement of the initial) more responsive to setting \gresetinitiallines to numbers higher than 2.

There is, however, a work around for now. If \gresetinitiallines{2} is set, then the first "line" of the score can actually be more than 1 line of the score. The initial's vertical placement has to be adjusted manually using initialraise but it's possible to simulate a 3 (or more) line initial in a fragile way:

\documentclass[12pt]{article}

\usepackage{gregoriotex,libertine,wrapfig}

\grechangestyle{initial}{\fontsize{200pt}{0pt}\selectfont}
\newdimen\initialwidth
\initialwidth=0.25\textwidth
\grechangedim{manualinitialwidth}{\the\initialwidth}{scalable}
\grechangedim{initialraise}{-25pt}{scalable}
\gresetinitiallines{2}

\begin{document}

\gabcsnippet{(c3)
IN(ed~)vo(e)cá(ehgh)bit(fd~) me,(e.) *(,)
et(fde) e(ef/hg)go(h) ex(h)áu(hhh)di(fe)am(e.f!gwh) e(hfge)um :(e.) (:)
et(ef~) glo(e)ri(ef/hg)fi(g)cá(gi/jhhf)bo(h_g) e(hghf)um :(f.) (:z)
lon(hg~)gi(h)tú(i)di(h)ne(hhh) di(f)é(fgFE'f)rum(fe..) (;)
et(ef~) glo(e)ri(ef/hg)fi(g)cá(gi/jhhf)bo(h_g) e(hghf)um :(f.) (:)
lon(hg~)gi(h)tú(i)di(h)ne(hhh) di(f)é(fgFE'f)rum(fe..) (;)
et(ef~) glo(e)ri(ef/hg)fi(g)cá(gi/jhhf)bo(h_g) e(hghf)um :(f.) (:)
lon(hg~)gi(h)tú(i)di(h)ne(hhh) di(f)é(fgFE'f)rum(fe..) (;)
ad(e!f'g)im(gf~)plé(fgE'C)bo(c!e'f) e(fgFE'f)um.(fe..) (::z)
}


\end{document}

@rpspringuel
Copy link
Contributor

See #1491 for my progress on this.

@rpspringuel rpspringuel linked a pull request Feb 4, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants