Dear gregorio-devel folks

I have some experience with LaTeX packages, I am user of gregorio and
recently I requested joined the gregorio developers group in gna, in which
I am now a member.

You may have noticed that in LaTeX gregorio symbols do not respect size
changes.  So it is not so nice to use \Rbar if the document mixes several
sizes (like one for the latin text and a smaller for translation).  Also,
it is hard to compose characters, like making your own \Rbar using
\greletterbar and your font R, since the R changes size while \greletterbar
doesn't.

I investigated and learned how it works the NFSS (LaTeX's New Font
Selection Scheme -- quite old by the way), that is, how \small, \itshape,
\bfseries, etc work with fonts.

In LaTeX a font command should specify font family, encoding, series and
shape.  The NFSS then loads a file <fontec><fontfamily>.fd and parses font
series, shape and size to decide what TeX fonts to use.

By doing

\def\gresymchar#1{{%
      \fontfamily{gresy}\fontencoding{U}%
      \fontseries{m}\fontshape{n}\selectfont
      \char#1}}

\def\Abar{\gresymchar{64}}
\def\Rbar{\gresymchar{65}}
\def\Vbar{\gresymchar{66}}

when we call \gresymchar for the first time, it tries to load the file
ugresy.fd, which has the following 2 lines:

% file ugresy.fd
\DeclareFontFamily{U}{gresy}{}
\DeclareFontShape{U}{gresy}{m}{n}{<-> gresym}{}

so LaTeX knows that for medium series and normal shape, it should use
gresym font at suitable size.  It takes care of the size.

So, the recept:

1) save file ugresy.fd as above and place in current directory

2) in the preamble place the above command

try

{\small \Rbar}

\Rbar

{\large \Rbar}

Question:  can I implement this in gregoriosyms.sty, but only if option
"latex" is provided? (that is, using this package as before --without
options -- it does not change actual behavior, to not confuse users)

Regards.

Miguel Frasson.

-- 
Miguel Vinicius Santini Frasson
[email protected]
_______________________________________________
Gregorio-devel mailing list
[email protected]
https://mail.gna.org/listinfo/gregorio-devel

Répondre à