3

I'm trying to modify the defaut figure style with the memoir class.

More precisely, I would like to have the Figure X.Y part in bold.

To get X.Y in bold isn't a problem, as the \captionnamefont{\bfseries} does the job.

But what about "Figure" ?

Note that adding the caption package conflicts with memoir, for those not knowing...

  • 3
    \captionnamefont{\bfseries} works for me. Could you please add an MWE that illustrates your troubles? – cgnieder Aug 25 '12 at 21:14
0

Just \captionnamefont{\bfseries} must work. May you are using the subfig package?. In any case, try with this MWE:

\documentclass{memoir}

  % "This may cause unexpected or inconsistent results 
  % if you use any of memoir's captioning
  % facilities" (but work in other case?)
  %\usepackage{caption}
  %\captionsetup[figure]{labelfont=bf,textfont={bf,it}}

  % Still not working captioning facilities?. 
  % Conflits with another packages?  
  %\captionnamefont{\bfseries}


  %Starting from scratch

 \makeatletter
  \renewcommand{\fnum@figure}{\textbf
  {\figurename~\thefigure}}
  \renewcommand{\fnum@table}{\textbf
  {\tablename~\thetable}}
 \makeatother    

\begin{document}
 \begin{figure}[!h]
  \centering\framebox{Image}
  \caption{The caption}
 \end{figure}
\end{document}
1

Are you using subfigures and LyX? If so, there's a behavior that IMHO is a bug. Here's an explanation.

Recent versions of LyX implement subfigures using the subfig package, and by default subfig uses the captions package. In turn, Memoir turns off its own captioning when the captions package is being used. So if you're using LyX and subfigures, all that Memoir goodness won't work.

IMHO, LyX ought to fix this by adding a checkbox on the Document Class tab of Document Settings. The checkbox should be "Use internal captioning?" A yes would use the captioning built into the selected document class; no check would load the caption package.

Then, somewhere in LyX there would be something like this pseudocode:

if box is checked
     \usepackage[caption=false]{subfig}
else
      \usepackage{subfig}
fi

If the caption package is loaded, Memoir's custom captioning is deactivated. Rather than make users waste 5-8+ hours tracking down the source of the problem, the proposed fix will let the user choose which captioning to use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.