1

My listings have the numbering 1.1, 1.2, 1.3 - 2.1, 2.2, ... I need them to be continuous regardless of the chapter or section, being 1, 2, 3, 4, 5, 6, ...

The commands i used on listings:

\usepackage{listings}
\renewcommand{\lstlistingname}{Trecho de código}
\renewcommand{\lstlistlistingname}{Lista de trechos de código}
Torbjørn T.
  • 206,688
  • Hi, welcome. A rather thorough answer to this type of question can be found in https://tex.stackexchange.com/a/28334/, but Jake's answer there also answers your specific question I believe, in the final paragraph: "To turn off the environment's per-chapter numbering for classes that feature \chapter, issue \lstset{numberbychapter=false} in the document preamble." – Torbjørn T. Jun 18 '19 at 22:58
  • This worked, thanks a lot! – João Carlos Jun 18 '19 at 23:23
  • @TorbjørnT. Would you like to add an answer or should we close the question as duplicate? – CarLaTeX Jun 19 '19 at 04:36
  • Close with duplicate please, thanks – João Carlos Jun 19 '19 at 18:28

0 Answers0