lilypond-user
[Top][All Lists]
Advanced

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

Re: Scandinavian letters in lyrics and text markup


From: Mats Bengtsson
Subject: Re: Scandinavian letters in lyrics and text markup
Date: Tue, 20 Apr 2004 11:27:24 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113



Jan Nieuwenhuizen wrote:
Mats Bengtsson writes:


You don't need to change the font-name or add the t1enc package
unless you want to be able to search for the lyrics in Acrobat
or copy/paste them from Acrobat to some other file.


Could you elaborate?  Is this about bitmap fonts, do we find those
acceptable?

By default, the LaTeX wrapper generated by lilypond includes the
line
\usepackage[latin1]{inputenc}
but NOT the line
\usepackage[T1]{fontenc}
In other words, the default OT1 font encoding is used.
In this encoding, the characters ø and å are typeset using
a combination of glyphs from the cmr10 font file (or whatever
family, weight and shape is used). If you ask dvips to use type1
fonts, it will use the cmr10.pfb included in teTeX, so vector
fonts is not a problem. (On the other hand, if we had used the
T1 font encoding, you will get bitmap fonts since cm-super is
not included in teTeX).

The latin1 input encoding, just translates all ø into \o and
all å into \aa, which means that you could use any of these
in the LaTeX file.



            Han f\o -- rer d\o - dens s\aa g\aa_r


This works for me.  And I tried and was to suggest something like


            Han før -- rer dø - dens så går


but I was appalled to find that it just does not work (for me):

    $ LANG=C lilypond danish.ly    ## (hmm, or is this .no rsk? :-)
    lilypond (GNU LilyPond) 2.2.0
    Running lilypond-bin...
    Now processing `danish.ly'
    Parsing...
    Interpreting music... [5]
Preprocessing graphical objects... Calculating line breaks... warning: can't find ascii character: 129
    warning: can't find ascii character: 248
    warning: can't find ascii character: 129
    warning: can't find ascii character: 229
    warning: can't find ascii character: 129
    warning: can't find ascii character: 229
    warning: can't find ascii character: 129
    warning: can't find ascii character: 248
    [3][5]

    paper output to `danish.tex'...


    Analyzing danish.tex...
    Running ...
    lilypond: error: LaTeX failed on the output file.
    lilypond: error: The error log is as follows:

    ! Package inputenc Error: Keyboard character used is undefined
    (inputenc)                in inputencoding `latin1'.

    See the inputenc package documentation for explanation.
    Type  H <return>  for imme
    LATEX output to `danish.latex'...
    TEX output to `danish.tex'...
    10:40:07 address@hidden:~/cvs/savannah/lilypond/lilypond-2.2

Once this works, it should definately in the tutorial, and possibly
tips and tricks.

Weird! Can you compile that following LaTeX file?

-----------------------------------
\documentclass[a4paper]{article}

\usepackage[latin1]{inputenc}

\begin{document}
Han fører dødens så går
\end{document}
-----------------------------------
Here, it compiles without any problem. If you make a PDF file
with 'dvips -Ppdf' + 'ps2pdf', you will get type1 fonts. The only
problem is that if you copy/paste the text from the PDF, you get
'Han f rer d dens s a g ar'.

I have answered similar question on the mailing list several times and
also pointed out the inability to add options to a specific package.


Can I ask for a bug report?  I found a few pointers with complaints
about this, but no solution or full example.  Upon reading the
relevant lilypond.py sections, Sunday morning, I was glad I didn't
have breakfast yet ;-)

I assume that fixing lilypond.py is trivial, if we know what the
solution looks like.

The problem is the syntax of latexpackages. We need a syntax where we
can add individual options to each package. If you try to use the
package fontenc and add the option 'T1' using latexoptions, the option
will be included as an option to \documentclass and LaTeX will give
errors since the option is unknown to all packages but fontenc.
I don't have any good suggestion for the syntax. Possibly, we could do
something like
latexpackages = "[T1]fontenc, [swedish]babel"


These problems should all be solved (and differently) in 2.4, but it
would be very good if we can get a simple example and fix for 2.2.1.

For 2.3, I would very much like to include an example (and get it to
work first) using different encodings, eg, using German umlauts and
Ringeless, the euro sign, Dvro`'rak, `wodka' spelled in cyrillic,
Spanis se~nor, whatnot.


Actually, ecrm12 (I assume the ecrb12 was a misprint) is not part of
any default TeX installation.


That was intentional, I think ecrb12 (non-extended bold) looks a lot
better for lyrics than ecrm12.  Do you know which distributions would
trim ecrb.mf from tetex?  (Hmm, don't tell me: it's not in Cygwin's
tetex-tiny :-)

I didn't know about ecrb, but it seems to be included in standard
teTeX (not as Type1, though).


   /Mats




reply via email to

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