Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!mucs!r6!jk From: jk@r6.uucp (John Kewley ICL) Newsgroups: comp.lang.c++ Subject: Re: Writing `C++' in LaTeX Message-ID: <1012@m1.cs.man.ac.uk> Date: 26 Feb 90 16:12:34 GMT References: <25E437AD.25614@paris.ics.uci.edu> Sender: news@cs.man.ac.uk Reply-To: jk@uk.ac.man.cs.r6 (John Kewley) Organization: University of Manchester, UK Lines: 40 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 -------------------------------------------------------