GeneralSection headings and figure captions

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
danylo
Posts: 5
Joined: Thu Aug 09, 2007 5:41 pm

Section headings and figure captions

Post by danylo »

Hi,

a couple of loose ends I have concerning my Latex document (note that I am using the IEEEtran.cls template):
1) How do I change how the section heading are displayed? Currently its centred and displays the header as III. Section Name. I'd prefer it to be left-aligned and displayed as 3. Section Name.

2) The caption for my figures is currently - Fig. 1. (with a period at the end). I'd prefer it to be Figure 1: and the caption is bolded. I tried \renewcommand{\figurename}{Fig.} but I got an error saying it doesn't know what \figurename is.

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

Section headings and figure captions

Post by pumpkinegan »

To change to arabic section numbering: Edit line 1581 of the IEEEtran.cls file to be:

Code: Select all

\def\theequation{\arabic{equation}}                          % 1
To left justify the section name: Go to line 3882 of the IEEEtran.cls file and remove the "\centering" command:

Code: Select all

{0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\scshape}}%
To change the figure name: Edit line 1635 of IEEEtran.cls to be:

Code: Select all

\def\figurename{Figure}
To replace the period in the figure box with a semicolon: Edit line 1788 to be:

Code: Select all

\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1:}~~ #2}%
To make the figure name and number in bold type: Modify line 1822 to:

Code: Select all

\def\fnum@figure{\textbf{\figurename~\thefigure}}
Note: I do not recommend changing anything in IEEEtran.cls, since you may run into further problems with these short term solutions. Why would you want to do this? Are you aware of the compsoc option which gives behavior similar to what you desire:

Code: Select all

\documentclass[compsoc]{IEEEtran}
Post Reply