LaTeX forum ⇒ Math & Science ⇒ ntheorem 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

Hello,

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

\documentclass{article} \usepackage[utf8]{inputenc}\usepackage[english]{babel} \usepackage[standard,thref,hyperref]{ntheorem}\usepackage{thmtools} \renewcommand*{\listtheoremname}{Liste des théorèmes} \begin{document} \section{Introduction} \begin{theorem}Let $f$ be a function whose derivative exists in every point, then $f$ is a continuous function.\end{theorem} \begin{theorem}[Pythagorean theorem]This is a theorema about right triangles and can be summarised in the next equation $x^2 + y^2 = z^2$\end{theorem} \begin{corollary}There's no right rectangle whose sides measure 3cm, 4cm, and 6cm.\end{corollary} \listtheoremname\theoremlisttype{allname}\listtheorems{all} \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
please load hyperref package and replace \listtheorems{all} with \listtheorems{corollary,theorem}. Compile few times.

Stefan Kottwitz
Posts: 9281
Joined: Mon Mar 10, 2008 9:44 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.

\documentclass{article} \usepackage[utf8]{inputenc}\usepackage[english]{babel}\usepackage[hidelinks]{hyperref}\usepackage[standard,thref,hyperref]{ntheorem}\usepackage{thmtools}\renewcommand*{\listtheoremname}{Liste des théorèmes}\begin{document}\section{Introduction} \begin{theorem}Let $f$ be a function whose derivative exists in every point, then $f$ is a continuous function.\end{theorem} \begin{theorem}[Pythagorean theorem]This is a theorema about right triangles and can be summarised in the next equation $x^2 + y^2 = z^2$\end{theorem} \begin{corollary}There's no right rectangle whose sides measure 3cm, 4cm, and 6cm.\end{corollary} \section*{\listtheoremname}\theoremlisttype{allname}\listtheorems{corollary,theorem} \end{document}

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

Stefan