Setting a common counter to different environments (figures, tables, theorems, etc)

TeX - LaTeX Asked by Ido on October 4, 2020

I am trying to set a common counter to the environments figure, table, algorithm, thm, lstlisting. After searching over the internet I found a partial solution: to add the following code at the beginning of the document:

% sets a common counter to figures, tables and algorithms
[email protected]@thm
[email protected]@thm
[email protected]@thm

However, when I add

[email protected]@thm

I get an error: Command [email protected] already defined..

How can I get it to work?

Add your own answers!

Related Questions

Texmaker Error “File not found”

3  Asked on March 7, 2021 by pizzaguru


Fold code in overleaf

1  Asked on March 7, 2021


Latex does not work in Python’s matplotlib

0  Asked on March 6, 2021 by lioncereals


usepackage{opcit}: language and commenting

1  Asked on March 6, 2021 by william-lund


References not appearing in my Latex Document

0  Asked on March 6, 2021 by siba


tikzpicture node fix node size

1  Asked on March 6, 2021


Weird behavior of jobname

2  Asked on March 6, 2021 by patrik-bak


TeXnicCenter not working with Acrobat Reader

0  Asked on March 6, 2021 by jdc228


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir