1

I can not figure out how to split the label and the text of a caption, just like this:

enter image description here

8
  • Which document class do you use? Are you currently loading the caption package?
    – Mico
    Oct 31, 2016 at 17:57
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – Dai Bowen
    Oct 31, 2016 at 18:05
  • \begin{table}[htbp] \centering \label{table:1} \caption{Average daily maximum hourly radiation and its average environmental temperature for each evaluated month.} \begin{tabular}{ccc} \hline Month & Radiation [(W/m^2)] & Temperature [$^{\circ}$C] \\ [0.5ex] \hline January & 791 & 31.6 \\ April & 686 & 30.5 \\ July & 636 & 26.6 \\ October & 855 & 30.7 \\ [1ex] \hline \end{tabular} \end{table} Oct 31, 2016 at 18:08
  • What do you mean by "split the label and the caption"? Do you want a bigger gap/space between them? And what about the space between the caption and the table?
    – Werner
    Oct 31, 2016 at 18:10
  • The label appeare like this: Table 2: Power generation comparison to Petrolina, 2013 data, with a transmittance of 95%. And I need to apeare like this: Table 2 Power generation comparison to Petrolina, 2013 data, with a transmittance of 95%. Oct 31, 2016 at 18:11

1 Answer 1

5

You should load the caption package with the options labelsep=newline and singlelinecheck=false.

In addition, if you want the caption to occupy the same width as the associated tabular material does, you should encase both the caption and the tabular material in a threeparttable environment.

enter image description here

\documentclass{article}
\usepackage{booktabs,dcolumn,caption,threeparttable}
\newcolumntype{d}[1]{D..{#1}}
\captionsetup{labelsep=newline,
              singlelinecheck=false,
              skip=0.25\baselineskip}
\newcommand\mc[1]{\multicolumn{1}{c}{#1}} % handy shortcut macro
\begin{document}
\begin{table}
\caption{BBCM coefficients for vertical sensors in the four cardinal orientations.}
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}*{4}{d{2.4}}}
\toprule
Coeff. & \mc{North} & \mc{South} & \mc{East} & \mc{West} \\
\midrule
$a_1$ &  1.1097 &  0.9141 &  1.1065 &  1.0670 \\
$\vdots$ \\
$c_2$ & -0.2464 &  0.2997 & -0.0947 &  0.5877 \\
$\vdots$ \\
$b_4$ &  0.0400 & -0.0299 &  0.0442 &  0.0853 \\
\bottomrule
\end{tabular*}
\end{table}

\begin{table}[htbp] 
\centering  
\begin{threeparttable}
\caption{Average daily maximum hourly radiation and its average environmental temperature for each evaluated month.}\label{table:1} 
\begin{tabular}{lcc} 
\toprule 
Month & Radiation [W/m$^2$] & Temperature [$^{\circ}$C]  \\
\midrule
January & 791 & 31.6 \\ 
April & 686 & 30.5 \\ 
July & 636 & 26.6 \\ 
October & 855 & 30.7 \\ 
\bottomrule 
\end{tabular} 
\end{threeparttable}
\end{table}
\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .