Hello all,

I had a similar problem with zigzag lyrics lines 20 years ago when typesetting with M-Tx. I got help from several users of this mailing list.

Am 01.05.25 um 21:03 schrieb dsim...@roadrunner.com:
Thanks for mentioning \setlyrstrut. I tried that once at the top of the file, and it fixed every line’s alignment!

The result might depend on the font.

I had to search for details on an old computer.
At this time I used
M-Tx 0.60d <11 October 2008>
PMX 2.7 <3 April 13>
MusiXTEX 1.15 <3 April 2011>

In my M-Tx source file, I change the fonts to the standard PostScript
NewCenturySchlbk family. This led to problems with the lyrics even with using \setlyrstrut.

%%\font\eightrm=pncr at 8pt\font\eightit=pncri at 8pt
%%\font\tenrm=pncr at 10pt\font\tenit=pncri at 10pt
%%\font\twelverm=pncr at 12pt\font\twelvebf=pncb at
12pt\font\BIGfont=pncb at 16pt\font\Bigfont=pncr at 12pt
%%\font\elevenrm=pncr at 11pt\font\elevenbf=pncb at 11pt
%%\tenrm\setlyrstrut

At the end of the file I have this note:

% Note:
%
% I changed the definition of \setlyrstrut in my copy of musixlyr.tex
% (version MusiXLYRics 2.1c <June 10, 2003>)
%
% \def\setlyrstrut{% set up strut according to currently active font
%   \setbox0=\hbox{(\"Ag)}%
%   \setbox\lyrstrutbox=\hbox{\vrule height 1.1\ht0 depth 1.1\dp0 width\z@}}
%
% The original had \hbox{()} which does not work for pncr font.
%
% Without this change in musixlyr.tex you may get zigzag lyrics lines.
% Alternatively, the following TeX command in a line before \setlyrstrut
will help.
%
%%\def\setlyrstrut{\setbox0=\hbox{(\"Ag)}\setbox\lyrstrutbox=\hbox{\vrule
height 1.1\ht0 depth 1.1\dp0 width 0pt}}
%

It seems to depend on the selected font which characters go up or down most.


My Ubuntu 24.04.2 system provides the package
texlive-music 2023.20240207-1
I checked the file musixlyr.tex. It contains these lines:

%% Copyright (C) 1996-2003  Rainer Dunker

...

\immediate\write16{MusiXLYRics 2.1c\space<June 10, 2003>}
\def\musixlyrversion{2.12}

...

\def\setlyrstrut{% set up strut according to currently active font
  \setbox0=\hbox{()}%
  \setbox\lyrstrutbox=\hbox{\vrule height 1.1\ht0 depth 1.1\dp0 width\z@}}


This file is most likely the same I used 20 years ago.


I don't know if my selection of characters is sufficient for all fonts or if additional characters should be added from the proposed \vphantom{M’)y}


With the search term "setlyrstrut" I found old threads in the mailing list archive:
https://www.mail-archive.com/tex-music@tug.org/msg00497.html
https://www.mail-archive.com/tex-music@tug.org/msg01201.html


Kind regards,
Bodo

-------------------------------
TeX-music@tug.org mailing list
If you want to unsubscribe or look at the archives, go to 
https://tug.org/mailman/listinfo/tex-music

Reply via email to