LaTeX forum ⇒ Graphics, Figures & TablesCaption Text Changing Rows

Information and discussion about graphics, figures & tables in LaTeX documents.
timbuck1200
Posts: 1
Joined: Tue Sep 19, 2017 8:21 am

Caption Text Changing Rows

Postby timbuck1200 » Tue Sep 19, 2017 8:44 am

I am having a problem using captions with Tables. My caption seems to have a weird border so it creates a new line using only one or two words when trying to caption a table. I would like the caption to be on one line under the table.
Here is the code I am using and a picture of the problem. Any help is much appreciated on how to make my borders for the caption run the full length of the table.

\begin{table}[H]
\parbox{.2\linewidth}{
\centering
\label{dt1}
\begin{tabular}[b]{ccc}
&Upward Balancing &Downward Balancing\\
\hline
Surplus imbalance &Elspot price & (BM-) \\
Deficit imbalance &(BM+) & Elspot price \\

\hline
\end{tabular}
\subcaptionbox{Imbalance Prices for Producers}
}
\end{table}

LATEX.jpg
LATEX.jpg (19.07 KiB) Viewed 97 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 8544
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Tue Sep 19, 2017 10:05 pm

Hi Tim,

welcome to the forum!

This seems to math the parbox with 0.2 line length. Remove that \parbox and its closing brace to see the change.

0.2 of the line width doesn't fit to the table width anyway.

By the way, always use \label directly after a caption.

Stefan
Site admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 3 guests