TransWikia.com

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
letc@tablec@thm
letc@figurec@thm
letc@algorithmc@thm

However, when I add

letc@lstlistingc@thm

I get an error: Command c@lstlisting already defined..

How can I get it to work?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP