Article View: comp.text.tex
Article #1340Re: Two problems I'm having with LaTeX
From: Cameron Smith
Date: Wed, 12 Aug 1992 06:16
Date: Wed, 12 Aug 1992 06:16
63 lines
3495 bytes
3495 bytes
In article <1992Aug12.034349.7035@parc.xerox.com>
jashley@parc.xerox.com (Mike Ashley) writes:
>I'm using \boldmath in section headings while using
>the book style, and the resulting headers look awful. Here's an
>example:
>
> \section {\protect\boldmath More on the function $F$
> \protect\unboldmath}
>
>This almost works: the section is printed in boldface, and the
>math looks great. *However*, my headers look terrible, since the
>text is printed in roman and the math is printed in boldface. Is
>there any way to fix this!? I'm comfortable hacking the book.sty
>file if I just knew what to do.
It seems to me that you are getting what you ask for. The explicit
\boldmath command that you put into the text matter that makes up
this particular section heading is being obeyed wherever that particular
text matter appears, including section heads and running heads.
The problem is that you have tried to implement a design decision
at the wrong level. You apparently decided that since the text
in your section heads was bold, any math in section heads should
be bold as well. Well and good; this is probably sound judgment.
But in that case, you have made a stylistic decision that potentially
affects all section heads, therefore it should be implemented in
the code that defines the effect of the \section command. It makes
no more sense to say
I want math in section heads to be bold, so I'll put "\boldmath" into
every section head that contains math
than it would make to say
I want text in section heads to be bold, so I'll put "\bf" into
every section head that contains text
Since you are comfortable hacking on style files, hack on the definition
of the "\section" command until it sets "\boldmath" automatically in
*all* section heads (which of course won't affect most of them);
then you won't have to include Band-Aid patches in the text that
specifies your section heads, and then the problem of how to restrict
the application of the Band-Aid commands won't exist. For heaven's
sake, the whole reason to use style files is so that the decisions
about the appearance of text can be separated from the text itself.
Commands like "\boldmath" should almost never appear in the source
of a document -- to do so is to mingle visual design with the writing
of the document, which is precisely what LaTeX was invented to avoid!
If math appears in a structural element whose typographical
expression (as determined by the document designer who created the
style file) calls for bold face, then it's the job of the structural
command defined in the style file to ensure that the math, like the
text, will be made bold.
As an alternative approach, if you want to be *really* perverse,
you could continue sprinkling "\boldmath" commands into your \section
declarations, and modify the definitions of \evenhead and \oddhead
to "\let\boldmath\relax" within headings!
Forget I said that. Please.
--Cameron Smith
cameron@symcom.math.uiuc.edu
Technical Details
Message-ID:
<BsuxEy.G5n@news.cso.uiuc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!wupost!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!cameronReferences:
<1992Aug12.034349.7035@parc.xerox.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!wupost!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!cameron From: cameron@symcom.math.uiuc.edu (Cameron Smith) Subject: Re: Two problems I'm having with LaTeX References: <1992Aug12.034349.7035@parc.xerox.com> Message-ID: <BsuxEy.G5n@news.cso.uiuc.edu> Sender: usenet@news.cso.uiuc.edu (Net Noise owner) Organization: none Date: Wed, 12 Aug 1992 06:16:09 GMT Lines: 63