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'm using two-column article document class. Long table Name is displayed in the following format:

Table 1: table caption goes here.

But I want to change in this way:

Table 1 table caption goes here

on the other words, I want to remove colon (:).

How can I do it?

I have to say that I tried the following topic: How to remove colon(:) on longtable suffix caption and I place that code below documentclass[a4paper]{article} and some \usepakage... but it did not work out.

My template is as follows:

    \documentclass[a4paper]{article}
    \usepackage{graphicx}
    \usepackage[cmex10]{amsmath}
    \usepackage[left=2cm, right=2cm]{geometry}
    \begin{document}

    \title{Title}
    \author{author}
    \linespread{1.6}
    \renewenvironment{abstract}{%
      \noindent\bfseries\abstractname:\normalfont}{}

    \maketitle
    \begin{abstract}
    \end{abstract}
    \section{Introduction}

    \end{document}
share|improve this question
2  
Does adding the following to your preamble help \usepackage[labelsep=space]{caption}? –  N.N. Sep 12 '11 at 12:25
    
It can remove : but the caption is placed at the bottom of it instead of at the top. –  amir Sep 12 '11 at 14:44
1  
If you place the caption before the tabular it will be placed on top of the table. See the example in my answer. –  N.N. Sep 12 '11 at 15:01
    
when I test your first solution I accidentally placed it before the tabular : \begin{table*}[!t] \caption{My caption.} \label{tableII} –  amir Sep 12 '11 at 21:48
    
I don't understand. Could you please try to be clearer? –  N.N. Sep 12 '11 at 21:51

2 Answers 2

up vote 10 down vote accepted

I suggest you load the package caption with the following option:

\usepackage{caption}
\captionsetup[table]{labelsep=space}

If you want this setting, i.e., a space instead of a colon, to apply to figure environments as well, you'd just remove the [table] option from the \captionsetup command.

A separate issue: To get the caption to print above the body of the float, all you need to do is to specify the caption (and its label, if any) after the \begin{table/figure} command but before starting a tabular environment and/or before including some external graphics file.

share|improve this answer
    
I placed my caption before \begin{table} but the problem has not solved.!! but I have to say that I'm using \begin{table*}[!t] –  amir Sep 12 '11 at 21:35
    
You must place the \caption command after the \begin{table} command but before any \begin{tabular} (or tabular*, tabularx, ...) instructions. (Placing the caption command before the start of the float is going to generate wildly unpredictable results.) Incidentally, using the table* and figure* environments only make sense in a two-column document (when you want a float that spans both columns of text). I'm editing my answer to clarify this point. –  Mico Sep 12 '11 at 21:54
    
Thank you Mico. It's ok right now. –  amir Sep 13 '11 at 19:47

Use the caption package with the labelsep=space option to achieve this.

Here's an example:

\documentclass{article}

\usepackage[labelsep=space]{caption}

\begin{document}

\begin{table}
\caption{An example of a table}
\begin{tabular}{ l c r }
  1 & 2 & 3 \\
  4 & 5 & 6 \\
  7 & 8 & 9 \\
\end{tabular}
\end{table}

\end{document}
share|improve this answer
    
I posted my answer, in substance identical to yours, only a few seconds after you posted your answer. Would you want me to delete it? –  Mico Sep 12 '11 at 15:03
1  
@Mico You mention an aspect (that you can set the option per enviroment instead of globally) that I don't mention in my answer (or my initial comment to the question) so I think your answer is justified. –  N.N. Sep 12 '11 at 15:06
    
Thanks, you're most gracious! –  Mico Sep 12 '11 at 15:22

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.