Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'd like help redefining the Table and Figure captions. Currently both Table and Figure numbers are terminated by a period and colon. For example,

\caption{Foo bar}

Produces the text,

Table 1.: Foo bar

instead of

Table 1. Foo bar

or even

Table 1: Foo bar

or perhaps even

Table 1 Foo bar

I'd like to have control over the punctuation symbols appended to Figure and Table numbers.

BTW, I've tried redefining \figurename and \tablename as follows, without success.

\renewcommand{\figurename}{Figure}
\renewcommand{\tablename}{Table}}

If it matters, I'm using the classicthesis package.

Edit: redefining \thefigure as follows doesn't help either. The period and semicolon is still there

\renewcommand{\thefigure}{\thechapter.\arabic{figure}}

MWE:

\documentclass[10pt,a4paper,twoside,open=right,headinclude,footinclude]{scrreprt}
\usepackage{classicthesis-ldpkg}
\usepackage[]{natbib}
\usepackage[eulerchapternumbers,eulermath,subfig]{classicthesis}
\usepackage{datetime}
\usepackage{bm}
\usepackage{cancel}
\usepackage{caption}
\usepackage{subfig}
\usepackage{rotating}
\usepackage{multirow}
\usepackage[ruled,vlined,linesnumbered]{algorithm2e}

%\captionsetup{labelsep=none}

\begin{document}

\chapter{One}

\begin{table}[htbf]
 \centering
    \setlength\extrarowheight{4pt}
    \begin{tabular}{|>{\centering}p{35mm}|>{\centering}p{35mm}|p{35mm}<{\centering}|} \hline
        Foo          &   Bar        &   Bar Foo                    \\
        For         &   Bar              &   Bar Foo                          \\ \hline
    \end{tabular}
\caption{stuff} \label{www}
\end{table}

\appendix
\chapter{Appendix} Hello % THIS IS THE CULPRIT!!! (No appendix, no extra period)

\end{document} 
share|improve this question
1  
Please add a minimal working example (MWE) that illustrates your problem. –  Joseph Wright Sep 22 '11 at 11:17
    
I've added one. The problem appears to be the appendix. –  Olumide Sep 23 '11 at 12:19
add comment

3 Answers

up vote 5 down vote accepted

The MWE reproducing the problem can be reduced to:

\documentclass{scrreprt}
\usepackage{classicthesis}

\begin{document}

\begin{table}
 \caption{test}
\end{table}

\appendix
\chapter{Appendix} Hello

\end{document}

which produces the undesired behaviour shown here:

enter image description here

The problem occurs in my TeX Live2011 system; here's the File List obtained adding \listfiles to my MWE:

 *File List*
scrreprt.cls    2011/06/16 v3.09a KOMA-Script document class (report)
scrkbase.sty    2011/06/16 v3.09a KOMA-Script package (KOMA-Script-dependent ba
sics and keyval usage)
 scrbase.sty    2011/06/16 v3.09a KOMA-Script package (KOMA-Script-independent 
basics and keyval usage)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
scrlfile.sty    2011/03/09 v3.09 KOMA-Script package (loading files)
tocbasic.sty    2011/05/30 v3.09a KOMA-Script package (handling toc-files)
scrsize11pt.clo    2011/06/16 v3.09a KOMA-Script font size class option (11pt)
typearea.sty    2011/06/16 v3.09a KOMA-Script package (type area)
classicthesis.sty    2011/06/05 v3.0 Typographic Style for a classic-looking th
esis
  ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
