|
Lorsque je souhaite faire référence à un théorème créé avec Voici un exemple minimal (sur cet exemple, deux références sont correctes sur les cinq...) : \documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{tikz-cd}
\usepackage{babel}
\usepackage{awesomebox}
\tikzcdset{arrow style=Latin Modern}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\newtcbtheorem[number within=section]{mytheo}{Théorème}%
{colback=red!5,colframe=red!35!black,fonttitle=\bfseries}{th}
\newtcbtheorem[use counter from=mytheo]{mycoro}{Corollaire}%
{colback=blue!5,colframe=blue!35!black,fonttitle=\bfseries}{th}
\newtcbtheorem[use counter from=mytheo]{mydefi}{Définition}%
{colback=green!5,colframe=green!35!black,fonttitle=\bfseries}{th}
\newtcbtheorem[use counter from=mytheo]{myexple}{Exemple}%
{colback=blue!5,colframe=blue!35!black,fonttitle=\bfseries}{th}
\newtcbtheorem[use counter from=mytheo]{myprop}{Proposition}%
{colback=red!5,colframe=red!35!black,fonttitle=\bfseries}{th}
\begin{document}
\section{Préliminaires}
\begin{mydefi}{}{}\label{def:voisinage}
Une définition
\end{mydefi}{}{}
\begin{myexple}{}{}\label{exple:voisinage}
Un exemple
\end{myexple}
L'exemple~\ref{exple:voisinage} était très instructif !
\section{Notation petit o}
\subsection{Définition}
On fait référence à la définition~\ref{def:voisinage}.
\begin{mydefi}{}{}\label{def:petit_o}
Définition
\end{mydefi}
\subsection{Critères}
On fait référence à la définition~\ref{def:petit_o}
\begin{myprop}{}{}\label{prop:critere_neglig_non_nul}
Une Proposition
\end{myprop}{}{}
\begin{myprop}{}{}\label{prop:critere_neglig_nul}
Encore une Proposition
\end{myprop}{}{}
\section{Equivalents}
\subsection{Une autre sous-section}
On fait référence aux Propositions~\ref{prop:critere_neglig_non_nul}~et~\ref{prop:critere_neglig_nul}~:
\end{document}
|
|
Pluseurs choses n'allaient pas dans votre code :
Voici un code corrigé (notez que l'option \documentclass[a4paper,french]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{tikz-cd} \usepackage{awesomebox} \usepackage{babel} \tikzcdset{arrow style=Latin Modern} \usepackage{tcolorbox} \tcbuselibrary{theorems} \newtcbtheorem[number within=section]{mytheo}{Théorème}% {colback=red!5,colframe=red!35!black,fonttitle=\bfseries}{th} \newtcbtheorem[use counter from=mytheo]{mycoro}{Corollaire}% {colback=blue!5,colframe=blue!35!black,fonttitle=\bfseries}{cor} \newtcbtheorem[use counter from=mytheo]{mydefi}{Définition}% {colback=green!5,colframe=green!35!black,fonttitle=\bfseries}{def} \newtcbtheorem[use counter from=mytheo]{myexple}{Exemple}% {colback=blue!5,colframe=blue!35!black,fonttitle=\bfseries}{exple} \newtcbtheorem[use counter from=mytheo]{myprop}{Proposition}% {colback=red!5,colframe=red!35!black,fonttitle=\bfseries}{prop} \begin{document} \section{Préliminaires} \begin{mydefi}{}{voisinage1} Une définition \end{mydefi}{}{} \begin{myexple}{}{voisinage2} Un exemple \end{myexple} L'exemple~\ref{exple:voisinage2} était très instructif ! \section{Notation petit o} \subsection{Définition} On fait référence à la définition~\ref{def:voisinage1}. \begin{mydefi}{}{petit_o} Définition \end{mydefi} \subsection{Critères} On fait référence à la définition~\ref{def:petit_o} \begin{myprop}{}{critere_neglig_non_nul} Une Proposition \end{myprop}{}{} \begin{myprop}{}{critere_neglig_nul} Encore une Proposition \end{myprop}{}{} \section{Equivalents} \subsection{Une autre sous-section} On fait référence aux Propositions~\ref{prop:critere_neglig_non_nul}~et~\ref{prop:critere_neglig_nul}~: \end{document} |
|
Peut-être comme ça : dans le 4e paramètre de \documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{tikz-cd}
\usepackage{babel}
\usepackage{awesomebox}
\tikzcdset{arrow style=Latin Modern}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\newtcbtheorem[number within=section]{mytheo}{Théorème}%
{colback=red!5,colframe=red!35!black,fonttitle=\bfseries}{th}
\newtcbtheorem[use counter from=mytheo]{mycoro}{Corollaire}%
{colback=blue!5,colframe=blue!35!black,fonttitle=\bfseries}{cor}
\newtcbtheorem[use counter from=mytheo]{mydefi}{Définition}%
{colback=green!5,colframe=green!35!black,fonttitle=\bfseries}{def}
\newtcbtheorem[use counter from=mytheo]{myexple}{Exemple}%
{colback=blue!5,colframe=blue!35!black,fonttitle=\bfseries}{exple}
\newtcbtheorem[use counter from=mytheo]{myprop}{Proposition}%
{colback=red!5,colframe=red!35!black,fonttitle=\bfseries}{prop}
\begin{document}
\section{Préliminaires}
\begin{mydefi}{}{voisinage}
Une définition
\end{mydefi}
\begin{myexple}{}{voisinage}
Un exemple
\end{myexple}
L'exemple~\ref{exple:voisinage} était très instructif !
\section{Notation petit o}
\subsection{Définition}
On fait référence à la définition~\ref{def:voisinage}.
\begin{mydefi}{}{petit_o}
Définition
\end{mydefi}
\subsection{Critères}
On fait référence à la définition~\ref{def:petit_o}
\begin{myprop}{}{critere_neglig_non_nul}
Une Proposition
\end{myprop}
\begin{myprop}{}{critere_neglig_nul}
Encore une Proposition
\end{myprop}
\section{Equivalents}
\subsection{Une autre sous-section}
On fait référence aux Propositions~\ref{prop:critere_neglig_non_nul}~et~\ref{prop:critere_neglig_nul}~:
\end{document}
|