Steve Litt wrote:
> On Tuesday 15 May 2007 11:56, Richard Heck wrote:
>   
>> Steve Litt wrote:
>>     
>>> Hi all,
>>>
>>> I have a character style that I want to have a funky typeface*. Something
>>> like cmff. I can change the typeface in pure TeX, but I must name a size.
>>> What I'd like is for the typeface change to occur at the current size, so
>>> if the character style is used in a heading its size will be appropriate.
>>>
>>> Here's the change as I made it in TeX. Is there a way to do it in LaTeX,
>>> hopefully in such a way that I won't have to name a size?
>>>       
>> I don't understand. I just compiled this file using LaTeX, and it worked
>> fine. So it seems to me you can just define a charstyle roughly like this:
>> CharStyle Funky
>> LatexType Command
>> LatexName funky
>> Font
>> Family Typewriter
>> EndFont
>> LabelFont
>> Family Roman
>> Color blue
>> EndFont
>> Preamble
>> \font\specialfont = cmff12
>> \newcommand\funky{\specialfont}
>> EndPreamble
>> End
>> More or less that, anyway. (We have to define the newcommand since
>> \specialfont is a declaration, not a command.)
>>
>> Richard
>>     
>
> Thanks Richard,
>
> My code, and yours, work well assuming the charcter style is applied to body 
> text or something of a similar size. However, if applied to a section 
> heading, it will print out at 12 point when the rest of the section heading 
> prints out at 24 point or whatever.
>
> In other words, I'm looking for a way to make something like the cmff 
> equivalent of \texttt{text} or \textsf{text}.
>   
Have a look at this: http://www.latex-project.org/guides/fntguide.pdf.
You don't have to set all the attributes when you select a new font: So
you can do something like:
\newcommand\specialfont{\fontfamily{cmtt}\selectfont}. Note, though,
that using this in section headings can cause problems. At a miminum,
you will need to \protect it.

And sadly, by the way, cmff cannot be selected this way, apparently, at
least not without some additional setup. You would need to create an
ot1cmff.fd file. See $TEXMF/tex/latex/psnfss/*.fd for some examples, and
the previously referenced .pdf file for the details. WARNING: I don't
know anything about this!

rh

-- 
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Reply via email to