Moonic's notes


Sunday, August 19, 2012

LaTeX tip: one counter for tables and figures

To use a single counter for tables and figures in the LaTeX document
\makeatletter
\renewcommand*{\thetable}{\arabic{table}}
\renewcommand*{\thefigure}{\arabic{figure}}
\let\c@table\c@figure
\makeatother  
in the preamble of the document. One can test it using dummy text, thanks to blindtext package, i.e.

\usepackage[english]{babel}
\usepackage{blindtext}

for the preamble and

\blindtext
\Blindtext
 
in the main body of the document to produce a paragraph or two of the dummy text.

Acks: single counter tip can be found here; more about dummy text here.
 

Labels:

0 Comments:

Post a Comment

<< Home