Matthias Skobowsky wrote:
> 
> I'm trying a few days typing music with M-Tx and interested in an
> automatical hyphenation of lyrics, means to set the hyphen in lyrics
> automatical.
> The TeX command \showhyphen{} works fine with MiKTeX, but I can just see
> it in the Log-File.
> Is there any way to integrate the hyphens in my M-Tx-Input-File?

No, and it will not be worth the effort even if you succeed in doing it.

\showhyphens is one of Knuth's cunning commands.  It works by generating
TeX code which takes no visible space in the output but causes a spurious
warning message that displays the hyphenated text in the log file.
The code that actually forms the hyphenated text is hidden deep in the Web
code for TeX itself and is not accessible using TeX commands directly.
So trying to access TeX's hyphenation will involve tricks like a Perl
program to extract stuff from the log file.

TeX's hyphenation method is clever but not infallible, and is strongly
language dependent.  For example, the first line of Psalm 42 in Latin
is hyphenated by Plain TeX (U.S. English) as follows:

\showhyphens{Sicut cervus desiderat ad fontes aquarum}

Si-cut cervus desiderat ad fontes aquarum

The correct hyphenation is:

Sic-ut cer-vus de-si-de-rat ad fon-tes a-qua-rum

At least TeX got the hyphenation for 'ad' right :-)

If despite this reply you still want to try to make hyphenation
automatic, read Appendix H in the TeXbook and then go out and
have a beer instead. 

Dirk
 

Reply via email to