[lug] Changing LaTeX labeling of Figures and Tables

Ed Hill ed at eh3.com
Wed Jan 21 11:41:06 MST 2004


On Wed, 2004-01-21 at 13:23, J. Wayde Allen wrote:
> Anyone know how to change the punctuation used by LaTeX when labeling
> figures and tables?  The default article style seems to be:
> 
>    Figure 1:  Caption
> 
> However, to comply with an specific publication style I need to change
> this to:
> 
>    Figure 1. Caption
> 
> Any ideas?


Hi Wade,

Since you didn't specify, I going to assume that you're using an
"article" (\documentclass[...]{article}).  In that case, the colon is
specified in the file:

  /usr/share/texmf/tex/latex/base/article.cls

with:

\long\def\@makecaption#1#2{%
  \vskip\abovecaptionskip
  \sbox\@tempboxa{#1: #2}%
  \ifdim \wd\@tempboxa >\hsize
    #1: #2\par
  \else
    \global \@minipagefalse
    \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
  \fi
  \vskip\belowcaptionskip}

You can make a local copy of the original "article.cls" file and create
your own definition that uses '.' instead of ':'.

Happy TeX-ing!
Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Room 54-1424;  77 Massachusetts Ave.
            Cambridge, MA 02139-4307
email:   eh3 at mit.edu,  ed at eh3.com
URL:     http://web.mit.edu/eh3/
phone:   617-253-0098
fax:     617-253-4464
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20040121/3a66eea7/attachment.pgp>


More information about the LUG mailing list