Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

'Subfig' reference

5 views
Skip to first unread message

Leo

unread,
Jan 5, 2010, 7:51:41 AM1/5/10
to
Hello,

Using the subfig with memoir when referencing, it produces, for
example, 1a, 1b etc. Is it possible to get 1(a) 1(b) instead?

I am aware memoir has something for including sub figures but I need
subfig here.

Here's a minimal example:

\documentclass[article]{memoir}
\usepackage[caption=false]{subfig}
\begin{document}
\chapter{One}
See figures \ref{fig:1a} and \ref{fig:1b}
\begin{figure}
\centering
\subfloat[G]{Good?\label{fig:1a}}\qquad
\subfloat[B]{Bad?\label{fig:1b}}
\caption{A random figure}
\label{fig:1}
\end{figure}
\end{document}

Thanks in advance.

Leo

Lars Madsen

unread,
Jan 7, 2010, 4:34:53 AM1/7/10
to

from test4.tex (part of the subfig docs)

\documentclass[article]{memoir}
\usepackage[caption=false]{subfig}

\captionsetup[subfigure]{subrefformat=parens}
\begin{document}
\chapter{One}
See figures \subref*{fig:1a} and \ref{fig:1b}


\begin{figure}
\centering
\subfloat[G]{Good?\label{fig:1a}}\qquad
\subfloat[B]{Bad?\label{fig:1b}}
\caption{A random figure}
\label{fig:1}
\end{figure}
\end{document}

--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html

Leo

unread,
Jan 7, 2010, 5:44:55 AM1/7/10
to
Lars Madsen <dal...@RTFMSIGNATUREimf.au.dk> writes:

> from test4.tex (part of the subfig docs)
>
> \documentclass[article]{memoir}
> \usepackage[caption=false]{subfig}
> \captionsetup[subfigure]{subrefformat=parens}
> \begin{document}
> \chapter{One}
> See figures \subref*{fig:1a} and \ref{fig:1b}
> \begin{figure}
> \centering
> \subfloat[G]{Good?\label{fig:1a}}\qquad
> \subfloat[B]{Bad?\label{fig:1b}}
> \caption{A random figure}
> \label{fig:1}
> \end{figure}
> \end{document}

Unfortunately the one for \ref is not easy to customise. I'd like to
use it with packages such as varioref or cleveref and I have one
command for referencing everything. But thanks for the example.

Best wishes,
Leo

Lars Madsen

unread,
Jan 7, 2010, 5:50:17 AM1/7/10
to

then study the subfig manual or contact the author of that package.

Leo

unread,
Jan 7, 2010, 12:26:45 PM1/7/10
to
On 2010-01-07 10:50 +0000, Lars Madsen wrote:
> then study the subfig manual or contact the author of that package.

Similar questions were raised in the past but it seems subfig still
hasn't got this feature. Maybe it is not worth fixing. I will use the
current format.

Thanks for your suggestions.

Leo

--
H A P P Y H O L I D A Y S!

0 new messages