Gregorio - how to get a "white space equal to a note-head"
  • JonathanKKJonathanKK
    Posts: 542
    In case it is of use to anyone, I've found a good hack to produce a Vatican Edition style "white space equal to a note-head" using Gregorio.

    If you have two notes thus:

    (hh)


    Instead write:

    (h![ev:\hspace{282199sp}]h)


    Or if you have two notes thus:

    (h.h)


    Instead write:

    (h.![ev:\hspace{59501sp}]h)


    [All that I'm doing is putting in verbatim code for an appropriate horizontal space as measured in "sp", which is the smallest unit you can use; and the way I found out these appropriate spaces was in TeX with \usepackage{zref-savepos}, which allowed me to put a tag such as \zsavepos{test} at the end of my score and then see by how much \zposx{test} changed if I added a single punctum "!h" to my gabc, etc. Anyhow, this is just one of the many things that I have figured out how to rig using information gained from position markers like this.]
  • In case it is of interest, I've just discovered that another thing that can be done in TeX with \usepackage{zref-savepos}.

    On the page "Features of GregorioTeX" one of the extras that is described is an aborted project for ornamentations. With some simple calculations, it is possible to distribute any integer number of these ornamentation characters across any width of space, e.g. to make a tidy header.

    First, I used \zsavepos labels to find out the length in "sp" of these characters (e.g. at 10pt size), as well as the length of my text-width (4.5in).

    Then, when I want to make a header out of these ornamentation characters, all I have to do is divide the text-width in "sp" by the number of ornamentation-characters I wished to distribute across the space. This gives desired length of a character.

    Next, I divide this length by the measured 10pt size of the character I want to use, and multiply the result by 10; this gives the pt size needed to fill my space with the desired number of characters. I do this in Excel (because it is handy), and get a result accurate to 8 decimal places, which TeX doesn't seem to mind: and the characters at this size do actually fill the line very exactly.

    Then I fool around with vertical space so that the top or bottom of the line will be where I want it at, and finally define a command or two so that I can use the thing conveniently.

    A sample:

    \newcommand{\jmktwelveflowerline}{%
    \noindent{\font\gregoriosymbolfont=gresym at 17.71324923pt \gregoriosymbolfont \char 75 \char 75 \char 75 \char 75 \char 75 \char 75 \char 75 \char 75 \char 75 \char 75 \char 75 \char 75}%
    }% end definition

    \newcommand{\jmktwelveflowerlineup}{%
    \vspace{8.333pt}%
    \noindent\begin{rotate}{0}
    \jmktwelveflowerline
    \end{rotate}
    }% end definition

    \newcommand{\jmktwelveflowerlinedown}{%
    \vspace{-\baselineskip}
    \noindent\hspace{\textwidth}\begin{rotate}{180}
    \jmktwelveflowerline
    \end{rotate}
    \null
    \vspace{8.333pt}
    }% end definition


    Which is what works for me and my version of Gregorio to give a 4.5in line having twelve flowers in it, either right-side-up or up-side-down; and when I want a different number of flowers, all I have to do is copy this block of code, make a couple of adjustments, and voila! the new set of commands for, say, a line having nine flowers in it.
    Thanked by 1Casavant Organist