mengops” post=94094Qualcuno sa spegarmi perchè solo il terzo enviroment non funziona?
In allegato il file tex con il minimum working example che presenta il problema[attachment=997]prova.tex[/attachment]
Grazie
Riporto la soluzione data altrove.
Con
`
\newtheorem{abc}{Abc}[section]
\newtheorem{xyz}[abc]{Xyz}
`
stai dicendo a LaTeX che gli ambienti per teoremi `abc` e `xyz` hanno il contatore in comune; quindi nessun contatore `xyz` viene definito.
Potresti scrivere
`
\theoremstyle{definition}
\newtheorem{Gcal}{Grande Caloria \textit{Cal} o \textit{kcal}}[section]
\newtheorem{Pcal}[Gcal]{Piccola Caloria \textit{cal}}
\newtheorem{CalS}[Gcal]{Calore Specifico}
`
Un’istruzione [tt]\theoremstyle{definition}[/tt] è sufficiente.
C’è però un modo migliore.
`
\documentclass[12pt,a4paper]{report}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amssymb,amsthm,mathtools}
\usepackage{amsmath, textcomp}
\usepackage{titling}
\theoremstyle{definition}
\newtheorem{vardef*}{\vardefname}[section]
\newcommand\vardefname{} % initialize
\newenvironment{vardef}[1]
{\renewcommand\vardefname{#1}\begin{vardef*}}
{\end{vardef*}}
\begin{document}
\chapter{1}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\chapter{2}
\section{2.1}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\begin{vardef}{Grande Caloria \textit{Cal} o \textit{kcal}}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{vardef}
\begin{vardef}{Piccola Caloria \textit{cal}}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{vardef}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\begin{vardef}{Calore Specifico}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{vardef}
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{document}
`
Hai un solo ambiente generico per le definizioni e darai il titolo quando apri l’ambiente, così da non dover definire un ambiente per ogni tipo nel preambolo.
You have just a generic environment for definitions and give the title at statement time rather than having a different environment for each in the preamble.

Ciao
Enrico