Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!rphroy!caen!uwm.edu!ogicse!milton!haccme From: haccme@milton.u.washington.edu (Thomas Ridgeway) Newsgroups: comp.text.tex Subject: Re: Put something above a word ? Summary: sample macro to do so Message-ID: <18749@milton.u.washington.edu> Date: 20 Mar 91 17:34:26 GMT References: <1991Mar20.102509.7980@dit.upm.es> Organization: University of Washington, Seattle Lines: 30 Regarding putting musical chord notation above the lyrics for a song: % TeX code begins here % quick hacks for above-line display of short bits of text \newdimen\bangback \def\bangup#1{\setbox0\hbox{#1}\bangback=\wd0\raise\baselineskip\box0\hskip -\bangback} Suppose that we are just running along in the midst of a paragraph, and we want to do what you propose with setting some chord notation above the text: this is the text with o\bangup{G\#}verset bits of stuf\bangup{A}f. We would just go ahead and bang it up there. Probably most likely you would want to put it into a display line, rather than into a paragraph, or along with typeset music. \centerline{I don't think th\bangup{B$\flat$}at the display line is a problem} \noindent but there is just no telling what kind of interaction you might get with the macros that would be setting the music (if that is what one were doing). I am not too sure about the merits of the negative hskip versus another way of hiding the width; mostly what we want to do is prevent the raised portion from becoming separated from its mainline text at the beginning or end of a line. Also, raising the chords an entire baselineskip above the mainline may be just a tad too far, but this ought to give you something to get started with. \bye Tom