Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!brunix!gvr From: gvr@cs.brown.edu (George V. Reilly) Newsgroups: comp.text.tex Subject: Re: Changing the letters sizes in LaTeX Message-ID: <64951@brunix.UUCP> Date: 14 Feb 91 08:15:46 GMT References: <7865@chorus.fr> Sender: news@brunix.UUCP Reply-To: gvr@cs.brown.edu (George V. Reilly) Organization: Brown University Department of Computer Science Lines: 112 In article <7865@chorus.fr> mgu@chorus.fr (Marc Guillemont) writes: | | I want to produce the pretty "CHORUS/MiX" logo according to the following | typographic rules: | | - C in the current size | - HORUS in letters 2 points smaller than the current size | - / in the current size | - MiX in letters 1 point smaller than the current size | | With troff, it is straightforward: | | C\s-2HORUS\s0/\s-1MiX\s0 | | With LaTeX, I asked my local gurus, but I could not get any reasonable | solution: [\sc is inadequate, as are \footnotesize and \small] | - I have seen another solution, but it requires about 10 lines of | comands and macros! | | Is there a solution in LaTeX as simple as the solution in troff? No, but there is a solution. I have a solution which may be derived from the set of macros that you're thinking of. You need the following style file, `relative_sizes.sty': --------------------- % relative_sizes.sty % TeXhax Digest Monday, February 19, 1990 Volume 90 : Issue 19 % Date: Thu, 1 Feb 90 15:23:02 EST % From: Bernie Cosell % Subject: Relative font sizing in LaTeX % Keywords: LaTeX, font sizing % % One continual annoyance to me is that LaTeX does absolute font sizing, % and so if you have some \newcommand that uses the sizing commands to % achieve some graphic effect, you'll discover that your chapter heads % and footnotes and such are pretty screwed up [in a recent case, I % wanted a fake small-caps-san-serif font, and so I used {\small\sf % NOWISTHETIME}, which did just what I wanted in the running text, but % was an unmitigated disaster in the chapter heads]. I think that the % following is a significant improvement: \smaller and \larger changes % the point size *relatively* by one slot, and so I made my definition: % {\smaller\sf NOWISTHETIME}, and it all magically works. % Modified by George V. Reilly (gvr@cs.brown.edu) to handle non-Roman font % families correctly, so that this really does work usefully in titles, etc. \def\smaller{% \count255=\fam% \ifx\@currsize\Huge \protect\huge \else \ifx\@currsize\huge \protect\LARGE \else \ifx\@currsize\LARGE \protect\Large \else \ifx\@currsize\Large \protect\large \else \ifx\@currsize\large \protect\normalsize \else \ifx\@currsize\normalsize \protect\small \else \ifx\@currsize\small \protect\footnotesize \else \ifx\@currsize\footnotesize \protect\scriptsize \else \protect\tiny \fi\fi\fi\fi\fi\fi\fi\fi% \ifnum\count255=\itfam \protect\it \else \ifnum\count255=\slfam \protect\sl \else \ifnum\count255=\bffam \protect\bf \else \ifnum\count255=\ttfam \protect\tt \else \ifnum\count255=\sffam \protect\sf \else \ifnum\count255=\scfam \protect\sc \fi\fi\fi\fi\fi\fi% } \def\larger{% \count255=\fam% \ifx\@currsize\tiny \protect\scriptsize \else \ifx\@currsize\scriptsize \protect\footnotesize \else \ifx\@currsize\footnotesize \protect\small \else \ifx\@currsize\small \protect\normalsize \else \ifx\@currsize\normalsize \protect\large \else \ifx\@currsize\large \protect\Large \else \ifx\@currsize\Large \protect\LARGE \else \ifx\@currsize\LARGE \protect\huge \else \protect\Huge \fi\fi\fi\fi\fi\fi\fi\fi% \ifnum\count255=\itfam \protect\it \else \ifnum\count255=\slfam \protect\sl \else \ifnum\count255=\bffam \protect\bf \else \ifnum\count255=\ttfam \protect\tt \else \ifnum\count255=\sffam \protect\sf \else \ifnum\count255=\scfam \protect\sc \fi\fi\fi\fi\fi\fi% } --------------------- Now add the following two lines to your preamble: \def\pCHORUS/MiX{C{\smaller\smaller HORUS}/{\smaller MiX}} \def\CHORUS/MiX{\protect\pCHORUS/MiX} and you can now use \CHORUS/MiX like this: \section{Is \CHORUS/MiX\ the way to go?} And now we discuss \CHORUS/MiX, a wonderful new thing indeed. The two-step definition of \CHORUS/MiX using \protect is necessary if you want it to work in commands like \section. ________________ George V. Reilly `Out Vile Jelly' gvr@cs.brown.edu +1 (401) 863-7684 uunet!brunix!gvr gvr@browncs.bitnet Box 1910, Brown U, Prov, RI 02912