LaTeX forum ⇒ Math & Sciencentheorem and the list of theorems

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
polymorphisme
Posts: 1
Joined: Wed Sep 05, 2018 1:52 pm

ntheorem and the list of theorems

Postby polymorphisme » Wed Sep 05, 2018 4:19 pm

Hello,

I'm trying to use the package ntheorem. I want display the list of the theorem.

  1. \documentclass{article}
  2.  
  3. \usepackage[utf8]{inputenc}
  4. \usepackage[english]{babel}
  5.  
  6. \usepackage[standard,thref,hyperref]{ntheorem}
  7. \usepackage{thmtools}
  8.  
  9. \renewcommand*{\listtheoremname}{Liste des théorèmes}
  10.  
  11. \begin{document}
  12.  
  13. \section{Introduction}
  14.  
  15. \begin{theorem}
  16. Let $f$ be a function whose derivative exists in every point, then $f$ is
  17. a continuous function.
  18. \end{theorem}
  19.  
  20. \begin{theorem}[Pythagorean theorem]
  21. This is a theorema about right triangles and can be summarised in the next
  22. equation \[ x^2 + y^2 = z^2 \]
  23. \end{theorem}
  24.  
  25. \begin{corollary}
  26. There's no right rectangle whose sides measure 3cm, 4cm, and 6cm.
  27. \end{corollary}
  28.  
  29. \listtheoremname
  30. \theoremlisttype{allname}
  31. \listtheorems{all}
  32.  
  33. \end{document}


I obtain juste a simple line as list of theorem :

Liste des théorèmes theoremTheorem2Pythagorean theorem1 lemmaLemma11

I'm looking for how to obtain a real list of theorem.
Thank you.

deimi
Posts: 1
Joined: Fri Sep 14, 2018 1:17 pm

Postby deimi » Fri Sep 14, 2018 1:26 pm

please load hyperref package and replace \listtheorems{all} with \listtheorems{corollary,theorem}. Compile few times.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9021
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Sep 14, 2018 1:46 pm

Hi deimi,

welcome to the forum!

Indeed, ntheorem doesn't load hyperref implicitly even though the option hyperref was used. Very good catch! I didn't notice that. Indeed it then compiles fine.

Instead of just outputting \listtheoremname, using a \section command would be good, to have a proper heading.

With your advice, the code can be this way:

  1. \documentclass{article}
  2.  
  3. \usepackage[utf8]{inputenc}
  4. \usepackage[english]{babel}
  5. \usepackage[hidelinks]{hyperref}
  6. \usepackage[standard,thref,hyperref]{ntheorem}
  7. \usepackage{thmtools}
  8. \renewcommand*{\listtheoremname}{Liste des théorèmes}
  9. \begin{document}
  10. \section{Introduction}
  11.  
  12. \begin{theorem}
  13. Let $f$ be a function whose derivative exists in every point, then $f$ is
  14. a continuous function.
  15. \end{theorem}
  16.  
  17. \begin{theorem}[Pythagorean theorem]
  18. This is a theorema about right triangles and can be summarised in the next
  19. equation \[ x^2 + y^2 = z^2 \]
  20. \end{theorem}
  21.  
  22. \begin{corollary}
  23. There's no right rectangle whose sides measure 3cm, 4cm, and 6cm.
  24. \end{corollary}
  25.  
  26. \section*{\listtheoremname}
  27. \theoremlisttype{allname}
  28. \listtheorems{corollary,theorem}
  29. \end{document}


theorem-list.png
theorem-list.png (39.63 KiB) Viewed 94 times


Stefan
Site admin


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 5 guests