Theses, Books, Title pages ⇒ PRoblem with \label and \ref in legrand-orange-book
PRoblem with \label and \ref in legrand-orange-book
Dear community,
My question is about the template legrand-orange-book, some could say how the references work in this template.
It seems to me that the newcounter and newtcolorbox commands modify the way you use the references.
I hope we can talk about this topic.
Greetings.
My question is about the template legrand-orange-book, some could say how the references work in this template.
It seems to me that the newcounter and newtcolorbox commands modify the way you use the references.
I hope we can talk about this topic.
Greetings.
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
PRoblem with \label and \ref in legrand-orange-book
Hi,
welcome to the forum!
Can you explain the issue in more detail? What does not work? Is there an error message? It would be good if you would post some code that leads to the problem.
Stefan
welcome to the forum!
Can you explain the issue in more detail? What does not work? Is there an error message? It would be good if you would post some code that leads to the problem.
Stefan
LaTeX.org admin
PRoblem with \label and \ref in legrand-orange-book
Of course, here the detail
as you can see in the attached image, at the end of the image, appears twice: "See Theorem 1.2".
The problem is that you should see
"See Theorem 1.1" and
"See Theorem 1.2"
as expected by the code used.
and that is precisely what does not allow me to advance, and so I come to the forum to ask wisdom.
Without more to add, greetings from Lima-Peru.
**Here I upload the complete source code
https://mega.nz/#!cvYDmLRL!Cn9SkcgZAyKX ... 5Iojl3Po6Y
as you can see in the attached image, at the end of the image, appears twice: "See Theorem 1.2".
The problem is that you should see
"See Theorem 1.1" and
"See Theorem 1.2"
as expected by the code used.
Code: Select all
\begin{teorema}{}
\label{teo1}
Sea X una variable aleatoria definida en $(\Omega,\mathscr{A},\P)$. También sea $g$ una función medible Borel en $\mathbb{R}$. Entonces $g(X)$ es también una variable aleatoria.
\end{teorema}
\begin{proof}[\textit{Prueba}]
$$
\{g(X) \le y\}=\{X\in g^{-1}(-\infty,y]\},
$$ y puesto que $g$ es una función medible Borel es un conjunto Borel. Resulta que $\{g(X)\le y\} \in \mathscr{A}$ con lo que se completa la prueba.
\end{proof}
\begin{proposition}\label{pro1}
Sean $X$ y $Y$variables aleatorias definidas en el mismo espacio de probabilidad $(\Omega,\mathscr{A},\P)$. Entonces,
\begin{enumerate}
\item $(aX + bY)(\omega)=aX(\omega) + bY(\omega) \quad \forall \omega\in\Omega, a,b\in \mathbb{R}$
\item $(X - Y)(\omega)=X(\omega) - Y(\omega) \quad \forall \omega\in\Omega;$
\item $\max(X,Y)$ y $\min(X,Y)$
\item $(X Y)(\omega)=X(\omega) Y(\omega) \quad \forall \omega\in\Omega,$
\item $\left(\frac{X}{Y}\right)(\omega)=\frac{X(\omega)}{Y(\omega)} \quad \forall \omega\in\Omega,\text{ supuesto que}, \{Y=0\}=\emptyset$
\end{enumerate}
son variables aleatorias.
\end{proposition}
\begin{teorema}{}
\label{teo2}
Sean $X$ y $Y$ variables aleatorias definidas en $(\Omega,\mathscr{A},\P)$. Entonces $X+Y$ y $XY$ son también variables aleatorias. Adicionalmente, $\{Y=0\}=\emptyset$, entonces $\frac{Y}{X}$ también es una variable aleatoria.
\end{teorema}
Ver teorema \ref{teo2}
Ver teorema \ref{teo1}
Without more to add, greetings from Lima-Peru.
**Here I upload the complete source code
https://mega.nz/#!cvYDmLRL!Cn9SkcgZAyKX ... 5Iojl3Po6Y
- Attachments
-
- rerfe.png (54.88 KiB) Viewed 5093 times
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
PRoblem with \label and \ref in legrand-orange-book
I think with those tcolorboxes the label goes at an optional argument to the defined environment, instead of using
I tried it and it did not yet work right away, but I guess knowing that piece may help you with a look into the
tcolorbox manual regarding the
Stefan
\label
, for proper support, such as:\begin{teorema}[label=teo1]
I tried it and it did not yet work right away, but I guess knowing that piece may help you with a look into the

