pmisra@cs.wright.edu (Pradeep Misra) (11/17/90)
To all the TeX pundits: I am a novice at TeX and have been trying to solve the following problem for a few days without much success: I would like to generate a macro whose function is equivalent to the font CMCSC, i.e., if I type AbCd within a group, then it should print out ABCD except that the letters should be in two different sizes: "big captital A small capital B big captital C small capital D" and all in CMBX (BOLD) fonts. For example, the uppercase letters from the input could be CMBX10 and lowercase letters could be CMBX8. I can make it work in a brute force manner by breaking the words into first letter and rest of the letters and printing them in different sizes, but I am certain there is an "intelligent" way of doing it. Do you have any pointers or suggestions?? Thanks, P. Misra (pmisra@valhalla.wright.edu)
eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) (11/19/90)
pmisra@cs.wright.edu (Pradeep Misra) writes: >I would like to generate a macro whose function is equivalent to the font >CMCSC, i.e., if I type AbCd within a group, then it should print out ABCD >except that the letters should be in two different sizes: > "big captital A small capital B big captital C small capital D" >and all in CMBX (BOLD) fonts. For example, the uppercase letters from the >input could be CMBX10 and lowercase letters could be CMBX8. >I can make it work in a brute force manner by breaking the words into first >letter and rest of the letters and printing them in different sizes, but I >am certain there is an "intelligent" way of doing it. >Do you have any pointers or suggestions?? Here's a pointer: the article by Amy Hendrikson in TUGboat this year #3 gives a macro for exactly this problem. And a suggestion: the tests for uppercase in her article can be done more elegantly by for instance \ifnum`#1=\uccode`#1 or, more dirty, \ifnum\sfcode`#1=999 both of which give true if a character is an uppercase character. Victor.