Re: lilyglyphs LaTeX package

2012-09-02 Thread Urs Liska

Hi Reinhold,

thanks for these ideas.

Am 23.08.2012 16:03, schrieb Reinhold Kainhofer:

On 15/08/2012 17:34, Urs Liska wrote:

...

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

Thanks


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.
Interestingly, this is an idea I had for myself last week, but couldn't 
verify without a computer (see the GitHub issues that I could comment 
from the mobile ...). So thank you for your examples.

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).
Well, if you want push access to the repository, you could add these 
yourself.
In the long run this is what I intend anyway. But first there should be 
decisions about the general issues (that affect syntax).

I'll soon start upon this ...



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}}}$}
Well, I didn't have a computer the last two weeks, but read some texts 
about latex. And what you suggest is about what I thought about also 
recently ;-)

Since the plus sign is also directly accessible you can even write
\lilyTimeSignature{3+7}{4}
easily.

I won't immediately incorporate it though because there has to be some 
more thinking about the parametrization of scaling and placing. I'd like 
to put these things right (as well as the option to integrate a plain 
latex solution) before adding anything new.



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

Nice, but there is also one more thing to check:
fontspec is smart enough to select the correct optical sizes for optical 
font families from Adobe (so if I write \scriptsize I automatically find 
the 'XX caption' font in the PDF). It would be nice if this worked for 
Emmentaler also, and if it does one should include all the font files 
instead of only one.


As mentioned I'll soon get back to this package ...

Best
Urs


Cheers,
Reinhold




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilyglyphs LaTeX package

2012-08-23 Thread Reinhold Kainhofer
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, reinh...@kainhofer.com, 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


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilyglyphs LaTeX package

2012-08-16 Thread Urs Liska

Hi Reinhold, Werner and Philippe,

thanks for your feedback. Here are a few ideas before I finally leave.
[I won't read this list (from tomorrow), so if you want to contact me in 
the next weeks, please write to g...@ursliska.de]


My package works with XeLaTeX because I decided to use this flavor. 
Actually the possibility to access OpenType fonts and features that way 
was the final point for my decision to seriously jump into LaTeX use.


As Philippe and Werner pointed out there are ways to use Emmentaler 
glyphs also in plain LaTeX, but I won't actively go after this.


What I propose, and what I think is quite possible, is:

 * There is the generic access command (\lilyGlyph ATM)
 * This command is then called by the predefined commands (such as e.g.
   \doublesharp) and can be called within a LaTeX document.
 * If we can manage to keep the interface to this generic command
   consistent I would be happy to include another 'backend'.
 * I think that the generic access command could become rather an
   'interface' command. Depending on an option that can be passed to
   the package, the interface command would then call the appropriate
   generic access command.
 * Maybe it's necessary to somehow create a lookup table to map the
   Type1 numbers to the OpenType glyphnames. I found this for example:
   
https://groups.google.com/forum/?fromgroups#!topic/comp.text.tex/MDzy2xNUC84[1-25]
   - which could be of help.
 * If that works, everything that comes at a higher level (i.e. the
   actual glyph commands) could be independent of the used LaTeX flavor.

This has a few consequences:

 * There will be the need for more discussion and design before my
   prospected first official '0.1' release - but I think it would be
   worth the time and effort.
 * I won't be able to add new glyphs before this design phase is
   finished (because I'm afraid of having to update all the commands
   due to changed syntax). This is principally OK with me, but could
   cause some headaches because I started all this for a current
   project - and I think this revision report will be quite long, and I
   need the glyphs for it ...
 * I probably won't / can't do anything about the 'plain LaTeX backend'
   - just because I don't know anything about it, and I can't afford
   the time developing something I won't ever use myself.
 * ATM the stuff of integrating two 'backends' through package options
   seems over my head (as I'm practically new to LaTeX). Maybe I will
   learn it on the way, but any assistance in this field would be
   appreciated.

Best for now
Urs

Am 15.08.2012 17:34, schrieb Urs Liska:

Hi list,

this is somewhat OT, but only slightly, I think.
In need to insert music glyphs in continuous text (for writing a 
revision report) I successfully found out how to insert glyphs from 
LilyPond's Emmentaler font in (Xe)LaTeX documents and wrote a few 
first commands (thanks to Google and Werner Lemberg).


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.


In the download section there is a pdf that documents how it works so 
far and also gives a good impression on what it looks like.
You may either clone into the repository or download the package 
archive from the download page. So far there aren't any useful 
installation instructions, but I think it should work. You can place a 
symlink to the .sty file and a symlink to the definitions/ directory 
in the directory of your .tex file, and it should work.


I will be away for two weeks but would be happy to find a few 
collaborators afterwards to join the project.
a) there are a few issues that I would prefer not to decide alone but 
rather discuss,
b) a few issues with LaTeX programming where I'd appreciate some help, 
and
c) the ultimate goal is to cover the whole glyph set, but this will 
only become reality with several contributors. I will happily work on 
glyphs that I use personally, but there are so many things I won't use 
...


I hope this is on interest to anybody. Please feel free to forward 
this message to whom it may concern ...


Best
Urs

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Subject: Re: lilyglyphs LaTeX package

2012-08-16 Thread Stefan Thomas
Dear Urs,
how can I install this package in my xelatex-system on ubuntu?

Hi Reinhold, Werner and Philippe,

thanks for your feedback. Here are a few ideas before I finally leave.
[I won't read this list (from tomorrow), so if you want to contact me in
the next weeks, please write to g...@ursliska.de]

My package works with XeLaTeX because I decided to use this flavor.
Actually the possibility to access OpenType fonts and features that way
was the final point for my decision to seriously jump into LaTeX use.

As Philippe and Werner pointed out there are ways to use Emmentaler
glyphs also in plain LaTeX, but I won't actively go after this.

What I propose, and what I think is quite possible, is:

  * There is the generic access command (\lilyGlyph ATM)
  * This command is then called by the predefined commands (such as e.g.
\doublesharp) and can be called within a LaTeX document.
  * If we can manage to keep the interface to this generic command
consistent I would be happy to include another 'backend'.
  * I think that the generic access command could become rather an
'interface' command. Depending on an option that can be passed to
the package, the interface command would then call the appropriate
generic access command.
  * Maybe it's necessary to somehow create a lookup table to map the
Type1 numbers to the OpenType glyphnames. I found this for example:

https://groups.google.com/forum/?fromgroups#!topic/comp.text.tex/MDzy2xNUC84[1-25]
- which could be of help.
  * If that works, everything that comes at a higher level (i.e. the
actual glyph commands) could be independent of the used LaTeX flavor.

This has a few consequences:

  * There will be the need for more discussion and design before my
prospected first official '0.1' release - but I think it would be
worth the time and effort.
  * I won't be able to add new glyphs before this design phase is
finished (because I'm afraid of having to update all the commands
due to changed syntax). This is principally OK with me, but could
cause some headaches because I started all this for a current
project - and I think this revision report will be quite long, and I
need the glyphs for it ...
  * I probably won't / can't do anything about the 'plain LaTeX backend'
- just because I don't know anything about it, and I can't afford
the time developing something I won't ever use myself.
  * ATM the stuff of integrating two 'backends' through package options
seems over my head (as I'm practically new to LaTeX). Maybe I will
learn it on the way, but any assistance in this field would be
appreciated.

Best for now
Urs

Am 15.08.2012 17:34, schrieb Urs Liska:
 Hi list,

 this is somewhat OT, but only slightly, I think.
 In need to insert music glyphs in continuous text (for writing a
 revision report) I successfully found out how to insert glyphs from
 LilyPond's Emmentaler font in (Xe)LaTeX documents and wrote a few
 first commands (thanks to Google and Werner Lemberg).

 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.

 In the download section there is a pdf that documents how it works so
 far and also gives a good impression on what it looks like.
 You may either clone into the repository or download the package
 archive from the download page. So far there aren't any useful
 installation instructions, but I think it should work. You can place a
 symlink to the .sty file and a symlink to the definitions/ directory
 in the directory of your .tex file, and it should work.

 I will be away for two weeks but would be happy to find a few
 collaborators afterwards to join the project.
 a) there are a few issues that I would prefer not to decide alone but
 rather discuss,
 b) a few issues with LaTeX programming where I'd appreciate some help,
 and
 c) the ultimate goal is to cover the whole glyph set, but this will
 only become reality with several contributors. I will happily work on
 glyphs that I use personally, but there are so many things I won't use
 ...

 I hope this is on interest to anybody. Please feel free to forward
 this message to whom it may concern ...

 Best
 Urs

 __
