4

I have a tex file

%
\documentclass[11pt]{article}
\usepackage{mathtools,amssymb,amsthm,enumitem,tcolorbox,fullpage,microtype,multirow}
\usepackage{showkeys}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[mathscr]{eucal}
\usepackage[hypertexnames=false]{hyperref}
\hypersetup{
  colorlinks=true,
  linkcolor=blue,
  filecolor=blue,
  urlcolor=red,
  citecolor=magenta
}
\usepackage[noabbrev,capitalize,nameinlink]{cleveref}
\usepackage{autonum}
\setlist{font=\normalfont}

\DeclareMathOperator*{\supp}{supp}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\TT}{\mathbb{T}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\EE}{\mathbb{E}}
\newcommand{\FF}{\mathbb{F}}
\newcommand{\diff}{\, \mathrm d}

\begin{document}

\section{Introduction}
We fix $T>0$ and let $\TT$ be the interval $[0, T]$. We consider measurable functions
\begin{align}
b &: \TT \times {\RR}^d \to {\RR}^d, \\
\sigma &: \TT \times  {\RR}^d \to {\RR}^d \otimes {\RR}^m.
\end{align}

Let $(B_t, t \ge 0)$ be a $m$-dimensional Brownian motion and $\FF := (\mathcal F_t, t \ge 0)$ an admissible filtration on a probability space $(\Omega, \mathcal A, \PP)$. We consider the SDE
\begin{align} \label{main_eq1}
\diff X_t = b(t, X_t) \diff t + \sigma (t, X_t) \diff B_t,
\quad t \in \TT,
\end{align}
where the distribution of $X_0$ is $\nu$. Let $a := \sigma \sigma^\top$. For simplicity, we denote $b_t (x) := b(t, x), \sigma_t(x) := \sigma (t, x)$ and $a_t(x) := a (t, x)$.

Equation \eqref{main_eq1} is weakly well-posed.

\end{document}

which is compiled without error. However, the numbering of the equation does not show up:

enter image description here

Could you explain the reason behind this problem and how to solve it?

3
  • Remove showkeys
    – egreg
    Commented May 4 at 9:45
  • @egreg Removing showkeys will make the numbering appear, but I want to use this package to easily manage the created labels. Could you elaborate more?
    – Akira
    Commented May 4 at 9:48
  • 1
    You can't have both. But when you need to see the labels, you don't need cross references to be correct, do you?
    – egreg
    Commented May 4 at 9:50

1 Answer 1

3

The culprit is the combination of showkeys and autonum, which don't go along together.

\documentclass[11pt]{article}
\usepackage{mathtools,amssymb,amsthm,enumitem,tcolorbox,fullpage,microtype,multirow}
\usepackage[T1]{fontenc}
\usepackage[mathscr]{eucal}
\usepackage[hypertexnames=false]{hyperref}
\hypersetup{
  colorlinks=true,
  linkcolor=blue,
  filecolor=blue,
  urlcolor=red,
  citecolor=magenta
}
\usepackage[noabbrev,capitalize,nameinlink]{cleveref}
\usepackage{autonum}

\setlist{font=\normalfont}

\DeclareMathOperator*{\supp}{supp}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\TT}{\mathbb{T}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\EE}{\mathbb{E}}
\newcommand{\FF}{\mathbb{F}}
\newcommand{\diff}{\mathop{}\!\mathrm{d}}% sigh!

\begin{document}

\section{Introduction}
We fix $T>0$ and let $\TT$ be the interval $[0, T]$. We consider measurable functions
\begin{align}
b &: \TT \times \RR^d \to \RR^d, \\
\sigma &: \TT \times  \RR^d \to \RR^d \otimes \RR^m.
\end{align}

Let $(B_t, t \ge 0)$ be a $m$-dimensional Brownian motion and 
$\FF := (\mathcal F_t, t \ge 0)$ an admissible filtration on 
a probability space $(\Omega, \mathcal A, \PP)$. We consider the SDE
\begin{equation}\label{main_eq1}
\diff X_t = b(t, X_t) \diff t + \sigma (t, X_t) \diff B_t,
\quad t \in \TT,
\end{equation}
where the distribution of $X_0$ is $\nu$. Let $a := \sigma \sigma^\top$. 
For simplicity, we denote $b_t (x) := b(t, x), \sigma_t(x) := \sigma (t, x)$ 
and $a_t(x) := a (t, x)$.

Equation \eqref{main_eq1} is weakly well-posed.

\end{document}

Note that {\RR}^d has superfluous braces and that your definition of \diff isn't correct (and I'm not referring to the abominable upright d, but to the forced space).

Don't use align for single equations.

enter image description here

What can you do? You can use showkeys while writing the document; cross references won't work, but you don't need them in that phase. Remove the package when ready for the production version.

3
  • cross references are supposed to work, that looks like a bug to me. Commented May 4 at 10:39
  • 1
    or more exactly autonum changing too much so breaking showkeys Commented May 4 at 10:46
  • About a good \diff, I have come across your nice comment :)
    – Akira
    Commented May 5 at 9:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .