Newsgroups: comp.text.tex
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!blue.engin.umich.edu!rcj
From: rcj@caen.engin.umich.edu (R o d Johnson)
Subject: Re: Put something above a word ?
Message-ID: <1991Mar21.182220.17344@engin.umich.edu>
Sender: news@engin.umich.edu (CAEN Netnews)
Organization: Adult Children of Deconstructionists
References: <1991Mar20.102509.7980@dit.upm.es> <18749@milton.u.washington.edu> <1139@pyuxe.UUCP>
Date: Thu, 21 Mar 1991 18:22:20 GMT

In article <1139@pyuxe.UUCP> form@pyuxe.UUCP (71133-Christopher Rath) writes:
>I've just been writing a set of macros to produce a songbook (lyrics and
>chords).  The macro to place chords above lyrics is (in LaTeX notation):
>
>	\newcommand{\Ch}[2]{\vbox{\hbox{ }\hbox{bf{#1}}\hbox{#2}}}
>
>	Paramater:  1 - chord to be set;
>		    2 - sylable over which chord is to be right justified.
 . . .
>As it stands the macro has one bug:  When the macro is the first character in
>a paragraph, it forces a newline after the syllable.

I think you need to put a \leavevmode in there somewhere to avoid this.

As it stands, the macro has another, if not bug, undesirable feature.
If your #2 has no ascenders (e.g., the word "one") the chord is going
to be lower than it is over words with ascenders.  You need to put a
\strut in both \hboxes to forestall this.  A properly defined strut
will make the first \hbox{ } unnecessary as well.

--
 Rod Johnson  *  rjohnson@vela.acs.oakland.edu  *  (313) 650 2315 

  "House, bridge, well, gate, jug, olive tree, window"  --Rilke