_
 lilypond-user mailing list
 lilypond-user@gnu.org
 https://lists.gnu.org/mailman/listinfo/lilypond-user
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Subject: Re: lilyglyphs LaTeX package

2012-08-16 Thread Urs Liska
The package doesn't have real installation instructions (or even an 
installation procedure) yet (something for 0.1, a first official release).


Fortunately xelatex-ubuntu is what I have, so I can tell you how you 
will make it work.


One issue is that there are included files in a subfolder. (I assume 
I'll have to do something about that for a 'real' packaged version.)


As a dirty quick 'installation' I recommend:

 * place lilyglyphs.sty and the complete definitions/ folder somewhere
   on your disk, e.g. in a directory ~/lilyglyphs.
 * place the Emmentaler OTF file from the OTF folder in ~/.fonts
   (Maybe you have to run fc-cache afterwards to update your
   fontconfig cache - but I don't know for sure, I can't do any harm
   anyway)
 * create symlinks to lilyglyphs.sty and the definitions/ folder _in
   the directory_ where your .tex file is located:
   ln -s ~/lilyglyphs/lilyglyphs.sty
   ln -s ~/lilyglyphs/definitions
   - This is going to pretend that the package is in the same dir as
   your .tex file.
   Alternatively you can (for testing the package) put your .tex file
   in the directory where lilyglyphs.sty is.

You may get  long lists of 'kpathsea' errors. This is what I had on some 
of my computers (not only with this package but also earlier with other 
OpenType fonts and fontspec). I finally found out that this happened 
when I had 'activated' the respective fonts with a font manager 
(FontMatrix). When all these references were away, fontspec worked fine.


Hope this helps (works)
Best
Urs


Am 16.08.2012 13:37, schrieb Stefan Thomas:

Dear Urs,
how can I install this package in my xelatex-system on ubuntu?


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Subject: Re: lilyglyphs LaTeX package

2012-08-16 Thread Werner LEMBERG
  * place lilyglyphs.sty and the complete definitions/ folder somewhere
on your disk, e.g. in a directory ~/lilyglyphs.
  * create symlinks to lilyglyphs.sty and the definitions/ folder _in
the directory_ where your .tex file is located:
ln -s ~/lilyglyphs/lilyglyphs.sty
ln -s ~/lilyglyphs/definitions
- This is going to pretend that the package is in the same dir as
your .tex file.
Alternatively you can (for testing the package) put your .tex file
in the directory where lilyglyphs.sty is.

Ouch.  Why not simply put it into your local TEXMF folder, usually
~/texmf?  Then you don't have to do any further links!  If it doesn't
exist yet, you should create it.  An appropiate subdirectory is

  ~/texmf/tex/xelatex/lilyglyphs/


Werner

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Subject: Re: lilyglyphs LaTeX package

2012-08-16 Thread Urs Liska

Am 16.08.2012 13:57, schrieb Werner LEMBERG:

  * place lilyglyphs.sty and the complete definitions/ folder somewhere
on your disk, e.g. in a directory ~/lilyglyphs.
  * create symlinks to lilyglyphs.sty and the definitions/ folder _in
the directory_ where your .tex file is located:
ln -s ~/lilyglyphs/lilyglyphs.sty
ln -s ~/lilyglyphs/definitions
- This is going to pretend that the package is in the same dir as
your .tex file.
Alternatively you can (for testing the package) put your .tex file
in the directory where lilyglyphs.sty is.

Ouch.  Why not simply put it into your local TEXMF folder, usually
~/texmf?  Then you don't have to do any further links!  If it doesn't
exist yet, you should create it.  An appropiate subdirectory is

   ~/texmf/tex/xelatex/lilyglyphs/

Oops, didn't think this would work with the subfolder ...


 Werner

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Subject: Re: lilyglyphs LaTeX package

2012-08-16 Thread Werner LEMBERG

~/texmf/tex/xelatex/lilyglyphs/
 Oops, didn't think this would work with the subfolder ...

This gets searched recursively by default.


   Werner

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Subject: Re: lilyglyphs LaTeX package

2012-08-16 Thread Urs Liska

Now I know that, thanks :-)

