# [OS X TeX] math in running head

Alain Schremmer schremmer.alain at gmail.com
Sun Dec 13 00:52:19 EST 2009

On Dec 13, 2009, at 12:15 AM, Ross Moore wrote:

>
> On 13/12/2009, at 12:47 PM, Alain Schremmer wrote:
>
>> \documentclass[11pt]{book} uses caps in the running head and
>> prints, say, F(X) instead of f(x) although not in either the
>> chapter toc's as generated by titletoc.
>
> How are you specifying the contents of the running head?

\section[short title]{long title}

> Have you tried using   \MakeLowercase{$f(x)$}

Works!!!!!!

> or  $\MakeLowercase{f(x)}$  ?

Works too.

> If that doesn't work, then you can try setting the math
> in a box and then using that box in the running head;
>
> e.g. (in preamble)
>   \setbox\mathheadbox=\hbox{$f(x)$}
>
> Then at the appropriate place use
>
>
> or whatever package commands you might be using

That's the problem: I am not using any package command.

> Actually, you probably don't even need the box.
> Just using a macro may be enough:
>
> \DeclareRobustCommand{\effofex}{f(x)}
>
>    \markboth{..... $\effofex$ ...}{....}

That would be rather specific wouldn't it?

>> I understand that this is "the rule" but would not mind an (easy)
>> way to print f(x) in the running head as everywhere else. Can the
>> running head be all in lower case which would be fine?
>>
>> I have searched around, e.g. "math in running head", but to no
>> avail. Seems like, "it's just not done".
>
> Well, it used to be that people would say to never use math in titles.
> It became "not done" because of the kind of problem that you are
> currently encountering. Another such problem was that the math would
> not resize correctly for a title --- but that sizing issue was fixed
> as LaTeX got better (e.g., with LaTeX-2e).
>
> This is not to say that you couldn't always do it anyway, if you
> worked hard enough, just that it was not easy to get it right.

In this case, it wasn't hard. It's even in Companion 2ed. Colombus'
egg though.

> So publishers (even the AMS) would advise against it, and you
> may find that some still do so.

Ah, but since I have long been through with publishers and just
upload the stuff, that's no problem either. The reason I finally got
to try to do it was that I got one too many "Is F the same as f?"
from students.

> But in TeX you really can do pretty much anything, using macros.

YOU certainly can. I sure cannot. But I have learned enough to
believe you.

> Hope this helps,

It sure did---as always,

Most grateful regards
--schremmer