3

I have a title in my document like this:

Birds of South America

“Birds”, “of”, and “South America” are each in different fonts and sizes, like this:

{\ssc Birds}
{\cga of}
{\ssd South America}

When I tried vertically centering the text, it centered them on the center of the whole height of the words. This does not look right though, because the lower-case letters are the strongest elements.

 _
| |
| | _  ← Vertically centered text centers text at the middle of the upper-case letters.
|_||_|

How can I vertically center each of these parts, where the center line is at the middle of the short lower-case letters?

 _
| |
| | _
|_||_| ← I need to place the vertical center line at the middle of the short lower-case letters in each word.
2
  • If you don't need a fully automatic solution you can tweak the vertical distance manually using raisebox: \raisebox{2pt}\hbox{of}
    – Marco
    Commented Jun 14, 2013 at 0:43
  • Please add a MWE. You can also use \smash to ignore the height of a particular box.
    – Aditya
    Commented Jun 14, 2013 at 1:33

1 Answer 1

3

One option is to use location=middle option of \framed.

\showboxes % For visual debugging

\defineframed[middleframed]
             [frame=off,
              location=middle]

\starttext

\startTEXpage[offset=3mm]
\dontleavehmode % Needed whenever you start a line with a \hbox
\middleframed{\ssc Birds}
\middleframed{\cga of}
\middleframed{\ssd South America}
\stopTEXpage

\stoptext

which gives

enter image description here

(Remove the \showboxes to get rid of the visual debugging information)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .