# Using width for caption introduces offset of said caption

by Fl.pf.   Last Updated September 11, 2019 14:23 PM

I wanted to use

\usepackage[width=0.75\textwidth]{caption}


To adjust the width of my caption to the width of the table. However, it introduces a significant offset of the caption.

Without the setting above:

\documentclass[a4paper]{article}
%% Sets page size and margins
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
%% set width of captions to width of table
%\usepackage[width=0.75\textwidth]{caption}
\begin{document}
\begin{table}[h]
\caption{\label{tab:tab}Bliblablubb, why does this have an offset I wonder? Bliblablubb, why does thi
\begin{tabular}{l|cccr}
\textbf{asdasd} & \textbf{cvbcvbce} & asdasdasdasds & sdsdsdsdsdsdsds& sdsdsdsdsdssd\\
\hline
asdf           &            &    &      &   \\
&            &    &      &   \\
&            &    &      &   \\
&            &    &      &   \\
\hline
\end{tabular}
\end{table}
\end{document}


Table and caption look like this:

If I comment in the \usepackage[width=0.75\textwidth]{caption} line, it looks like this:

While the caption has the right width, it is significantly offset. I do not understand the reason for this.

Tags :

## Related Questions

Updated March 28, 2015 14:07 PM

Updated April 09, 2015 19:09 PM

Updated April 14, 2015 22:10 PM

Updated April 24, 2015 20:09 PM

Updated July 17, 2015 17:10 PM