Graphics, Figures & TablesCaption customizing

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Major
Posts: 8
Joined: Fri Feb 18, 2011 7:39 pm

Caption customizing

Post by Major »

Hello

I'm using the float package to create a new float and I would like it that it's captions are displayed as <number><type><captiontext>.

I tried the caption package to accomplish this with no luck.

In the MWE, first there is a standard figure. It has the desired caption format thanks to Babel. But my custom float misses the text, even the "texttext" part from the caption.

If the \DeclareCaption... line is commented out, the output remains the same. If the \usepackage{caption} is removed too, then it's back to the format as <text><number><caption>.

So the question is, how can I reformat my custom float's caption so that the number comes first and the typetext, caption text follows it?

I'm working on WinXP SP3 with MikTex.

Daniel
Attachments
mwecaption.tex
MWE
(447 Bytes) Downloaded 206 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Caption customizing

Post by frabjous »

Apparently, there's a conflict with the hungarian and magyar options to babel and the caption package. It's mentioned here. I would have hoped it was fixed by now, but doesn't seem to be. The author of the caption package sometimes visits this forum and may be able to help; I'm not sure.

There might also be an alternative on this site, but not being able to read Hungarian myself, I don't know.
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Caption customizing

Post by sommerfee »

frabjous wrote:I would have hoped it was fixed by now, but doesn't seem to be.
Shame on me :oops:

I have already adapted the caption package to magyar, and hopefully there will be a new caption package version next week-end.
Major
Posts: 8
Joined: Fri Feb 18, 2011 7:39 pm

Re: Caption customizing

Post by Major »

Hello

Thanks for the quick replies!

frabjous, I checked that site, seems it contains nothing related to this problem.

sommerfee, thats great to hear! I'm looking forward to that release!

Daniel
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Caption customizing

Post by frabjous »

Major wrote: frabjous, I checked that site, seems it contains nothing related to this problem.
I didn't think it related to this problem in particular. I thought it contained an alternative to babel (which you could try and perhaps it would not cause the same issue). My only reason for believing so is the note here.
Major
Posts: 8
Joined: Fri Feb 18, 2011 7:39 pm

Re: Caption customizing

Post by Major »

Yeah, I knew that and I'm already using the "much better" version, but thanks for clarifying.
Major
Posts: 8
Joined: Fri Feb 18, 2011 7:39 pm

Re: Caption customizing

Post by Major »

Still waiting for that updated package...
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

Re: Caption customizing

Post by sommerfee »

I'm deeply sorry for the long delay, but finally the version 3.2 of the caption package supporting the magyar babel option is available on CTAN right now.

Please note that your specific example file will still issue a warning, but you can simply ignore that. This warning will be suppressed in the very next bugfix release 3.2a which will be released soon.

Also please note that declaring a label format called "usualstyle" is not sufficient. If you want to use it, you have to select it with \captionsetup{labelformat=usualstyle} additionally.
Post Reply