hyperref.sty    2011/08/19 v6.82h Hypertext links for LaTeX
hobsub-hyperref.sty    2011/04/23 v1.4 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2011/04/23 v1.4 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2011/04/23 v1.4 Subsetting bundle oberdiek (HO)
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)
 ltxcmds.sty    2011/04/18 v1.20 LaTeX kernel commands for general use (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
  ifvtex.sty    2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable integer calculations (HO)
etexcmds.sty    2011/02/16 v1.5 Prefix for e-TeX command names (HO)
kvsetkeys.sty    2011/04/07 v1.13 Key value parser (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Defining keys (HO)
pdftexcmds.sty    2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)
pdfescape.sty    2011/04/04 v1.12 Provides string conversions (HO)
bigintcalc.sty    2011/01/30 v1.2 Expandable big integer calculations (HO)
  bitset.sty    2011/01/30 v1.1 Data type bit set (HO)
uniquecounter.sty    2011/01/30 v1.2 Provides unlimited unique counter (HO)
letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
 hopatch.sty    2011/01/30 v1.0 Wrapper for package hooks (HO)
xcolor-patch.sty    2011/01/30 xcolor patch
atveryend.sty    2011/04/23 v1.7 Hooks at very end of document (HO)
atbegshi.sty    2011/01/30 v1.15 At begin shipout hook (HO)
refcount.sty    2010/12/01 v3.2 Data extraction from references (HO)
 hycolor.sty    2011/01/30 v1.7 Color options of hyperref/bookmark (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
kvoptions.sty    2010/12/23 v3.10 Keyval support for LaTeX options (HO)
  pd1enc.def    2011/08/19 v6.82h Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
 hpdftex.def    2011/08/19 v6.82h Hyperref driver for pdfTeX
rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
dvipsnam.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
mathpazo.sty    2005/04/12 PSNFSS-v9.2a Palatino w/ Pazo Math (D.Puga, WaS) 
microtype.sty    2010/01/10 v2.4 Micro-typography with pdfTeX (RS)
microtype.cfg    2010/01/10 v2.4 microtype main configuration file (RS)
booktabs.sty    2005/04/14 v1.61803 publication quality tables
textcase.sty    2004/10/07 v0.07 Text only upper/lower case changing (DPC)
    soul.sty    2003/11/17 v2.4 letterspacing/underlining (mf)
scrpage2.sty    2010/04/22 v2.5 LaTeX2e KOMA-Script package
titlesec.sty    2011/08/28 v2.9.1 Sectioning titles
 tocloft.sty    2010/10/13 v2.3e parameterised ToC, etc., typesetting
 scrtime.sty    2011/06/16 v3.09a KOMA-Script package (time of LaTeX run)
remreset.sty    
 ot1pplj.fd    2004/09/06 font definitions for OT1/pplj.
 nameref.sty    2010/04/30 v2.40 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)
       a.out
       a.out
supp-pdf.mkii
  mt-ppl.cfg    2005/11/16 v1.6 microtype config. file: Palatino (RS)
 ***********

The problem can be solved in two ways:

1) Using the numbers=noenddot option for the KOMA classes (this will suppress the spurious extra period from the MWE) and then changing the label separator for the captions using \captionsetup from the caption package:

\documentclass[numbers=noenddot]{scrreprt}
\usepackage{classicthesis}
\usepackage{caption}
\captionsetup{labelsep=period}


\begin{document}

\begin{table}
 \caption{test}
\end{table}

\appendix
\chapter{Appendix} Hello

\end{document}

2) Redefining \tableformat (and \figureformat) to suppress the \autodot inserted by default (again, the label separator for the captions was changed using \captionsetup from the caption package):

\documentclass{scrreprt}
\usepackage{classicthesis}
\usepackage{caption}
\captionsetup{labelsep=period}

\renewcommand*{\figureformat}{\figurename~\thefigure}
\renewcommand*{\tableformat}{\tablename~\thetable}

\begin{document}

\begin{table}
 \caption{test}
\end{table}

\appendix
\chapter{Appendix} Hello

\end{document}
share|improve this answer
    
On my system it works even if I omit the number=noenddot option –  Tobi Sep 23 '11 at 14:08
    
@Tobi: Then it is a version-dependant problem. I'll add to my answer the output of the \listfiles command obtained after compiling my MWE. –  Gonzalo Medina Sep 23 '11 at 14:11
    
numbers=noenddot works a treat, thanks. I've got one other question. I'd like to produce a caption that is separated from the Table or Figure number by a space, not a period or colon, for example Table 1 caption. Is there a \captionsetup that can do this? –  Olumide Sep 23 '11 at 14:54
    
Shame on me. The PDF wasn’t reloaded. I can reproduce the described behavior … –  Tobi Sep 23 '11 at 14:56
    
Got it. For captions separated from the Table or Figure number by a space, I used \captionsetup{labelsep=space}. I wonder if its possible to tweak the space. –  Olumide Sep 23 '11 at 15:02
show 2 more comments

According to the default definitions of the classicthesis style, there should be a lone colon (:) after the figure and table numbers, but not a dot (.) as well. What other packages besides classicthesis are you loading that could be affecting the appearance of captions of figures and tables?

In general, one of the easiest ways of changing the style of the punctuation character(s) following a table/figure number in a caption is to load the caption style. After the \usepackage{caption} instruction, insert the commands

\captionsetup{labelsep = colon}

or

\captionsetup{labelsep = period}

to set the separator to a colon or period followed by a single space, respectively. Happy TeXing!

share|improve this answer
    
Thanks. I've tried \captionsetup{labelsep=none} but the period is still inserted. The period appears regardless of the labelsep option that I use. –  Olumide Sep 22 '11 at 12:33
1  
In that case, please tell us what other packages are loaded in your document's preamble -- one or more of them must be the "culprits." –  Mico Sep 22 '11 at 13:25
    
I've added the package list. Sorry for the delay. –  Olumide Sep 23 '11 at 9:53
    
Thanks! Please also mention the documentclass you're using. –  Mico Sep 23 '11 at 10:23
    
I have added the documentclass. –  Olumide Sep 23 '11 at 10:46
add comment

If you’re using KOMA-Script, the caption commands would be:

\newcommand*{\captionformat}{:\ } % this is the original one: Figure 1:
\renewcommand*{\captionformat}{.\ } % this is: Figure 1.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.