label
option and referencing.Stefan
LaTeX.org admin
PRoblem with \label and \ref in legrand-orange-book
Dear Stefan ,
thanks for your help .
But I continue with a problem in cross-references. Apparently the \ref command does not recognize the numbering created with the \newcounter command.
As you can see in the final part of the attached image, all references are made to Theorem 1.2, however Theorem 1.2 does not exist in the structure of the pdf.
The code of this part is follows
**The complete source code is posted on:
https://mega.nz/#!g6YCnaBD!98EpmV8yrXjI ... LTy1tnJDGw
thanks for your help .
But I continue with a problem in cross-references. Apparently the \ref command does not recognize the numbering created with the \newcounter command.
As you can see in the final part of the attached image, all references are made to Theorem 1.2, however Theorem 1.2 does not exist in the structure of the pdf.
The code of this part is follows
Code: Select all
\begin{teorema}{}
Sea X una variable aleatoria definida en $(\Omega,\mathscr{A},\P)$. También sea $g$ una función medible Borel en $\mathbb{R}$. Entonces $g(X)$ es también una variable aleatoria.
\end{teorema}\label{teorem:teo1}
\begin{proof}[\textit{Prueba}]
$$
\{g(X) \le y\}=\{X\in g^{-1}(-\infty,y]\},
$$ y puesto que $g$ es una función medible Borel es un conjunto Borel. Resulta que $\{g(X)\le y\} \in \mathscr{A}$ con lo que se completa la prueba.
\end{proof}
\begin{proposition}\label{pro1}
Sean $X$ y $Y$variables aleatorias definidas en el mismo espacio de probabilidad $(\Omega,\mathscr{A},\P)$. Entonces,
\begin{enumerate}
\item $(aX + bY)(\omega)=aX(\omega) + bY(\omega) \quad \forall \omega\in\Omega, a,b\in \mathbb{R}$
\item $(X - Y)(\omega)=X(\omega) - Y(\omega) \quad \forall \omega\in\Omega;$
\item $\max(X,Y)$ y $\min(X,Y)$
\item $(X Y)(\omega)=X(\omega) Y(\omega) \quad \forall \omega\in\Omega,$
\item $\left(\frac{X}{Y}\right)(\omega)=\frac{X(\omega)}{Y(\omega)} \quad \forall \omega\in\Omega,\text{ supuesto que}, \{Y=0\}=\emptyset$
\end{enumerate}
son variables aleatorias.
\end{proposition}
\begin{teorema}{ }%[label={teorem:teo2}]
Sean $X$ y $Y$ variables aleatorias definidas en $(\Omega,\mathscr{A},\P)$. Entonces $X+Y$ y $XY$ son también variables aleatorias. Adicionalmente, $\{Y=0\}=\emptyset$, entonces $\frac{Y}{X}$ también es una variable aleatoria.
\end{teorema}\label{teorem:teo2}
Ver teorema \ref{teorem:teo1} y a la vez Ver teorema \ref{teorem:teo2} .
Luego \\
Ver teorema \ref{teorem:teo1} y a la vez Ver teorema \ref{teorem:teo2} .
https://mega.nz/#!g6YCnaBD!98EpmV8yrXjI ... LTy1tnJDGw
- Attachments
-
- problem_Ref.png (59.49 KiB) Viewed 5067 times
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
PRoblem with \label and \ref in legrand-orange-book
Labels should be within the environment, not after it, as I see here:
I cannot access mega.nz. Perhaps you can post it as attachment? It can be removed later. We just should keep problem related discussion (code, screenshot) here but for sure we should protect privacy and don't keep whole documents. Or create testable small code (instruction:
minimal working example).
Stefan
\end{teorema}\label{teorem:teo1}
I cannot access mega.nz. Perhaps you can post it as attachment? It can be removed later. We just should keep problem related discussion (code, screenshot) here but for sure we should protect privacy and don't keep whole documents. Or create testable small code (instruction:

Stefan
LaTeX.org admin