# How to control the space from caption title (Fig. or Table) to caption label (number)?

I use the package caption to set the caption of float. I want to get a large label of captions placing in margin, so I need change the distance of caption title and its label (the default is a \nobreakspace).

---EDIT---

The MWE is:

\documentclass{article}

\usepackage{caption,wrapfig,lipsum,marginnote}

\captionsetup[wrapfigure]{
labelsep=newline,
labelfont={bf},
position=top,
skip=0pt,
singlelinecheck=no}
\begin{document}
\lipsum[1]
\begin{wrapfigure}{r}[0pt]{4cm}\raggedleft
\marginnote{
\captionof{figure}
{Here is a caption text.}}
\fbox{\parbox{4cm}{aaa\\
bbb\\
ccc\\
ddd\\
eee\\
fff\\
ggg
}}
\end{wrapfigure}
\lipsum[1]

\end{document}


The code above show:

But I want is:

That is say, I want to insert a \newline after Figure and before 1.

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Mar 21 '15 at 17:48

Note, I also fixed the width of the \parbox so that the \fbox would fit inside the margin.

My original solution was simple elegant, and wrong. Specifically, \thefigure is also used in the list of figures. It took a bit of searching, but I believe \fnum@figure is the right macro to modify.

\documentclass{article}
\usepackage{caption,wrapfig,lipsum,marginnote}

\makeatletter
\renewcommand{\fnum@figure}{\figurename\newline\centerline{\huge\thefigure}}
\makeatother

\captionsetup[wrapfigure]{
labelsep=newline,
labelfont={bf},
position=top,
skip=0pt,
singlelinecheck=no}
\begin{document}
\lipsum[1]
\begin{wrapfigure}{r}[0pt]{4cm}\raggedleft
\marginnote{
\captionof{figure}
{Here is a caption text.}}
\fbox{\parbox{\dimexpr 4cm-2\fboxsep-2\fboxrule}{aaa\\
bbb\\
ccc\\
ddd\\
eee\\
fff\\
ggg
}}
\end{wrapfigure}
\lipsum[1]

\end{document}


• Thank you. Any why \renewcommand{\thefigure}{\newline\centerline{abc\huge\arabic{figure}}} don't show the abc? – Tony Pierre Mar 24 '15 at 0:44
• Did you run it twice? Works for me. – John Kormylo Mar 24 '15 at 3:30