Hi
I am trying to change the default way in which the \ref command works with subfigure references. Right now the output I get is a figure number appended with the subfigure alphabet eg. 4c. I want it to appear as 4 (c) instead. I tried changing the \subref and \thefigure commands but couldn't figure it out.
Murtaza
Graphics, Figures & Tables ⇒ Subfigure reference format
NEW: TikZ book now 40% off at Amazon.com for a short time.
Subfigure reference format
1,1,2,3,5,8,13,21,34,55,89,144,233,...
-
- Posts: 8
- Joined: Mon Sep 21, 2009 9:04 pm
Re: Subfigure reference format
Hi
The captions themselves appear in the parentheses by default. The \subref only generates a reference to the subfigure and gives the alphabet (a), (b) etc. However, with \ref the parantheses disappear. Is there a way to make \subref work so that reference to the parent figure is also generated. Or anyway to modify the \ref command?
Sands
The captions themselves appear in the parentheses by default. The \subref only generates a reference to the subfigure and gives the alphabet (a), (b) etc. However, with \ref the parantheses disappear. Is there a way to make \subref work so that reference to the parent figure is also generated. Or anyway to modify the \ref command?
Sands
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Subfigure reference format
It's recommendable to use the subcapton package that comes with the current version of the caption package. It has its own manual which explains everything in detail. References are much easier.
Best regards and welcome to the board
Thorsten
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Subfigure reference format
That's exactly what the example code in the linked thread does.sandsoftime wrote:...Is there a way to make \subref work so that reference to the parent figure is also generated...
1,1,2,3,5,8,13,21,34,55,89,144,233,...
-
- Posts: 8
- Joined: Mon Sep 21, 2009 9:04 pm
Re: Subfigure reference format
Thanks. It works. I just forgot to add the \usepackage{subfig} explicitly in Lyx document preamble.