lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lilyglyphs LaTeX package


From: Reinhold Kainhofer
Subject: Re: lilyglyphs LaTeX package
Date: Thu, 23 Aug 2012 16:03:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0

On 15/08/2012 17:34, Urs Liska wrote:
> As this may well be useful for anybody writing about music with LaTeX,
> I decided to make a package out of it. The project is hosted at
> https://github.com/uliska/lilyglyphs.
>
> The package is already useable, but there will be some syntax changes
> in the near future, so I'd rather not use it extensively (you can see
> the issues in the tracker to get an impression).
>
> For now there are a few predefined commands for glyphs, and a generic
> command to access glyphs by their name, so anything should already be
> possible.

Since I need those glyphs (mainly the dynamics, but also accent etc.) in
a critical report myself, I took a look at the package.

One thing I noticed is that to print dynamics and numbers, there is no
need to resolve to their unicode number. One can simply change the font
to emmentaler and then print the normal letters/digits. In particular, I
would suggest:

~~~~~~~~~~~~~~~~~~~~~~~

% Print some text in the emmentaler font. Works for the dynamic letters
and the digits:
\newcommand{\lilyText}[2][1.4]{{\fontspec[Scale=#1]{Emmentaler-11}{#2}}}

%%%%%%%%%%%%%%%%%%%%%%%%
% Numbers and Dynamics %
%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\lilyNumber}[2][1.35]{\lilyText[#1]{#2}}

~~~~~~~~~~~~~~~~~~~~~~~

You can then print any dynamics as e.g. \lilyText{sffpzm}. And the
definition of the dynamics can also be changed to use \lilyText instead
of printing each letter separately.


And, I'm missing a \lilyFP command for forte-piano (i.e. start the note
in forte, and then quickly go to piano, kind of like an accent, but not
as sharp), \lilyFZ, \lilyFFZ and \lilyPF (all of which are used in the
Schubert piece I'm currently editing).


Time signatures (fractions) can be easily produced by
\lilyTimeSignature{3}{4} using the following definition:

% general \time n/m command (prints time signature as a fraction in
emmentaler font)
\newcommand*{\lilyTimeSignature}[3][0.9]{$\frac{\mbox{\lilyText[#1]{#2}}}{\mbox{\lilyText[#1]{#3}}}$}


BTW, the installation of the font was really as simple as you describe:
1) Copy the emmentaler-*.otf files to ~/.fonts
2) run fc-cache

Cheers,
Reinhold

-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://www.kainhofer.com
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * Edition Kainhofer, Music Publisher, http://www.edition-kainhofer.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]