Just had to exclude this from the git repo that controls my texmf dir ;-)

Best
Urs

Am 16.08.2012 14:29, schrieb Werner LEMBERG:

~/texmf/tex/xelatex/lilyglyphs/

Oops, didn't think this would work with the subfolder ...

This gets searched recursively by default.


Werner

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


lilyglyphs LaTeX package

2012-08-15 Thread Urs Liska

Hi list,

this is somewhat OT, but only slightly, I think.
In need to insert music glyphs in continuous text (for writing a 
revision report) I successfully found out how to insert glyphs from 
LilyPond's Emmentaler font in (Xe)LaTeX documents and wrote a few first 
commands (thanks to Google and Werner Lemberg).


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.


In the download section there is a pdf that documents how it works so 
far and also gives a good impression on what it looks like.
You may either clone into the repository or download the package archive 
from the download page. So far there aren't any useful installation 
instructions, but I think it should work. You can place a symlink to the 
.sty file and a symlink to the definitions/ directory in the directory 
of your .tex file, and it should work.


I will be away for two weeks but would be happy to find a few 
collaborators afterwards to join the project.
a) there are a few issues that I would prefer not to decide alone but 
rather discuss,

b) a few issues with LaTeX programming where I'd appreciate some help, and
c) the ultimate goal is to cover the whole glyph set, but this will only 
become reality with several contributors. I will happily work on glyphs 
that I use personally, but there are so many things I won't use ...


I hope this is on interest to anybody. Please feel free to forward this 
message to whom it may concern ...


Best
Urs

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilyglyphs LaTeX package

2012-08-15 Thread Reinhold Kainhofer

On 2012-08-15 17:34, Urs Liska wrote:

this is somewhat OT, but only slightly, I think.


No, it's not at all OT! It's actually very on-topic for all 
lilypond-users (in particular also for those who use lilypond-book).



In need to insert music glyphs in continuous text (for writing a
revision report) I successfully found out how to insert glyphs from
LilyPond's Emmentaler font in (Xe)LaTeX documents and wrote a few first
commands (thanks to Google and Werner Lemberg).

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.


That's really great! I have in the past tried unsuccessfully to create 
such a package for latex, because I also needed the emmentaler glyphs in 
the critical reports of my editions.


Apparently, your package only works with xelatex, not with normal latex. 
Any idea how to make the glyphs available without using xelatex?


Cheers,
Reinhold


--
--
Reinhold Kainhofer, reinh...@kainhofer.com, 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

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilyglyphs LaTeX package

2012-08-15 Thread flup2
Hello,

I'll have a look at it in the next few days. As you perhaps saw previously
on this list, I worked last year on a LaTeX package including lilypond
glyphs. If you want to have a look and if you find something usefull in it,
feel free to use, adapt and so on (I don't know when I'll have time to work
on it further).

My main concerns are : 

- my package has only fixed size glyphs. With text smaller than 11 or bigger
than 12pt, glyphs do not fit well in the flow of the text.

- I use mostly pdfLaTeX, and didn't test it extensively with XeLaTeX

- a usefull thing, based to the harmony.sty package (developed by 2 german
students) is the ability to use lilypond font for time signature, as well as
supporting compound (3+2+3/2) ou abbreviate (C) time signatures.

https://github.com/philmassart/Feta-to-LaTeX
https://github.com/philmassart/Feta-to-LaTeX 

I would be happy if it could be of any help for anyone.

Philippe



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/lilyglyphs-LaTeX-package-tp130682p130688.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilyglyphs LaTeX package

2012-08-15 Thread Werner LEMBERG

 Any idea how to make the glyphs available without using xelatex?

For plain LaTeX, I suggest to use the Type 1~fonts (feta-alphabet,
parmesan, etc.).  While fontforge is building the Emmentaler fonts
during a `make all' lilypond build, the necessary .enc and .tfm files
are automatically created as a byproduct.

Based on the .enc files, it's rather straightforward to write a script
which creates some TeX or LaTeX code to map glyph indices to
appropriate macros.  Contrary to the XeTeX approach, however, the
mappings change if new glyphs get inserted; this means that the
mappings are bound to a specific lilypond version.


Werner

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user