schmidt@crimee.ics.uci.edu (Doug Schmidt) (02/23/90)
Howdy, Does anyone have any good suggestions on the most aesthetic way to print the word `C++' in LaTeX or TeX? Simply writing C++ makes the ++ appear too large. Several months ago various people posted their favorite way to do this and naturally I didn't save any examples... Thanks in advance. Doug -- The grave's a fine and private place, | schmidt@ics.uci.edu (ARPA) but none, I think, do there embrace. | office: (714) 856-4043 -- Andrew Marvell
sxm@bebop (Sandeep Mehta) (02/23/90)
In article <25E437AD.25614@paris.ics.uci.edu>, schmidt@crimee (Doug Schmidt) writes: > Does anyone have any good suggestions on the most aesthetic way to >print the word `C++' in LaTeX or TeX? Simply writing C++ makes the ++ \def\CC{\mbox{C\hspace{-.05em}\raisebox{.4ex}{\tiny\bf ++}}} /sandeep -- sxm@philabs.philips.com ...to be or not to bop ?
sartin@hplabsz.HPL.HP.COM (Rob Sartin) (02/24/90)
I just asked the same question on an HP internal group. I don't think the answers qualify as confidential information :-) ---- From: one person at HP Well, we've had pretty good results with the following macro: \def\CC{\hbox{C\hspace{-.05em}\raisebox{.4ex}{\tiny\bf ++}}} We've been using it in all our LaTeX documents - just stick it in before the \documentstyle command. Don't forget to enter a trailing backslash \CC\ if a space is supposed to follow it. Someone with greater intestinal fortitude could make it size-independent. The macro looks yucky in the title of a document. Perhaps there shoudl be two macros - \CC and \titleCC. ---- From: another person at HP I like the following macro: \def\Cpp{C\raise.22ex\hbox{+}\raise.22ex\hbox{+}} It works well with most font styles and sizes. ---- I haven't yet tried either. Rob Sartin internet: sartin@hplabs.hp.com Software Technology Lab uucp : hplabs!sartin Hewlett-Packard voice : (415) 857-7592
jk@r6.uucp (John Kewley ICL) (02/27/90)
In article <25E437AD.25614@paris.ics.uci.edu> schmidt@crimee.ics.uci.edu (Doug Schmidt) writes: >Howdy, > > Does anyone have any good suggestions on the most aesthetic way to >print the word `C++' in LaTeX or TeX? Simply writing C++ makes the ++ >appear too large. Several months ago various people posted their >favorite way to do this and naturally I didn't save any examples... > > Thanks in advance. > > Doug Here is the command we use for LaTeX: \newcommand{\Cpp}{C{\tt ++}} Or for TeX: \def\Cpp{C{\tt ++}} These give nice sized plusses and will appear in any size, although they don't look good in italics, and the plusses are not emboldened with the \bf command. The plusses look closer to those on the front of Stoaustrup than using non-tt ones. I originally used \newcommand{\Cpp}{{\tt C++}} since the ++ is meant to be the increment operator, and I always use \tt when quoting program fragments, as if they were printed at the terminal. J.K. ------------------------------------------------------- John M. Kewley ICL Wenlock Way, Tel: (+44) 61 223 1301 X2138 West Gorton, EXAC: J.Kewley @ UK03 Manchester. Email: jk@r6.cs.man.ac.uk M12 5DR -------------------------------------------------------