1

I have a large document (in the report class) with a bunch of subfigures, and I'm currently in the middle of a migration from the (apparently deprecated) subfigure package to subfig, but I'm having trouble getting the finer details to work well. Specifically:

  • I want normal references of the form \ref{fig} to print out in the format 1.1(a) (i.e. chapter, figure, subfigure, with parenthesis around the latter).
  • I want a \subref-type command that allows me to access the (a) part of that identifier.
  • I also want a \subref*-style caller that allows me to just get the a on its own, without the brackets (or, alternatively, allow me to reference multiple parts in one go, i.e. Figure 1.1(b-d) or (e,f), directly).

I am aware of this previous question, but the methods there only allow for two of the three goals, as they either take over \subref* for what \subref does above, or they pollute the \thesubfigure counter.

I'm OK with a migration that can be done with a search-and-replace (like e.g. changing \subfigure[...]{...} to \subfloat[...]{...}, but I'm a bit more wary of changes that require changing that to a full environment-based solution. Also, any solutions need to play well with hyperref.

I should also say that I find it frustrating that 'deprecated' packages are superseded by others that are nowhere near flexible enough and that break backwards compatibility in severe ways.

E.P.
  • 1,415
  • If you are going to migrate to a more current package, I would recommend subcaption (although personally I use minipages and format my own subcaptions). You can always create you own \subfig macro. They are pretty trivial to create. See http://tex.stackexchange.com/questions/287919/cls-file-not-compiling-subfigure/287941?s=1|1.0744#287941 or http://tex.stackexchange.com/questions/235284/how-to-add-subfigures-in-a-poster/235287?s=2|0.5651#235287 – John Kormylo Sep 01 '16 at 21:48

0 Answers0