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.

Although, I saw the following post in order to do that : How to force to center the table captions?, I coudn't find a proper way to set the table's caption. How can I force this action?

\documentclass[english,a4paper,12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\newcommand{\head}[1]{\textnormal{\textbf{#1}}}
\usepackage{graphicx}
\usepackage[showframe=false]{geometry}
\usepackage{changepage}
\usepackage[font=Large,labelfont=bf,justification=centering]{caption}
\begin{document}

asdasdasdad sadasdasdasdadasd asdasdasdasdafenm jejfnewjfnejfne nfjewnfwnfwfwqf
\begin{table}[htb]
\begin{adjustwidth}{-0.5cm}{}
\resizebox{0.6\textwidth}{!}{
\begin{minipage}{\textwidth}
\def\arraystretch{1.2}%
\begin{tabular}{ | c | c | c | c | c |  c |  c |  c | c |  c |  c |  }

\cline{2-11} 
\multicolumn{1}{c|}{} & \textbf{Telestrada} & \textbf{Telestrada} & \textbf{Telestrada} & \textbf{Telestrada} &
\textbf{Telestrada} & \textbf{Telestrada} & \textbf{Telestrada} & 
\textbf{Telestrada} & \textbf{Telestrada} & \textbf{Telestrada} \\

\hline
  \textbf{LOC} & 5 & 5 & 6 & 5 & - & 5 & 6 & 5 & 6 & 5  \\
\hline
  \textbf{VS} & 8 & 5 & 9 & 8 & 9 & 8 & 9 & 8 & 9 & 8 \\
\hline

\end{tabular}
\caption{\label{fig:text}text experiment experiment experiment experiment}
\end{minipage} }

\end{adjustwidth}
\end{table}
\\
sdasdada asdasdas adasdasdasd
\end{document}

enter image description here

share|improve this question

1 Answer 1

up vote 7 down vote accepted

Your caption is resized to 0.6\textwidth as it lies inside the minipage Same thing happens to tabular too but since it is tooo long we don't notice it. Put the caption outside the \resizebox and use font=small in the option of caption. You may also control the width by width=\textwidth.

Code:

\documentclass[english,a4paper,12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\newcommand{\head}[1]{\textnormal{\textbf{#1}}}
\usepackage{graphicx}
\usepackage[showframe=false]{geometry}
\usepackage{changepage}
\usepackage[font=normalsize,labelfont=bf,justification=centering]{caption}
%%% use `font=normalsize`. can also use `width=\textwidth`
\begin{document}

asdasdasdad sadasdasdasdadasd asdasdasdasdafenm jejfnewjfnejfne nfjewnfwnfwfwqf
\begin{table}[htb]
\begin{adjustwidth}{-0.5cm}{}
\resizebox{0.6\textwidth}{!}{
\begin{minipage}{\linewidth}
\def\arraystretch{1.2}%
\begin{tabular}{ | c | c | c | c | c |  c |  c |  c | c |  c |  c |  }

\cline{2-11}
\multicolumn{1}{c|}{} & \textbf{Telestrada} & \textbf{Telestrada} & \textbf{Telestrada} & \textbf{Telestrada} &
\textbf{Telestrada} & \textbf{Telestrada} & \textbf{Telestrada} &
\textbf{Telestrada} & \textbf{Telestrada} & \textbf{Telestrada} \\

\hline
  \textbf{LOC} & 5 & 5 & 6 & 5 & - & 5 & 6 & 5 & 6 & 5  \\
\hline
  \textbf{VS} & 8 & 5 & 9 & 8 & 9 & 8 & 9 & 8 & 9 & 8 \\
\hline

\end{tabular}
\end{minipage} 
}
\end{adjustwidth}
%% put caption outside here
\caption{\label{fig:text}text experiment experiment experiment experiment experiment experiment experiment}
\end{table}

%% don't use a \\ here but leave an empty l;ine
sdasdada asdasdas adasdasdasd
\end{document}

enter image description here

share|improve this answer
    
thanks a million! +1 –  Hakan Mar 30 at 14:02

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.