Turning off above lines text

72 views
Skip to first unread message

Rob Leduc

unread,
Feb 2, 2021, 2:52:11 PM2/2/21
to Gregorio Users

Is there an option to typeset a score from a .gabc file that contains above lines text, but suppress the above lines text from the result?

I had hoped to have control over this using \grechangestyle{abovelinestext}{....  but I can't seem to find an environment that would "wipe out" the text.   Commands to censor or comment out text exist, but they aren't environments or switches like \begin{bf} or \itshape and so don't seem to play well with \grechangestyle.

For example, I can turn on or off commentary fields from the .gabc file by changing \gresetheadercapture{commentary}{grecommenary}{} vs. \gresetheadercapture{commentary}{}{}.  Looking for a similar functionality with abovelinestext in a score.

I fear it will require tinkering with the innards of gregorio itself....

Thanks for any suggestions!

Rob

Fr. Samuel Springuel

unread,
Feb 2, 2021, 3:25:04 PM2/2/21
to gregori...@googlegroups.com
Try using the comment package to set the gre@style@abovelinestext environment to be a comment environment:

\usepackage{comment}
\makeatletter
\excludecomment{gre@style@abovelinestext}
\makeatother

Longer term, given we already have the ability to hide lyrics and notes, we should probably add switches for hiding translations and above lines text.

✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ

Rob Leduc

unread,
Feb 2, 2021, 5:53:26 PM2/2/21
to Gregorio Users
Thanks, Fr. Samuel,

When I try this, I get an error of an Extra \endgroup.  MWE follows with some of the error message. 

It may be that comment expects an end of paragraph in order to stop trying to process a comment.  As an additional example, the code

\documentclass{article}
\usepackage{comment}
\begin{document}
\begin{comment} This is a comment \end{comment}
\end{document}

will generate an error.  But moving \end{comment} to the next line gives an empty page of output.


I also tried using the \comment and \endcomment from the verbatim package, but to no avail.  The verbatim package documentation says something about not being able to include \begin or \end commands within a verbatim (and hence comment) environment or you get a runaway argument.  That seemed to happen also in some variations I tried.

I also tried a simple \grechangestyle{abovelinestext}{\comment}[\endcomment]

with each package separately, but to no avail.

I'm afraid I lack sufficient tex knowledge to delve into the guts of gregorio and figure out what is causing these environments to choke when simpler ones succeed, but I wager something can't nest with something else or something isn't being escaped that would need to be for this to work.

Rob

MWE, trying to change



% !TEX TS-program = lualatex
% !TEX encoding = UTF-8

\documentclass[12pt,twoside,latin]{book}
\usepackage[oldstyle]{libertine}

\usepackage{comment}

\usepackage[autocompile]{gregoriotex} % for gregorio score inclusion

% CHANT settings
\gresetinitiallines{1}


\usepackage{comment}
\makeatletter
\excludecomment{gre@style@abovelinestext}
\makeatother

\begin{document}

\gregorioscore{Speciosus}

\end{document}

Speciosus.gabc:

name: Speciosus forma;
office-part: Antiphona;
commentary: {\itshape\mdseries Ps.44,3;\/} H70;
annotation: 1.Ant;   
annotation: I.g;    
%%
(c4) Spe([alt:Extra Tempus Paschale.]f)ci(g)ó(fd!ewf)sus(dfc) for(fh>)ma<sp>*</sp>(g) (,)
præ(e) fí(gh)li(f)is(f) hó(d)mi(f)num,(c) (;)
dif(d)fú(fd)sa(e) est(f) grá(gh)ti(g)a(f) in(e) lá(fg)bi(e)is(fo~) tu(d)is.(d) (::)
<eu> E(h) U(h) O(g) U(f) A(gh) E.(g)  </eu> (::)

Portion of error message cut from the console (it will have a different filename in the MWE):
-----------------------------------------------------------
[...] /ExtraTempusPaschale.Quarta.Antiphon.1-5_2_1.gtex:11:
Extra \endgroup.
\gre@style@abovelinestext ->\endgroup
                                      \message {Excluding 'gre@style@aboveli...

l.11 ...5}{0}{1}{}{4}{\GreInitialClefPosition{4}{0}}
                                                  %


Fr. Samuel Springuel

unread,
Feb 3, 2021, 1:35:12 PM2/3/21
to gregori...@googlegroups.com
New PR which adds this feature:

https://github.com/gregorio-project/gregorio/pull/1511

You can test by installing from the visibility branch in my fork of the repository: https://github.com/rpspringuel/gregorio/tree/visibility

Rob Leduc

unread,
Feb 3, 2021, 6:26:43 PM2/3/21
to gregori...@googlegroups.com
That was fast!  Thanks very much! 

Rob

--
Gregorio homepage: http://gregorio-project.github.io
Archives for the old mailing list: http://www.mail-archive.com/gregori...@gna.org/
To report a bug, please post to: https://github.com/gregorio-project/gregorio/issues
---
You received this message because you are subscribed to a topic in the Google Groups "Gregorio Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gregorio-users/J-V0dkBMevY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gregorio-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gregorio-users/CC32BB89-A435-49FF-AECB-A217E922526D%40gmail.com.

Rob Leduc

unread,
Feb 3, 2021, 7:36:42 PM2/3/21
to gregori...@googlegroups.com
Works magnificently - thanks again!
Reply all
Reply to author
Forward
0 new messages