Log in

No account? Create an account
Changing the font in LaTex - Nick [entries|archive|friends|userinfo]

[ website | gagravarr.org ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Changing the font in LaTex [Sep. 25th, 2004|08:52 pm]
Hilary has become quite an avid LaTex user now, after all the hassle of doing her part II thesis in word. Today she asked me to help her with a problem she'd been having - how to change the font of her chapter titles, section titles, and figure caption titles.

After much googling, and some trial+error fighting with LaTex, I think I've come up with the answer. (These examples are to put it into sans-serif, but it should be general).

You need to edit report.cls / article.cls in tex\latex\base, depending on which document style you're working with. However, this will then change it for all your LaTex documents, but I haven't found another way. Possibly, redefining the appropriate macros in your document might work, but I don't know...

To change the figure caption, find the bit like "\def\fnum@figure{\figurename\nobreakspace\thefigure) and chuck in \sffamily before both \figureame (prints the text "Figure") and \thefigure (prints the figure number and the caption).

To change section / subsection / chapter etc, you need to find the bit "\newcommand\section" / "\newcommand\subsection" etc. In the commands that follow, you should find "\normalfont....\bfseries". After the \bfseries, drop in \sffamily. Repeat for the others.

We're still working on doing the equation text, I'll update this once've got it cracked.

From: hsenag
2004-09-25 08:22 pm (UTC)
You can copy the .cls file into the same directory as the document, instead of editing it in place.
(Reply) (Thread)
From: (Anonymous)
2004-09-29 02:42 pm (UTC)

LaTEX + ramblings of a deranged mind

I didn't think Word was all that bad after using it my for my DPhil. Locating pictures / images is still a major pain but I'm not sure how it could be better in anything else. I see that there are now two (!) Hamnetts on the OULSC committee. When's the Christmas dinner going to be ?

'online stalker'

(Reply) (Thread)
From: gagravarr
2004-09-29 04:05 pm (UTC)

Re: LaTEX + ramblings of a deranged mind

Hilary found Word got progressivly worse the more pictures she added, and hence the closer she got to being finished....

I've prodded the committee to organise christmas dinner early this year, I think it's on the agenda for the first committee meeting
(Reply) (Parent) (Thread)
From: (Anonymous)
2004-10-07 01:34 pm (UTC)

vaguely human

Can't seem to get Livejournal to accept an anonymous reply to a reply (no visible images or sounds to prove I'm human though there's always been plenty of debate about that anyway). Any chance the dinner might be on a Friday rather than midweek ?

online stalker possibly human
(Reply) (Thread)
From: gagravarr
2004-10-07 01:41 pm (UTC)

Re: vaguely human

Friday is my preference too, so I'll definately push for it at the committee meeting

You do realise that the solution to your anonymous problems is to get a LiveJouenal account, don't you? You don't have to post entries, but you would find it easier to post comments, and the system would alert you when someone replied to you comments.
(Reply) (Parent) (Thread)