Text Formattingfloat creation and numbering

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
gwada74
Posts: 42
Joined: Fri Nov 26, 2010 5:28 pm

float creation and numbering

Post by gwada74 »

Hi,
I created in my document a new float called "Image" by using float.sty. I would like to change the counter of "Image" from arabic to roman. Apparently the counter \theImage is not created when I create "Image".

How to create such a counter ?
Last edited by gwada74 on Sun Feb 06, 2011 12:17 am, edited 1 time in total.

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

float creation and numbering

Post by frabjous »

Hmm. The following:

Code: Select all

\documentclass{article}
\usepackage{float}
\newfloat{Image}{htb}{ige}
\renewcommand{\theImage}{\roman{Image}}
\begin{document}
\begin{Image}
\rule{2in}{2in}
\caption{Something}
\end{Image}
\end{document}
worked just fine for me.

If something similar doesn't work for you, could you post a minimal working example showing the misbehavior?
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

float creation and numbering

Post by sommerfee »

gwada74 wrote:Apparently the counter \theImage is not created when I create "Image".
That's not true:

Code: Select all

\documentclass{article}
\usepackage{float}
\newfloat{Image}{tbp}{loi}
\show\theImage
\begin{document}
\end{document}
gives the log output

Code: Select all

> \theImage=macro:
->\arabic {Image}.
gwada74
Posts: 42
Joined: Fri Nov 26, 2010 5:28 pm

Re: float creation and numbering

Post by gwada74 »

Thanks a lot this is working perfectly !
Post Reply