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.

\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.

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net
LaTeX Beginner's Guide LaTeX Cookbook
deimi
Posts: 1
Joined: Fri Sep 14, 2018 1:17 pm

ntheorem and the list of theorems

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: 9794
Joined: Mon Mar 10, 2008 9:44 pm

ntheorem and the list of theorems

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:

\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
theorem-list.png (39.63 KiB) Viewed 2713 times


Stefan
LaTeX.org admin


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 4 guests