michal-h21 / rdfref

Cross-referencing system for LaTeX, inspired with RDF
16 stars 3 forks source link

a even more realistic example, compiles, but no graph is generated #13

Open ouboub opened 1 week ago

ouboub commented 1 week ago

Hi

Sorry, but it seems that I have not really understood the syntax for generating a dependency graphs for equations. I took a real example of a proof, changed equations to rdfequation the same for labels and references. Here is the example

\documentclass[12pt,landscape]{article}
\usepackage{amssymb,amsfonts,amsmath,amsthm}
\usepackage{accents}

\newcommand{\setT}{{\mathord{\mathbb T}}}
\makeatletter
\newcommand{\sbullet}{%
  \hbox{\fontfamily{lmr}\fontsize{.4\dimexpr(\f@size 
pt)}{0}\selectfont\textbullet}}
\DeclareRobustCommand{\mathbullet}{\accentset{\sbullet}}
\makeatother
\newcommand{\eqdef}{\overset{\mbox{\tiny{def}}}{=}}

\usepackage{thmtools}
\newtheorem{thm}{Theorem}
\newtheorem{defn}{Definition}
\newtheorem{lem}{Lemma}
\newtheorem{cor}{Corollary}

\newtheorem{prop}{Proposition}
\newtheorem{rem}{Remark}
\theoremstyle{definition}
\usepackage{xr-hyper}
\usepackage[colorlinks]{hyperref}
\externaldocument[A-]{nordstroem-jee}
\usepackage{cleveref}
\usepackage{cleveref-nameref}
\usepackage{cleveref-fix}

\Crefname{defn}{Definition}{Definitions}
\crefname{thm}{Theorem}{Theorems}
\Crefname{lem}{Lemma}{Lemmas}
\Crefname{prop}{Proposition}{Propositions}
\crefname{prop}{Proposition}{Propositions}
\crefname{cor}{Corollary}{Corollaries}
\Crefname{cor}{Corollary}{Corollaries}
\crefname{rem}{Remark}{Remarks}
\Crefname{rem}{Remark}{Remarks}

\usepackage{tikz}
\usepackage{shellesc}
\usetikzlibrary{graphs,graphdrawing,calc} 
\usegdlibrary{layered}
\usepackage[T1]{fontenc}
\usepackage{rdfref}
\robustify\int
\NewDocumentEnvironment{rdfequation}{o +b}{
  \begin{equation}
    #2 
    \IfBlankF{#1}{
      \rdflabel{#1}
      \AssignProperty{#1}{eq:value}{$#2$}
    }
  \end{equation}
}{}

\newwrite\graphwrite

\makeatletter
\newcommand\graphout[1]{\protected@write\graphwrite{\let\owrite\write\def\write{\immediate\owrite}}{#1}}

% #1 name of the graph (default \jobname-graph) -- it needs to be different than name of any existing file!
% #2 RDF property to be printed
% #3 list of allowed rdf:type for objects
% #4 list of allowed rdf:type for subjects
% don't forget to call latex with --shell-escape 
\NewDocumentCommand\RdfDrawGraph{O{\jobname-graph} O{rdfs:label} m m}{%
  \immediate\openout\graphwrite=#1.dot\relax%
  \graphout{digraph hello\@charlb} % save graph header
  \RdfLoopReferences{#3}{#4}{%
    \StrSubstitute{\currentobject}{:}{_}[\objectlabel]
    \StrSubstitute{\currentsubject}{:}{_}[\subjectlabel]
    \graphout{\objectlabel [shape="rectangle",texlbl="\GetProperty{\currentobject}{#2}"]}
    \graphout{\subjectlabel [shape="rectangle",texlbl="\GetProperty{\currentsubject}{#2}"]}
    \graphout{\objectlabel-> \subjectlabel} %
  }
  \graphout{\@charrb}% save footer
  \immediate\closeout\graphwrite%
  \ShellEscape{dot2tex --figonly --autosize -t raw -o #1.tmp #1.dot }%
  \InputIfFileExists{#1.tmp}{}%
}
\makeatother

\begin{document}

% we need to declare some properties for the eq: prefix 
\AddRdfType{eq}{
  \AddPropertyEx{rdf:type}{eq:equation}
  \AddPropertyEx{doc:pageNo}{\thepage}
  % this will be used in the graph label, change to your liking
  \AddPropertyEx{rdfs:label}{Equation \theequation}
}

\makeatletter
\AddRdfType{sec}{
  \AddPropertyEx{rdf:type}{sec:sectioning}
  \AddPropertyEx{doc:pageNo}{\thepage}
  % this will be used in the graph label, change to your liking
  \AddPropertyEx{rdfs:label}{Section \@currentlabel}
}
\makeatother

\renewenvironment{proof}[1][\proofname]{{\bfseries Proof of #1.}}{\qed}.
\section{Proof of an important proposition}
\rdflabel{sec:first}

\begin{rdfequation}[eq:wave:1]
  \begin{aligned}
%    \label{eq:wave:1}
    &\partial_t^2 u+2\varkappa \partial_t u -\Delta u=\mathord{e^{-\varkappa t}} a(t,x)(1+u)^3\\ 
%    \label{eq:wave:2}
    & (u(0,x),\partial_t u(0,x))=(f(x),g(x)).
  \end{aligned}
\end{rdfequation}

\begin{thm}[Local existence]
  \rdflabel{thr:section3-fourier:1}
  Let $m>\frac{5}{2}$,
  $a(t,\cdot)\in L^\infty([0,\infty); H^m(\setT^3)$,
  $ f\in H^{m+1}(\setT^3)$ and $ g\in H^{m}(\setT^3)$, then there exists a positive
  $T$ and a unique solution $u$ to the Cauchy problem
  \cref{eq:wave:1}--\cref{eq:wave:2} such that
  \begin{equation*}
    u\in L^\infty([0,T]; H^{m+1}(\setT^3)\cap    C^{0,1}([0,T]; H^{m}(\setT^3), 
  \end{equation*}
  where $C^{0,1}$ is a Lipschitz continuous function.
\end{thm}

\begin{prop}[A Nonlinear estimate]
\rdflabel{prop:1}
 Let $m>\frac{3}{2}$ and  $a  \in  H^{m}$, then there is a universal constant 
$C(A)$, depending just on the constants of multiplications and embedding, such 
that 
 \begin{equation}
   \label{eq:estimate:3}
   \left\|a(1+u)^3 \right\|_{H^{m}}, \left\|a(1+u)^3 \right\|_{L^\infty}\leq C(A) \|a\|_{H^{m}} 
 \end{equation}
for all $u\in H^m$ with $\|u\|_{H^m}\leq A$.

\end{prop}

\begin{rdfequation}[eq:energy:1]
%  \rdflabel{eq:energy:1}
  E(t)\eqdef \langle V(t),V(t)\rangle_m=\|\partial_t   u_h+\varkappa u_h\|_{H^m}^2+\|\partial_x u_h\|_{ H^m}^2.
\end{rdfequation}
\begin{rdfequation}[eq:Gronwall:2]
  \rdflabel{eq:Gronwall:2}
  \begin{split}
    \sqrt{E(t)} & \leq e^{-\varkappa(t-t_0)}\sqrt{E(t_0)} +
    \varkappa^2\int_{t_0}^te^{-\varkappa(t-s)} \left\Vert u_h(s) \right\Vert_{H^{m}}ds
    \\ & + \int_{t_0}^te^{-\varkappa (t-s)}e^{-\varkappa s} \left\Vert
      a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m}ds
  \end{split}.
\end{rdfequation}

\begin{prop}[Estimate for the gradient]
  \rdflabel{prop:9}
  Let
  $ \partial_x u=(\partial_1 u,\partial_2u,\partial_3 u)^{\intercal}$ and
  $u\in \mathbullet H^{m+1}$ and $m\geq0$ be an integer. 
  Then the following holds
  \begin{equation*}
    \rdflabel{eq:norm:36}
    \left\|{u}\right\|_{\mathbullet H^{m+1}}=\|\partial_x u\|_{\mathbullet H^{m}}.
  \end{equation*}

\end{prop}

\begin{subequations}
  \begin{align}
    \rdflabel{eq:section4-sh12}
    & \widehat{u}_0^{\prime\prime} + 2\varkappa \widehat{u}_0^{\prime} = 
      e^{-\varkappa  t}\widehat F_0 \\
    \rdflabel{eq:section4-sh32}
    &  \partial_t^2 u_h +2\varkappa \partial_t u_h -\Delta u_h     = 
      \mathord{e^{-\varkappa t}} \left( a(t,x)(1+u)^3 -\widehat{F}_{0} \right),
  \end{align}
\end{subequations}
\begin{equation}
 \rdflabel{eq:section5-sh:33}
\left\{\begin{array}{ll}
         u(x,0)=f(x), & \partial_t u(x,0)=g(x),\\
         f\in \mathbullet H^{m+1}, & g\in \mathbullet H^m.
       \end{array}\right.
\end{equation} 

\begin{prop}[A priori estimates]
  \rdflabel{prop:2}
  Let $ 0<\varkappa<1$, $1<\beta<\frac{1}{\varkappa}$ and set $\alpha= \|V(0)\|_{H^m}$.
  Assume the  solution $u=\widehat u_0+u_h$ to 
  \cref{eq:section4-sh12}--\cref{eq:section4-sh32} with initial data
  \cref{eq:section5-sh:33} exists for $t\in [0,T]$. 
  If $\mathord{\left\|{a(t,\cdot)}\right\|_{ H^m}}$ is sufficiently small,
  then there exists a $T^{+}$, $0<T^{+}\leq T$, such that
  \begin{equation}
    \rdflabel{eq:section4-sh:2}
    \sup_{[0,T^{+}]}\mathord{\left\|{u(t)}\right\|_{ H^m}}\leq \alpha\beta
  \end{equation}
  and
  \begin{rdfequation}[eq:section4-sh:1]
%    \rdflabel{eq:section4-sh:1}
    E(T^{+})\leq E(0).
  \end{rdfequation}
\end{prop}

\section{Proof}
\rdflabel{sec:proof}

\begin{proof}[~\autoref{prop:2}]
  We start with the proof of inequality \autoref{eq:section4-sh:2}. 
  Recall that although we have written $\alpha= \|V(0)\|_{H^m}$, the initial
  data are in the homogeneous Sobolev space and therefore by
   \Cref{prop:9} and \cref{eq:energy:1}, we obtain
  \begin{equation}
    \|u(0)\|_{H^{m+1}}=\|f\|_{H^{m+1}}=\|\partial_x f\|_{H^{m}}\leq 
    \|V(0)\|_{H^m}=\alpha.
  \end{equation}
  Hence, since $ \beta > 0$, it follows from the existence 
  \Cref{thr:section3-fourier:1} and the continuity property of the
  corresponding solutions, that there exists $0<T^+\leq T$ such that
  \begin{equation}
    \rdflabel{eq:section4-sh4}
    \sup_{[0,T^+]}\| u(t)\|_{ H^m}\leq \alpha\beta.
  \end{equation}
  We now turn to inequality \cref{eq:section4-sh:1}.
  For $t\in [0,T^+]$ we observe, using inequality \rdfref{eq:Gronwall:2}
  that
  \begin{equation}
    \label{eq:Gronwall:1}
    \begin{split}
      \sqrt{E(t)} & \leq e^{-\varkappa t}\sqrt{E(0)} + \varkappa^2\int_{0}^te^{-\varkappa (t-s)} \alpha\beta ds + \int_{0}^te^{-\varkappa (t-s)}e^{-\varkappa s} \left\Vert a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m} ds\\% 
      & \leq e^{-\varkappa t}\sqrt{E(0)} +\varkappa \left(1 -e^{-\varkappa t}\right)\alpha\beta+ te^{-\varkappa t}\sup_{[0,t]}\left\Vert a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m}.
    \end{split}
  \end{equation}
  A simple algebraic manipulation shows us that, $E(t)\leq E(0)$, if
  \begin{equation}
    \varkappa \left(e^{\varkappa t}-1\right)\alpha\beta+ t\sup_{[0,t]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq \left(e^{\varkappa t}-1\right)\sqrt{E(0)},
  \end{equation}
  or equivalently
  \begin{rdfequation}[eq:section4-sh:7]
%    \label{eq:section4-sh:7}
    t\sup_{[0,t]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq \left(e^{\varkappa t}-1\right)\alpha\left(\beta-\varkappa\right).
  \end{rdfequation}
  Since for $s\in [0,T^+]$, we can conclude that
  $\|u(s)\|_{H^m}\leq \alpha\beta\leq 2\alpha \beta$, we can apply
   \Cref{prop:1} with $A=2\alpha \beta$, that results in
  \begin{rdfequation}[eq:energy:3]
%    \rdflabel{eq:energy:3}
    \left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq C(2\alpha\beta)\|a(s,\cdot)\|_{H^m}.
  \end{rdfequation}
  We now set
  \begin{rdfequation}[eq:energy:4]
%    \rdflabel{eq:energy:4}
    \epsilon_0=\frac{\varkappa\alpha(\beta-\varkappa)}{C(2\alpha\beta)}.
  \end{rdfequation}
  Since $\beta-\varkappa>0$, $\epsilon_0>0$, therefore we can demand the smallness
  condition
  \begin{rdfequation}[eq:energy:5]
%    \rdflabel{eq:energy:5}
    \sup_{[0,\infty)}\|a(t,\cdot)\|_{H^m}\leq \epsilon_0.
  \end{rdfequation}
  We now let $t=T^+$ in inequality \rdfref{eq:section4-sh:7}, then by
  inequality \rdfref{eq:energy:3}, condition \rdfref{eq:energy:5}, with
  \rdfref{eq:energy:4} in section~\rdfpageref{sec:first}., we conclude that
  \begin{rdfequation}[eq:section4-sh3]
%    \label{eq:section4-sh3}
    \begin{split}
      T^+\sup_{[0,T^+]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m} &
      \leq T^+ C(2\alpha\beta)\sup_{[0,T^+]}\|a(s,\cdot)\|_{H^m}\leq T^+
      C(2\alpha\beta)\epsilon_0 \\ & = \varkappa T^+\alpha(\beta-\varkappa)\leq (e^{\varkappa
        T^+}-1)\alpha(\beta-\varkappa),
    \end{split}
  \end{rdfequation}
  holds and consequently \autoref{eq:section4-sh3} implies inequality 
  \autoref{eq:section4-sh:7}.
  This proves \cref{eq:section4-sh:1} and completes the proof of the
  proposition. 
  In the last step, we used the elementary inequality $x\leq e^{x}-1$.
\end{proof}

%\RdfLoopReferences{}{eq:equation,sec:sectioning}{%
\RdfLoopReferences{}{eq:equation,sec:sectioning}{%
  \GetProperty{\currentobject}{rdfs:label} -> \GetProperty{\currentsubject}{rdfs:label}, %
}

\RdfDrawGraph[\jobname-graph][eq:value]{}{eq:equation}

\end{document}

However, lualatex --shell-escape --output-dir="build/" a-priori.tex or lualatex --shell-escape a-priori.tex compiles without a problem, but no graph is generated.

What do I miss?

michal-h21 commented 1 week ago

There are two issues:

\documentclass[12pt,landscape]{article}
\usepackage{amssymb,amsfonts,amsmath,amsthm}
\usepackage{accents}

\newcommand{\setT}{{\mathord{\mathbb T}}}
\makeatletter
\newcommand{\sbullet}{%
  \hbox{\fontfamily{lmr}\fontsize{.4\dimexpr(\f@size 
pt)}{0}\selectfont\textbullet}}
\DeclareRobustCommand{\mathbullet}{\accentset{\sbullet}}
\makeatother
\newcommand{\eqdef}{\overset{\mbox{\tiny{def}}}{=}}

\usepackage{thmtools}
\newtheorem{thm}{Theorem}
\newtheorem{defn}{Definition}
\newtheorem{lem}{Lemma}
\newtheorem{cor}{Corollary}

\newtheorem{prop}{Proposition}
\newtheorem{rem}{Remark}
\theoremstyle{definition}
\usepackage{xr-hyper}
\usepackage[colorlinks]{hyperref}
\externaldocument[A-]{nordstroem-jee}
\usepackage{cleveref}
% \usepackage{cleveref-nameref}
% \usepackage{cleveref-fix}

\Crefname{defn}{Definition}{Definitions}
\crefname{thm}{Theorem}{Theorems}
\Crefname{lem}{Lemma}{Lemmas}
\Crefname{prop}{Proposition}{Propositions}
\crefname{prop}{Proposition}{Propositions}
\crefname{cor}{Corollary}{Corollaries}
\Crefname{cor}{Corollary}{Corollaries}
\crefname{rem}{Remark}{Remarks}
\Crefname{rem}{Remark}{Remarks}

\usepackage{tikz}
\usepackage{shellesc}
\usetikzlibrary{graphs,graphdrawing,calc} 
\usegdlibrary{layered}
\usepackage[T1]{fontenc}
\usepackage{rdfref}
\robustify\int
\NewDocumentEnvironment{rdfequation}{o +b}{
  \begin{equation}
    #2 
    \IfBlankF{#1}{
      \rdflabel{#1}
      \AssignProperty{#1}{eq:value}{$#2$}
    }
  \end{equation}
}{}

\newwrite\graphwrite

\makeatletter
\ExplSyntaxOn
\newcommand\graphout[1]{\protected@write\graphwrite{\let\owrite\write\def\write{\immediate\owrite}}{#1}}

% #1 name of the graph (default \jobname-graph) -- it needs to be different than name of any existing file!
% #2 RDF property to be printed
% #3 list of allowed rdf:type for objects
% #4 list of allowed rdf:type for subjects
% don't forget to call latex with --shell-escape 
\NewDocumentCommand\RdfDrawGraph{O{\jobname-graph} O{rdfs:label} m m}{%
  \immediate\openout\graphwrite=#1.dot\relax%
  \graphout{digraph hello\@charlb} % save graph header
  \RdfLoopReferences{#3}{#4}{%
    \edef\objectlabel{\currentobject}%
    \edef\subjectlabel{\currentsubject}%
    \regex_replace_all:nnN{[:\-]}{_}\objectlabel%
    \regex_replace_all:nnN{[:\-]}{_}\subjectlabel%
    \graphout{\objectlabel [shape="rectangle",texlbl="\GetProperty{\currentobject}{#2}"]}
    \graphout{\subjectlabel [shape="rectangle",texlbl="\GetProperty{\currentsubject}{#2}"]}
    \graphout{\objectlabel~->~\subjectlabel} %
  }
  \graphout{\@charrb}% save footer
  \immediate\closeout\graphwrite%
  \ShellEscape{dot2tex~--figonly~--autosize~-t~raw~-o~#1.tmp~#1.dot }%
  \InputIfFileExists{#1.tmp}{}%
}
\ExplSyntaxOff
\makeatother

\begin{document}

% we need to declare some properties for the eq: prefix 
\AddRdfType{eq}{
  \AddPropertyEx{rdf:type}{eq:equation}
  \AddPropertyEx{doc:pageNo}{\thepage}
  % this will be used in the graph label, change to your liking
  \AddPropertyEx{rdfs:label}{Equation \theequation}
}

\makeatletter
\AddRdfType{sec}{
  \AddPropertyEx{rdf:type}{sec:sectioning}
  \AddPropertyEx{doc:pageNo}{\thepage}
  % this will be used in the graph label, change to your liking
  \AddPropertyEx{rdfs:label}{Section \@currentlabel}
}
\makeatother

\renewenvironment{proof}[1][\proofname]{{\bfseries Proof of #1.}}{\qed}.
\section{Proof of an important proposition}
\rdflabel{sec:first}

\begin{rdfequation}[eq:wave:1]
  \begin{aligned}
%    \label{eq:wave:1}
    &\partial_t^2 u+2\varkappa \partial_t u -\Delta u=\mathord{e^{-\varkappa t}} a(t,x)(1+u)^3\\ 
%    \label{eq:wave:2}
    & (u(0,x),\partial_t u(0,x))=(f(x),g(x)).
  \end{aligned}
\end{rdfequation}

\begin{thm}[Local existence]
  \rdflabel{thr:section3-fourier:1}
  Let $m>\frac{5}{2}$,
  $a(t,\cdot)\in L^\infty([0,\infty); H^m(\setT^3)$,
  $ f\in H^{m+1}(\setT^3)$ and $ g\in H^{m}(\setT^3)$, then there exists a positive
  $T$ and a unique solution $u$ to the Cauchy problem
  \cref{eq:wave:1}--\cref{eq:wave:2} such that
  \begin{equation*}
    u\in L^\infty([0,T]; H^{m+1}(\setT^3)\cap    C^{0,1}([0,T]; H^{m}(\setT^3), 
  \end{equation*}
  where $C^{0,1}$ is a Lipschitz continuous function.
\end{thm}

\begin{prop}[A Nonlinear estimate]
\rdflabel{prop:1}
 Let $m>\frac{3}{2}$ and  $a  \in  H^{m}$, then there is a universal constant 
$C(A)$, depending just on the constants of multiplications and embedding, such 
that 
 \begin{equation}
   \label{eq:estimate:3}
   \left\|a(1+u)^3 \right\|_{H^{m}}, \left\|a(1+u)^3 \right\|_{L^\infty}\leq C(A) \|a\|_{H^{m}} 
 \end{equation}
for all $u\in H^m$ with $\|u\|_{H^m}\leq A$.

\end{prop}

\begin{rdfequation}[eq:energy:1]
%  \rdflabel{eq:energy:1}
  E(t)\eqdef \langle V(t),V(t)\rangle_m=\|\partial_t   u_h+\varkappa u_h\|_{H^m}^2+\|\partial_x u_h\|_{ H^m}^2.
\end{rdfequation}
\begin{rdfequation}[eq:Gronwall:2]
  \rdflabel{eq:Gronwall:2}
  \begin{split}
    \sqrt{E(t)} & \leq e^{-\varkappa(t-t_0)}\sqrt{E(t_0)} +
    \varkappa^2\int_{t_0}^te^{-\varkappa(t-s)} \left\Vert u_h(s) \right\Vert_{H^{m}}ds
    \\ & + \int_{t_0}^te^{-\varkappa (t-s)}e^{-\varkappa s} \left\Vert
      a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m}ds
  \end{split}.
\end{rdfequation}

\begin{prop}[Estimate for the gradient]
  \rdflabel{prop:9}
  Let
  $ \partial_x u=(\partial_1 u,\partial_2u,\partial_3 u)^{\intercal}$ and
  $u\in \mathbullet H^{m+1}$ and $m\geq0$ be an integer. 
  Then the following holds
  \begin{equation*}
    \rdflabel{eq:norm:36}
    \left\|{u}\right\|_{\mathbullet H^{m+1}}=\|\partial_x u\|_{\mathbullet H^{m}}.
  \end{equation*}

\end{prop}

\begin{subequations}
  \begin{align}
    \rdflabel{eq:section4-sh12}
    & \widehat{u}_0^{\prime\prime} + 2\varkappa \widehat{u}_0^{\prime} = 
      e^{-\varkappa  t}\widehat F_0 \\
    \rdflabel{eq:section4-sh32}
    &  \partial_t^2 u_h +2\varkappa \partial_t u_h -\Delta u_h     = 
      \mathord{e^{-\varkappa t}} \left( a(t,x)(1+u)^3 -\widehat{F}_{0} \right),
  \end{align}
\end{subequations}
\begin{equation}
 \rdflabel{eq:section5-sh:33}
\left\{\begin{array}{ll}
         u(x,0)=f(x), & \partial_t u(x,0)=g(x),\\
         f\in \mathbullet H^{m+1}, & g\in \mathbullet H^m.
       \end{array}\right.
\end{equation} 

\begin{prop}[A priori estimates]
  \rdflabel{prop:2}
  Let $ 0<\varkappa<1$, $1<\beta<\frac{1}{\varkappa}$ and set $\alpha= \|V(0)\|_{H^m}$.
  Assume the  solution $u=\widehat u_0+u_h$ to 
  \cref{eq:section4-sh12}--\cref{eq:section4-sh32} with initial data
  \cref{eq:section5-sh:33} exists for $t\in [0,T]$. 
  If $\mathord{\left\|{a(t,\cdot)}\right\|_{ H^m}}$ is sufficiently small,
  then there exists a $T^{+}$, $0<T^{+}\leq T$, such that
  \begin{equation}
    \rdflabel{eq:section4-sh:2}
    \sup_{[0,T^{+}]}\mathord{\left\|{u(t)}\right\|_{ H^m}}\leq \alpha\beta
  \end{equation}
  and
  \begin{rdfequation}[eq:section4-sh:1]
%    \rdflabel{eq:section4-sh:1}
    E(T^{+})\leq E(0).
  \end{rdfequation}
\end{prop}

\section{Proof}
\rdflabel{sec:proof}

\begin{proof}[~\autoref{prop:2}]
  We start with the proof of inequality \autoref{eq:section4-sh:2}. 
  Recall that although we have written $\alpha= \|V(0)\|_{H^m}$, the initial
  data are in the homogeneous Sobolev space and therefore by
   \Cref{prop:9} and \cref{eq:energy:1}, we obtain
  \begin{equation}
    \|u(0)\|_{H^{m+1}}=\|f\|_{H^{m+1}}=\|\partial_x f\|_{H^{m}}\leq 
    \|V(0)\|_{H^m}=\alpha.
  \end{equation}
  Hence, since $ \beta > 0$, it follows from the existence 
  \Cref{thr:section3-fourier:1} and the continuity property of the
  corresponding solutions, that there exists $0<T^+\leq T$ such that
  \begin{rdfequation}
    \rdflabel{eq:section4-sh4}
    \sup_{[0,T^+]}\| u(t)\|_{ H^m}\leq \alpha\beta.
  \end{rdfequation}
  We now turn to inequality \cref{eq:section4-sh:1}.
  For $t\in [0,T^+]$ we observe, using inequality \rdfref{eq:Gronwall:2}
  that
  \begin{equation}
    \label{eq:Gronwall:1}
    \begin{split}
      \sqrt{E(t)} & \leq e^{-\varkappa t}\sqrt{E(0)} + \varkappa^2\int_{0}^te^{-\varkappa (t-s)} \alpha\beta ds + \int_{0}^te^{-\varkappa (t-s)}e^{-\varkappa s} \left\Vert a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m} ds\\% 
      & \leq e^{-\varkappa t}\sqrt{E(0)} +\varkappa \left(1 -e^{-\varkappa t}\right)\alpha\beta+ te^{-\varkappa t}\sup_{[0,t]}\left\Vert a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m}.
    \end{split}
  \end{equation}
  A simple algebraic manipulation shows us that, $E(t)\leq E(0)$, if
  \begin{equation}
    \varkappa \left(e^{\varkappa t}-1\right)\alpha\beta+ t\sup_{[0,t]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq \left(e^{\varkappa t}-1\right)\sqrt{E(0)},
  \end{equation}
  or equivalently
  \begin{rdfequation}[eq:section4-sh:7]
%    \label{eq:section4-sh:7}
    t\sup_{[0,t]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq \left(e^{\varkappa t}-1\right)\alpha\left(\beta-\varkappa\right).
  \end{rdfequation}
  Since for $s\in [0,T^+]$, we can conclude that
  $\|u(s)\|_{H^m}\leq \alpha\beta\leq 2\alpha \beta$, we can apply
   \Cref{prop:1} with $A=2\alpha \beta$, that results in
  \begin{rdfequation}[eq:energy:3]
%    \rdflabel{eq:energy:3}
    \left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq C(2\alpha\beta)\|a(s,\cdot)\|_{H^m}.
  \end{rdfequation}
  We now set
  \begin{rdfequation}[eq:energy:4]
%    \rdflabel{eq:energy:4}
    \epsilon_0=\frac{\varkappa\alpha(\beta-\varkappa)}{C(2\alpha\beta)}.
  \end{rdfequation}
  Since $\beta-\varkappa>0$, $\epsilon_0>0$, therefore we can demand the smallness
  condition
  \begin{rdfequation}[eq:energy:5]
%    \rdflabel{eq:energy:5}
    \sup_{[0,\infty)}\|a(t,\cdot)\|_{H^m}\leq \epsilon_0.
  \end{rdfequation}
  We now let $t=T^+$ in inequality \rdfref{eq:section4-sh:7}, then by
  inequality \rdfref{eq:energy:3}, condition \rdfref{eq:energy:5}, with
  \rdfref{eq:energy:4} in section~\rdfpageref{sec:first}., we conclude that
  \begin{rdfequation}[eq:section4-sh3]
%    \label{eq:section4-sh3}
    \begin{split}
      T^+\sup_{[0,T^+]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m} &
      \leq T^+ C(2\alpha\beta)\sup_{[0,T^+]}\|a(s,\cdot)\|_{H^m}\leq T^+
      C(2\alpha\beta)\epsilon_0 \\ & = \varkappa T^+\alpha(\beta-\varkappa)\leq (e^{\varkappa
        T^+}-1)\alpha(\beta-\varkappa),
    \end{split}
  \end{rdfequation}
  holds and consequently \autoref{eq:section4-sh3} implies inequality 
  \autoref{eq:section4-sh:7}.
  This proves \cref{eq:section4-sh:1} and completes the proof of the
  proposition. 
  In the last step, we used the elementary inequality $x\leq e^{x}-1$.
\end{proof}

%\RdfLoopReferences{}{eq:equation,sec:sectioning}{%
\RdfLoopReferences{}{eq:equation,sec:sectioning}{%
  \GetProperty{\currentobject}{rdfs:label} -> \GetProperty{\currentsubject}{rdfs:label}, %
}

\RdfDrawGraph[\jobname-graph][eq:value]{}{eq:equation}

\end{document}
ouboub commented 6 days ago
  • eq:section4-sh4 is equation and not rdfequation
  • this version of \RdfDrawGraph has issues with labels that contain -. In fact, Graphviz has a problem, but we need to remove them. So here is the fixed version:

Hi, thanks very much I tested it and it worked. However I also wanted to use your solution concerning of redefining the equation environment, by

\newcommand\renewrdfenvironment[1]{% 
  \expandafter\let\csname orig:#1\expandafter\endcsname\csname#1\endcsname%
  \expandafter\let\csname endorig:#1\expandafter\endcsname\csname end#1\endcsname%
  \RenewDocumentEnvironment{#1}{o +b}{
  \begin{orig:#1}%
    ##2%
    \IfBlankF{##1}{%
      \rdflabel{##1}%
      \AddTriple{##1}{eq:value}{$##2$}%
    }
  \end{orig:#1}%
}{}%
}

\renewrdfenvironment{equation}

so I added this definition to your proposed solution, resulting in

\documentclass[12pt,landscape]{article}
\usepackage{amssymb,amsfonts,amsmath,amsthm}
\usepackage{accents}

\newcommand{\setT}{{\mathord{\mathbb T}}}
\makeatletter
\newcommand{\sbullet}{%
  \hbox{\fontfamily{lmr}\fontsize{.4\dimexpr(\f@size 
pt)}{0}\selectfont\textbullet}}
\DeclareRobustCommand{\mathbullet}{\accentset{\sbullet}}
\makeatother
\newcommand{\eqdef}{\overset{\mbox{\tiny{def}}}{=}}

\usepackage{thmtools}
\newtheorem{thm}{Theorem}
\newtheorem{defn}{Definition}
\newtheorem{lem}{Lemma}
\newtheorem{cor}{Corollary}

\newtheorem{prop}{Proposition}
\newtheorem{rem}{Remark}
\theoremstyle{definition}
\usepackage{xr-hyper}
\usepackage[colorlinks]{hyperref}
\externaldocument[A-]{nordstroem-jee}
\usepackage{cleveref}
% \usepackage{cleveref-nameref}
% \usepackage{cleveref-fix}

\Crefname{defn}{Definition}{Definitions}
\crefname{thm}{Theorem}{Theorems}
\Crefname{lem}{Lemma}{Lemmas}
\Crefname{prop}{Proposition}{Propositions}
\crefname{prop}{Proposition}{Propositions}
\crefname{cor}{Corollary}{Corollaries}
\Crefname{cor}{Corollary}{Corollaries}
\crefname{rem}{Remark}{Remarks}
\Crefname{rem}{Remark}{Remarks}

\usepackage{tikz}
\usepackage{shellesc}
\usetikzlibrary{graphs,graphdrawing,calc} 
\usegdlibrary{layered}
\usepackage[T1]{fontenc}
\usepackage{rdfref}
\robustify\int
\NewDocumentEnvironment{rdfequation}{o +b}{
  \begin{equation}
    #2 
    \IfBlankF{#1}{
      \rdflabel{#1}
      \AssignProperty{#1}{eq:value}{$#2$}
    }
  \end{equation}
}{}

\newwrite\graphwrite

\makeatletter
\ExplSyntaxOn
\newcommand\graphout[1]{\protected@write\graphwrite{\let\owrite\write\def\write{\immediate\owrite}}{#1}}

% #1 name of the graph (default \jobname-graph) -- it needs to be different than name of any existing file!
% #2 RDF property to be printed
% #3 list of allowed rdf:type for objects
% #4 list of allowed rdf:type for subjects
% don't forget to call latex with --shell-escape 
\NewDocumentCommand\RdfDrawGraph{O{\jobname-graph} O{rdfs:label} m m}{%
  \immediate\openout\graphwrite=#1.dot\relax%
  \graphout{digraph hello\@charlb} % save graph header
  \RdfLoopReferences{#3}{#4}{%
    \edef\objectlabel{\currentobject}%
    \edef\subjectlabel{\currentsubject}%
    \regex_replace_all:nnN{[:\-]}{_}\objectlabel%
    \regex_replace_all:nnN{[:\-]}{_}\subjectlabel%
    \graphout{\objectlabel [shape="rectangle",texlbl="\GetProperty{\currentobject}{#2}"]}
    \graphout{\subjectlabel [shape="rectangle",texlbl="\GetProperty{\currentsubject}{#2}"]}
    \graphout{\objectlabel~->~\subjectlabel} %
  }
  \graphout{\@charrb}% save footer
  \immediate\closeout\graphwrite%
  \ShellEscape{dot2tex~--figonly~--autosize~-t~raw~-o~#1.tmp~#1.dot }%
  \InputIfFileExists{#1.tmp}{}%
}
\ExplSyntaxOff
\makeatother
\newcommand\renewrdfenvironment[1]{% 
  \expandafter\let\csname orig:#1\expandafter\endcsname\csname#1\endcsname%
  \expandafter\let\csname endorig:#1\expandafter\endcsname\csname end#1\endcsname%
  \RenewDocumentEnvironment{#1}{o +b}{
  \begin{orig:#1}%
    ##2%
    \IfBlankF{##1}{%
      \rdflabel{##1}%
      \AddTriple{##1}{eq:value}{$##2$}%
    }
  \end{orig:#1}%
}{}%
}

\renewrdfenvironment{equation}

\begin{document}

% we need to declare some properties for the eq: prefix 
\AddRdfType{eq}{
  \AddPropertyEx{rdf:type}{eq:equation}
  \AddPropertyEx{doc:pageNo}{\thepage}
  % this will be used in the graph label, change to your liking
  \AddPropertyEx{rdfs:label}{Equation \theequation}
}

\makeatletter
\AddRdfType{sec}{
  \AddPropertyEx{rdf:type}{sec:sectioning}
  \AddPropertyEx{doc:pageNo}{\thepage}
  % this will be used in the graph label, change to your liking
  \AddPropertyEx{rdfs:label}{Section \@currentlabel}
}
\makeatother

\renewenvironment{proof}[1][\proofname]{{\bfseries Proof of #1.}}{\qed}.
\section{Proof of an important proposition}
\rdflabel{sec:first}

\begin{equation}[eq:wave:1]
  \begin{aligned}
%    \label{eq:wave:1}
    &\partial_t^2 u+2\varkappa \partial_t u -\Delta u=\mathord{e^{-\varkappa t}} a(t,x)(1+u)^3\\ 
%    \label{eq:wave:2}
    & (u(0,x),\partial_t u(0,x))=(f(x),g(x)).
  \end{aligned}
\end{equation}

\begin{thm}[Local existence]
  \rdflabel{thr:section3-fourier:1}
  Let $m>\frac{5}{2}$,
  $a(t,\cdot)\in L^\infty([0,\infty); H^m(\setT^3)$,
  $ f\in H^{m+1}(\setT^3)$ and $ g\in H^{m}(\setT^3)$, then there exists a positive
  $T$ and a unique solution $u$ to the Cauchy problem
  \cref{eq:wave:1}--\cref{eq:wave:2} such that
  \begin{equation*}
    u\in L^\infty([0,T]; H^{m+1}(\setT^3)\cap    C^{0,1}([0,T]; H^{m}(\setT^3), 
  \end{equation*}
  where $C^{0,1}$ is a Lipschitz continuous function.
\end{thm}

\begin{prop}[A Nonlinear estimate]
\rdflabel{prop:1}
 Let $m>\frac{3}{2}$ and  $a  \in  H^{m}$, then there is a universal constant 
$C(A)$, depending just on the constants of multiplications and embedding, such 
that 
 \begin{equation}
   \label{eq:estimate:3}
   \left\|a(1+u)^3 \right\|_{H^{m}}, \left\|a(1+u)^3 \right\|_{L^\infty}\leq C(A) \|a\|_{H^{m}} 
 \end{equation}
for all $u\in H^m$ with $\|u\|_{H^m}\leq A$.

\end{prop}

\begin{equation}[eq:energy:1]
%  \rdflabel{eq:energy:1}
  E(t)\eqdef \langle V(t),V(t)\rangle_m=\|\partial_t   u_h+\varkappa u_h\|_{H^m}^2+\|\partial_x u_h\|_{ H^m}^2.
\end{equation}
\begin{equation}[eq:Gronwall:2]
  \rdflabel{eq:Gronwall:2}
  \begin{split}
    \sqrt{E(t)} & \leq e^{-\varkappa(t-t_0)}\sqrt{E(t_0)} +
    \varkappa^2\int_{t_0}^te^{-\varkappa(t-s)} \left\Vert u_h(s) \right\Vert_{H^{m}}ds
    \\ & + \int_{t_0}^te^{-\varkappa (t-s)}e^{-\varkappa s} \left\Vert
      a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m}ds
  \end{split}.
\end{equation}

\begin{prop}[Estimate for the gradient]
  \rdflabel{prop:9}
  Let
  $ \partial_x u=(\partial_1 u,\partial_2u,\partial_3 u)^{\intercal}$ and
  $u\in \mathbullet H^{m+1}$ and $m\geq0$ be an integer. 
  Then the following holds
  \begin{equation*}
    \rdflabel{eq:norm:36}
    \left\|{u}\right\|_{\mathbullet H^{m+1}}=\|\partial_x u\|_{\mathbullet H^{m}}.
  \end{equation*}

\end{prop}

\begin{subequations}
  \begin{align}
    \rdflabel{eq:section4-sh12}
    & \widehat{u}_0^{\prime\prime} + 2\varkappa \widehat{u}_0^{\prime} = 
      e^{-\varkappa  t}\widehat F_0 \\
    \rdflabel{eq:section4-sh32}
    &  \partial_t^2 u_h +2\varkappa \partial_t u_h -\Delta u_h     = 
      \mathord{e^{-\varkappa t}} \left( a(t,x)(1+u)^3 -\widehat{F}_{0} \right),
  \end{align}
\end{subequations}
\begin{equation}
 \rdflabel{eq:section5-sh:33}
\left\{\begin{array}{ll}
         u(x,0)=f(x), & \partial_t u(x,0)=g(x),\\
         f\in \mathbullet H^{m+1}, & g\in \mathbullet H^m.
       \end{array}\right.
\end{equation} 

\begin{prop}[A priori estimates]
  \rdflabel{prop:2}
  Let $ 0<\varkappa<1$, $1<\beta<\frac{1}{\varkappa}$ and set $\alpha= \|V(0)\|_{H^m}$.
  Assume the  solution $u=\widehat u_0+u_h$ to 
  \cref{eq:section4-sh12}--\cref{eq:section4-sh32} with initial data
  \cref{eq:section5-sh:33} exists for $t\in [0,T]$. 
  If $\mathord{\left\|{a(t,\cdot)}\right\|_{ H^m}}$ is sufficiently small,
  then there exists a $T^{+}$, $0<T^{+}\leq T$, such that
  \begin{equation}
    \rdflabel{eq:section4-sh:2}
    \sup_{[0,T^{+}]}\mathord{\left\|{u(t)}\right\|_{ H^m}}\leq \alpha\beta
  \end{equation}
  and
  \begin{equation}[eq:section4-sh:1]
%    \rdflabel{eq:section4-sh:1}
    E(T^{+})\leq E(0).
  \end{equation}
\end{prop}

\section{Proof}
\rdflabel{sec:proof}

\begin{proof}[~\autoref{prop:2}]
  We start with the proof of inequality \autoref{eq:section4-sh:2}. 
  Recall that although we have written $\alpha= \|V(0)\|_{H^m}$, the initial
  data are in the homogeneous Sobolev space and therefore by
   \Cref{prop:9} and \cref{eq:energy:1}, we obtain
  \begin{equation}
    \|u(0)\|_{H^{m+1}}=\|f\|_{H^{m+1}}=\|\partial_x f\|_{H^{m}}\leq 
    \|V(0)\|_{H^m}=\alpha.
  \end{equation}
  Hence, since $ \beta > 0$, it follows from the existence 
  \Cref{thr:section3-fourier:1} and the continuity property of the
  corresponding solutions, that there exists $0<T^+\leq T$ such that
  \begin{equation}
    \rdflabel{eq:section4-sh4}
    \sup_{[0,T^+]}\| u(t)\|_{ H^m}\leq \alpha\beta.
  \end{equation}
  We now turn to inequality \cref{eq:section4-sh:1}.
  For $t\in [0,T^+]$ we observe, using inequality \rdfref{eq:Gronwall:2}
  that
  \begin{equation}
    \label{eq:Gronwall:1}
    \begin{split}
      \sqrt{E(t)} & \leq e^{-\varkappa t}\sqrt{E(0)} + \varkappa^2\int_{0}^te^{-\varkappa (t-s)} \alpha\beta ds + \int_{0}^te^{-\varkappa (t-s)}e^{-\varkappa s} \left\Vert a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m} ds\\% 
      & \leq e^{-\varkappa t}\sqrt{E(0)} +\varkappa \left(1 -e^{-\varkappa t}\right)\alpha\beta+ te^{-\varkappa t}\sup_{[0,t]}\left\Vert a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m}.
    \end{split}
  \end{equation}
  A simple algebraic manipulation shows us that, $E(t)\leq E(0)$, if
  \begin{equation}
    \varkappa \left(e^{\varkappa t}-1\right)\alpha\beta+ t\sup_{[0,t]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq \left(e^{\varkappa t}-1\right)\sqrt{E(0)},
  \end{equation}
  or equivalently
  \begin{equation}[eq:section4-sh:7]
%    \label{eq:section4-sh:7}
    t\sup_{[0,t]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq \left(e^{\varkappa t}-1\right)\alpha\left(\beta-\varkappa\right).
  \end{equation}
  Since for $s\in [0,T^+]$, we can conclude that
  $\|u(s)\|_{H^m}\leq \alpha\beta\leq 2\alpha \beta$, we can apply
   \Cref{prop:1} with $A=2\alpha \beta$, that results in
  \begin{equation}[eq:energy:3]
%    \rdflabel{eq:energy:3}
    \left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq C(2\alpha\beta)\|a(s,\cdot)\|_{H^m}.
  \end{equation}
  We now set
  \begin{equation}[eq:energy:4]
%    \rdflabel{eq:energy:4}
    \epsilon_0=\frac{\varkappa\alpha(\beta-\varkappa)}{C(2\alpha\beta)}.
  \end{equation}
  Since $\beta-\varkappa>0$, $\epsilon_0>0$, therefore we can demand the smallness
  condition
  \begin{equation}[eq:energy:5]
%    \rdflabel{eq:energy:5}
    \sup_{[0,\infty)}\|a(t,\cdot)\|_{H^m}\leq \epsilon_0.
  \end{equation}
  We now let $t=T^+$ in inequality \rdfref{eq:section4-sh:7}, then by
  inequality \rdfref{eq:energy:3}, condition \rdfref{eq:energy:5}, with
  \rdfref{eq:energy:4} in section~\rdfpageref{sec:first}., we conclude that
  \begin{equation}[eq:section4-sh3]
%    \label{eq:section4-sh3}
    \begin{split}
      T^+\sup_{[0,T^+]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m} &
      \leq T^+ C(2\alpha\beta)\sup_{[0,T^+]}\|a(s,\cdot)\|_{H^m}\leq T^+
      C(2\alpha\beta)\epsilon_0 \\ & = \varkappa T^+\alpha(\beta-\varkappa)\leq (e^{\varkappa
        T^+}-1)\alpha(\beta-\varkappa),
    \end{split}
  \end{equation}
  holds and consequently \autoref{eq:section4-sh3} implies inequality 
  \autoref{eq:section4-sh:7}.
  This proves \cref{eq:section4-sh:1} and completes the proof of the
  proposition. 
  In the last step, we used the elementary inequality $x\leq e^{x}-1$.
\end{proof}

%\RdfLoopReferences{}{eq:equation,sec:sectioning}{%
\RdfLoopReferences{}{eq:equation,sec:sectioning}{%
  \GetProperty{\currentobject}{rdfs:label} -> \GetProperty{\currentsubject}{rdfs:label}, %
}

\RdfDrawGraph[\jobname-graph][eq:value]{}{eq:equation}

\end{document}

But then lualatex --shell-escape working-example-labels-equation.tex failed with error

``LaTeX Warning: Referenceeq:wave:2' on page 1 undefined on input line 147.

Package rdfref error: unknown type of reference prop:1 :prop: Package rdfref error: unknown type of reference -NoValue- :: ! Use of \label@in@display@optarg doesn't match its definition. \@ifnextchar ... \reserved@d =#1\def \reserved@a {

2}\def \reserved@b {#3}\f...

l.162 \end {equation} ? ^X



I am really sorry for coming up with all these errors, but I think you are creating a very useful package and think it will only
receive the attention it deserves if it is as user friendly as  possible (by this I mean the user should not change or rewrite the syntax of the file under consideration)
michal-h21 commented 6 days ago

There were some equations without labels in square brackets, this seems to work:

\documentclass[12pt,landscape]{article}
\usepackage{amssymb,amsfonts,amsmath,amsthm}
\usepackage{accents}

\newcommand{\setT}{{\mathord{\mathbb T}}}
\makeatletter
\newcommand{\sbullet}{%
  \hbox{\fontfamily{lmr}\fontsize{.4\dimexpr(\f@size 
pt)}{0}\selectfont\textbullet}}
\DeclareRobustCommand{\mathbullet}{\accentset{\sbullet}}
\makeatother
\newcommand{\eqdef}{\overset{\mbox{\tiny{def}}}{=}}

\usepackage{thmtools}
\newtheorem{thm}{Theorem}
\newtheorem{defn}{Definition}
\newtheorem{lem}{Lemma}
\newtheorem{cor}{Corollary}

\newtheorem{prop}{Proposition}
\newtheorem{rem}{Remark}
\theoremstyle{definition}
\usepackage{xr-hyper}
\usepackage[colorlinks]{hyperref}
\externaldocument[A-]{nordstroem-jee}
\usepackage{cleveref}
% \usepackage{cleveref-nameref}
% \usepackage{cleveref-fix}

\Crefname{defn}{Definition}{Definitions}
\crefname{thm}{Theorem}{Theorems}
\Crefname{lem}{Lemma}{Lemmas}
\Crefname{prop}{Proposition}{Propositions}
\crefname{prop}{Proposition}{Propositions}
\crefname{cor}{Corollary}{Corollaries}
\Crefname{cor}{Corollary}{Corollaries}
\crefname{rem}{Remark}{Remarks}
\Crefname{rem}{Remark}{Remarks}

\usepackage{tikz}
\usepackage{shellesc}
\usetikzlibrary{graphs,graphdrawing,calc} 
\usegdlibrary{layered}
\usepackage[T1]{fontenc}
\usepackage{rdfref}
\robustify\int
\NewDocumentEnvironment{rdfequation}{o +b}{
  \begin{equation}
    #2 
    \IfBlankF{#1}{
      \rdflabel{#1}
      \AssignProperty{#1}{eq:value}{$#2$}
    }
  \end{equation}
}{}

\newwrite\graphwrite

\makeatletter
\ExplSyntaxOn
\newcommand\graphout[1]{\protected@write\graphwrite{\let\owrite\write\def\write{\immediate\owrite}}{#1}}

% #1 name of the graph (default \jobname-graph) -- it needs to be different than name of any existing file!
% #2 RDF property to be printed
% #3 list of allowed rdf:type for objects
% #4 list of allowed rdf:type for subjects
% don't forget to call latex with --shell-escape 
\NewDocumentCommand\RdfDrawGraph{O{\jobname-graph} O{rdfs:label} m m}{%
  \immediate\openout\graphwrite=#1.dot\relax%
  \graphout{digraph hello\@charlb} % save graph header
  \RdfLoopReferences{#3}{#4}{%
    \edef\objectlabel{\currentobject}%
    \edef\subjectlabel{\currentsubject}%
    \regex_replace_all:nnN{[:\-]}{_}\objectlabel%
    \regex_replace_all:nnN{[:\-]}{_}\subjectlabel%
    \graphout{\objectlabel [shape="rectangle",texlbl="\GetProperty{\currentobject}{#2}"]}
    \graphout{\subjectlabel [shape="rectangle",texlbl="\GetProperty{\currentsubject}{#2}"]}
    \graphout{\objectlabel~->~\subjectlabel} %
  }
  \graphout{\@charrb}% save footer
  \immediate\closeout\graphwrite%
  \ShellEscape{dot2tex~--figonly~--autosize~-t~raw~-o~#1.tmp~#1.dot }%
  \InputIfFileExists{#1.tmp}{}%
}
\ExplSyntaxOff
\makeatother
\newcommand\renewrdfenvironment[1]{% 
  \expandafter\let\csname orig:#1\expandafter\endcsname\csname#1\endcsname%
  \expandafter\let\csname endorig:#1\expandafter\endcsname\csname end#1\endcsname%
  \RenewDocumentEnvironment{#1}{o +b}{
  \begin{orig:#1}%
    ##2%
    \IfBlankF{##1}{%
      \rdflabel{##1}%
      \AddTriple{##1}{eq:value}{$##2$}%
    }
  \end{orig:#1}%
}{}%
}

\renewrdfenvironment{equation}

\begin{document}

% we need to declare some properties for the eq: prefix 
\AddRdfType{eq}{
  \AddPropertyEx{rdf:type}{eq:equation}
  \AddPropertyEx{doc:pageNo}{\thepage}
  % this will be used in the graph label, change to your liking
  \AddPropertyEx{rdfs:label}{Equation \theequation}
}

\makeatletter
\AddRdfType{sec}{
  \AddPropertyEx{rdf:type}{sec:sectioning}
  \AddPropertyEx{doc:pageNo}{\thepage}
  % this will be used in the graph label, change to your liking
  \AddPropertyEx{rdfs:label}{Section \@currentlabel}
}
\makeatother

\renewenvironment{proof}[1][\proofname]{{\bfseries Proof of #1.}}{\qed}.
\section{Proof of an important proposition}
\rdflabel{sec:first}

\begin{equation}[eq:wave:1]
  \begin{aligned}
%    \label{eq:wave:1}
    &\partial_t^2 u+2\varkappa \partial_t u -\Delta u=\mathord{e^{-\varkappa t}} a(t,x)(1+u)^3\\ 
%    \label{eq:wave:2}
    & (u(0,x),\partial_t u(0,x))=(f(x),g(x)).
  \end{aligned}
\end{equation}

\begin{thm}[Local existence]
  \rdflabel{thr:section3-fourier:1}
  Let $m>\frac{5}{2}$,
  $a(t,\cdot)\in L^\infty([0,\infty); H^m(\setT^3)$,
  $ f\in H^{m+1}(\setT^3)$ and $ g\in H^{m}(\setT^3)$, then there exists a positive
  $T$ and a unique solution $u$ to the Cauchy problem
  \cref{eq:wave:1}--\cref{eq:wave:2} such that
  \begin{equation*}
    u\in L^\infty([0,T]; H^{m+1}(\setT^3)\cap    C^{0,1}([0,T]; H^{m}(\setT^3), 
  \end{equation*}
  where $C^{0,1}$ is a Lipschitz continuous function.
\end{thm}

\begin{prop}[A Nonlinear estimate]
\rdflabel{prop:1}
 Let $m>\frac{3}{2}$ and  $a  \in  H^{m}$, then there is a universal constant 
$C(A)$, depending just on the constants of multiplications and embedding, such 
that 
\begin{equation}[eq:estimate:3]
   %\label{eq:estimate:3}
   \left\|a(1+u)^3 \right\|_{H^{m}}, \left\|a(1+u)^3 \right\|_{L^\infty}\leq C(A) \|a\|_{H^{m}} 
 \end{equation}
for all $u\in H^m$ with $\|u\|_{H^m}\leq A$.

\end{prop}

\begin{equation}[eq:energy:1]
%  \rdflabel{eq:energy:1}
  E(t)\eqdef \langle V(t),V(t)\rangle_m=\|\partial_t   u_h+\varkappa u_h\|_{H^m}^2+\|\partial_x u_h\|_{ H^m}^2.
\end{equation}
\begin{equation}[eq:Gronwall:2]
  % \rdflabel{eq:Gronwall:2}
  \begin{split}
    \sqrt{E(t)} & \leq e^{-\varkappa(t-t_0)}\sqrt{E(t_0)} +
    \varkappa^2\int_{t_0}^te^{-\varkappa(t-s)} \left\Vert u_h(s) \right\Vert_{H^{m}}ds
    \\ & + \int_{t_0}^te^{-\varkappa (t-s)}e^{-\varkappa s} \left\Vert
      a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m}ds
  \end{split}.
\end{equation}

\begin{prop}[Estimate for the gradient]
  \rdflabel{prop:9}
  Let
  $ \partial_x u=(\partial_1 u,\partial_2u,\partial_3 u)^{\intercal}$ and
  $u\in \mathbullet H^{m+1}$ and $m\geq0$ be an integer. 
  Then the following holds
  \begin{equation*}
    \rdflabel{eq:norm:36}
    \left\|{u}\right\|_{\mathbullet H^{m+1}}=\|\partial_x u\|_{\mathbullet H^{m}}.
  \end{equation*}

\end{prop}

\begin{subequations}
  \begin{align}
    \rdflabel{eq:section4-sh12}
    & \widehat{u}_0^{\prime\prime} + 2\varkappa \widehat{u}_0^{\prime} = 
      e^{-\varkappa  t}\widehat F_0 \\
    \rdflabel{eq:section4-sh32}
    &  \partial_t^2 u_h +2\varkappa \partial_t u_h -\Delta u_h     = 
      \mathord{e^{-\varkappa t}} \left( a(t,x)(1+u)^3 -\widehat{F}_{0} \right),
  \end{align}
\end{subequations}
\begin{equation}[eq:estimate:3]
 % \rdflabel{eq:section5-sh:33}
\left\{\begin{array}{ll}
         u(x,0)=f(x), & \partial_t u(x,0)=g(x),\\
         f\in \mathbullet H^{m+1}, & g\in \mathbullet H^m.
       \end{array}\right.
\end{equation} 

\begin{prop}[A priori estimates]
  \rdflabel{prop:2}
  Let $ 0<\varkappa<1$, $1<\beta<\frac{1}{\varkappa}$ and set $\alpha= \|V(0)\|_{H^m}$.
  Assume the  solution $u=\widehat u_0+u_h$ to 
  \cref{eq:section4-sh12}--\cref{eq:section4-sh32} with initial data
  \cref{eq:section5-sh:33} exists for $t\in [0,T]$. 
  If $\mathord{\left\|{a(t,\cdot)}\right\|_{ H^m}}$ is sufficiently small,
  then there exists a $T^{+}$, $0<T^{+}\leq T$, such that
  \begin{equation}[eq:section4-sh:2]
    % \rdflabel{eq:section4-sh:2}
    \sup_{[0,T^{+}]}\mathord{\left\|{u(t)}\right\|_{ H^m}}\leq \alpha\beta
  \end{equation}
  and
  \begin{equation}[eq:section4-sh:1]
%    \rdflabel{eq:section4-sh:1}
    E(T^{+})\leq E(0).
  \end{equation}
\end{prop}

% \section{Proof}
% \rdflabel{sec:proof}

\begin{proof}[~\autoref{prop:2}]
  We start with the proof of inequality \autoref{eq:section4-sh:2}. 
  Recall that although we have written $\alpha= \|V(0)\|_{H^m}$, the initial
  data are in the homogeneous Sobolev space and therefore by
   \Cref{prop:9} and \cref{eq:energy:1}, we obtain
   \begin{equation}[eq:undefined1]
    \|u(0)\|_{H^{m+1}}=\|f\|_{H^{m+1}}=\|\partial_x f\|_{H^{m}}\leq 
    \|V(0)\|_{H^m}=\alpha.
  \end{equation}
  Hence, since $ \beta > 0$, it follows from the existence 
  \Cref{thr:section3-fourier:1} and the continuity property of the
  corresponding solutions, that there exists $0<T^+\leq T$ such that
  \begin{equation}[eq:section4-sh:2]
    % \rdflabel{eq:section4-sh4}
    \sup_{[0,T^+]}\| u(t)\|_{ H^m}\leq \alpha\beta.
  \end{equation}
  We now turn to inequality \cref{eq:section4-sh:1}.
  For $t\in [0,T^+]$ we observe, using inequality \rdfref{eq:Gronwall:2}
  that
  \begin{equation}[eq:Gronwall:1]
    % \label{eq:Gronwall:1}
    \begin{split}
      \sqrt{E(t)} & \leq e^{-\varkappa t}\sqrt{E(0)} + \varkappa^2\int_{0}^te^{-\varkappa (t-s)} \alpha\beta ds + \int_{0}^te^{-\varkappa (t-s)}e^{-\varkappa s} \left\Vert a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m} ds\\% 
      & \leq e^{-\varkappa t}\sqrt{E(0)} +\varkappa \left(1 -e^{-\varkappa t}\right)\alpha\beta+ te^{-\varkappa t}\sup_{[0,t]}\left\Vert a(s,\cdot) \left( 1+u(s) \right)^3 \right\Vert_{H^m}.
    \end{split}
  \end{equation}[eq:undefined2]
  A simple algebraic manipulation shows us that, $E(t)\leq E(0)$, if
  \begin{equation}[eq:undefined3]
    \varkappa \left(e^{\varkappa t}-1\right)\alpha\beta+ t\sup_{[0,t]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq \left(e^{\varkappa t}-1\right)\sqrt{E(0)},
  \end{equation}
  or equivalently
  \begin{equation}[eq:section4-sh:7]
%    \label{eq:section4-sh:7}
    t\sup_{[0,t]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq \left(e^{\varkappa t}-1\right)\alpha\left(\beta-\varkappa\right).
  \end{equation}
  Since for $s\in [0,T^+]$, we can conclude that
  $\|u(s)\|_{H^m}\leq \alpha\beta\leq 2\alpha \beta$, we can apply
   \Cref{prop:1} with $A=2\alpha \beta$, that results in
  \begin{equation}[eq:energy:3]
%    \rdflabel{eq:energy:3}
    \left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m}\leq C(2\alpha\beta)\|a(s,\cdot)\|_{H^m}.
  \end{equation}
  We now set
  \begin{equation}[eq:energy:4]
%    \rdflabel{eq:energy:4}
    \epsilon_0=\frac{\varkappa\alpha(\beta-\varkappa)}{C(2\alpha\beta)}.
  \end{equation}
  Since $\beta-\varkappa>0$, $\epsilon_0>0$, therefore we can demand the smallness
  condition
  \begin{equation}[eq:energy:5]
%    \rdflabel{eq:energy:5}
    \sup_{[0,\infty)}\|a(t,\cdot)\|_{H^m}\leq \epsilon_0.
  \end{equation}
  We now let $t=T^+$ in inequality \rdfref{eq:section4-sh:7}, then by
  inequality \rdfref{eq:energy:3}, condition \rdfref{eq:energy:5}, with
  \rdfref{eq:energy:4} in section~\rdfpageref{sec:first}., we conclude that
  \begin{equation}[eq:section4-sh3]
%    \label{eq:section4-sh3}
    \begin{split}
      T^+\sup_{[0,T^+]}\left\Vert a(s,\cdot) \left(1+u(s) \right)^3 \right\Vert_{H^m} &
      \leq T^+ C(2\alpha\beta)\sup_{[0,T^+]}\|a(s,\cdot)\|_{H^m}\leq T^+
      C(2\alpha\beta)\epsilon_0 \\ & = \varkappa T^+\alpha(\beta-\varkappa)\leq (e^{\varkappa
        T^+}-1)\alpha(\beta-\varkappa),
    \end{split}
  \end{equation}
  holds and consequently \autoref{eq:section4-sh3} implies inequality 
  \autoref{eq:section4-sh:7}.
  This proves \cref{eq:section4-sh:1} and completes the proof of the
  proposition. 
  In the last step, we used the elementary inequality $x\leq e^{x}-1$.
\end{proof}

%\RdfLoopReferences{}{eq:equation,sec:sectioning}{%
\RdfLoopReferences{}{eq:equation,sec:sectioning}{%
  \GetProperty{\currentobject}{rdfs:label} -> \GetProperty{\currentsubject}{rdfs:label}, %
}

\RdfDrawGraph[\jobname-graph][eq:value]{}{eq:equation}

\end{document}

Well, it doesn't work for split.

ouboub commented 6 days ago

Well, it doesn't work for split.

Thanks very very much. That split can't be used is not a problem, since aligned works just fine.

There is another issue: in order to display the graph correctly I had to use the standalone class, more precisely

\documentclass[preview,border={5cm 4cm 38cm 4cm}]{standalone}

but there is a, hopefully small problem concerning this class. I will open another issue.

Thanks again, I am already thinking of providing Emacs AucTex support for this package, once all problems are ironed out.

ouboub commented 6 days ago

but there is a, hopefully small problem concerning this class. I will open another issue.

Correction there is no problem concerning the standalone class I made a mistake

\begin{minipage}{1.0\linewidth}

\RdfDrawGraph[\jobname-graph][eq:value]{}{eq:equation}
\end{minipage}

Is incorrect

\begin{minipage}{1.0\linewidth}

\RdfDrawGraph[\jobname-graph][eq:value]{}{eq:equation}
% always an empty line please

\end{minipage}

is correct!

Here is the complete working example.

\documentclass[preview,border={5cm 4cm 35cm 4cm},multi=true,multi={minipage}]{standalone}
\usepackage{amsmath}
\usepackage{amssymb}
\numberwithin{equation}{section}
\newtheorem{prop}{Proposition}
\usepackage{tikz}
\usepackage{shellesc}
\usetikzlibrary{graphs,graphdrawing,calc} 
\usegdlibrary{layered}
\usepackage[T1]{fontenc}
\usepackage{rdfref}
\NewDocumentEnvironment{rdfequation}{o +b}{
  \begin{equation}
    #2 
    \IfBlankF{#1}{
      \rdflabel{#1}
      \AssignProperty{#1}{eq:value}{$#2$}
    }
  \end{equation}
}{}

\newwrite\graphwrite

\makeatletter
\newcommand\graphout[1]{\protected@write\graphwrite{\let\owrite\write\def\write{\immediate\owrite}}{#1}}

% #1 name of the graph (default \jobname-graph) -- it needs to be different than name of any existing file!
% #2 RDF property to be printed
% #3 list of allowed rdf:type for objects
% #4 list of allowed rdf:type for subjects
% don't forget to call latex with --shell-escape 
\NewDocumentCommand\RdfDrawGraph{O{\jobname-graph} O{rdfs:label} m m}{%
  \immediate\openout\graphwrite=#1.dot\relax%
  \graphout{digraph hello\@charlb} % save graph header
  \RdfLoopReferences{#3}{#4}{%
    \StrSubstitute{\currentobject}{:}{_}[\objectlabel]
    \StrSubstitute{\currentsubject}{:}{_}[\subjectlabel]
    \graphout{\objectlabel [shape="rectangle",texlbl="\GetProperty{\currentobject}{#2}"]}
    \graphout{\subjectlabel [shape="rectangle",texlbl="\GetProperty{\currentsubject}{#2}"]}
    \graphout{\objectlabel-> \subjectlabel} %
  }
  \graphout{\@charrb}% save footer
  \immediate\closeout\graphwrite%
  \ShellEscape{dot2tex --figonly --autosize -t raw -o #1.tmp #1.dot }%
  \InputIfFileExists{#1.tmp}{}%
}
\makeatother

\newcommand\renewrdfenvironment[1]{% 
  \expandafter\let\csname orig:#1\expandafter\endcsname\csname#1\endcsname%
  \expandafter\let\csname endorig:#1\expandafter\endcsname\csname end#1\endcsname%
  \RenewDocumentEnvironment{#1}{o +b}{
  \begin{orig:#1}%
    ##2%
    \IfBlankF{##1}{%
      \rdflabel{##1}%
      \AddTriple{##1}{eq:value}{$##2$}%
    }
  \end{orig:#1}%
}{}%
}

\renewrdfenvironment{equation}
\robustify\int
\robustify\sum
\begin{document}

% we need to declare some properties for the eq: prefix 
\AddRdfType{eq}{
  \AddPropertyEx{rdf:type}{eq:equation}
  \AddPropertyEx{doc:pageNo}{\thepage}
  % this will be used in the graph label, change to your liking
  \AddPropertyEx{rdfs:label}{Equation \theequation}
}

\makeatletter
\AddRdfType{sec}{
  \AddPropertyEx{rdf:type}{sec:sectioning}
  \AddPropertyEx{doc:pageNo}{\thepage}
  % this will be used in the graph label, change to your liking
  \AddPropertyEx{rdfs:label}{Section \@currentlabel}
}
\makeatother
\begin{minipage}{1.0\linewidth}

\section{first section}
\rdflabel{sec:first}

\begin{prop}[Equivalence of Sobolev norms and energy norms]
  \label{prop:energynormomparison}
  \hfill

  Let $N \geq 3$ be an integer, and assume that the bootstrap assumptions
  \eqref{E:metricBAeta}--\eqref{E:g0jBALinfinity} hold on the
  spacetime slab $[0,T) \times \mathbb{T}^3$ for some constant
  $c_1 \geq 1$ and for $\eta = \eta_{min}$. 
  Let $(\delta, \gamma)$ be any of the pairs of constants given in Definition
  \ref{def:energiesforg}, and let $C_{(\gamma)}$ be the corresponding
  constant from  \ref{lem:buildingblockmetricenergy}. 
  There exist constants $\epsilon''' > 0$ and $C > 0$ depending on
  $N$, $c_1$, $\eta_{min}$, $\gamma$, and $\delta$, such that if
  $\mathbf{S}_{N} \leq \epsilon'''$, then the following inequalities hold on
  the interval $[0,T)$ for the norms and energies defined in
  \eqref{E:mathfrakSMsupg00}--\eqref{E:totalsupnorm},
  \eqref{E:mathcalEdef}, \eqref{E:g00supenergydef} -
  \eqref{E:gtotalsupenergydef}, \eqref{E:fluidsupenergydef}, and
  \eqref{E:totalenergy}:

  \begin{subequations}
    \begin{align}
      C^{-1}  \big\lbrace \| \partial_t v \|_{L^2} + C_{(\gamma)} \| v \|_{L^2} + e^{- \Omega} \| \bar{\partial} v \|_{L^2} \big\rbrace 
      \leq \mathcal{E}_{(\gamma,\delta)}[v,\partial v] & \leq   C  \big\lbrace \| \partial_t v \|_{L^2} 
                                           +  C_{(\gamma)} \| v \|_{L^2} + e^{- \Omega} \| \bar{\partial} v 
                                           \|_{L^2} \big\rbrace, \label{E:mathcalEcomparison} \\
      C^{-1} E_{g_{00}+1;N} \leq S_{g_{00}+1;N} & \leq C E_{g_{00}+1;N}, 
                                                            \label{E:mathfrakENg00mathfrakSMcomparison} \\
      C^{-1} E_{g_{0*};N} \leq S_{g_{0*};N} & \leq C E_{g_{0*};N}, \\
      C^{-1} E_{h_{**};N} \leq S_{h_{**};N} & \leq C E_{h_{**};N}, 
                                                            \label{E:mathfrakENh**mathfrakSMcomparison} \\
      C^{-1} E_{g;N} \leq S_{g;N} & \leq C E_{g;N}, \label{E:mathfrakENmathfrakSMcomparison} \\
      C^{-1} E_{\partial \Phi;N} \leq S_{\partial \Phi;N} & \leq C E_{\partial \Phi;N}, \label{E:ENSNcomparison} \\
      C^{-1} \mathbf{E}_{N}  \leq \mathbf{S}_{N} & \leq C
                                                     \mathbf{E}_{N}.
                                                     \label{E:mathcalQNQNcomparison}
    \end{align}
  \end{subequations}

  Analogous inequalities hold if we make the replacements
  $(E_{g_{00}+1;N},
  E_{g_{0*};N}, E_{h_{**};N}, E_{g;N}, E_{\partial \Phi;N})$ \\
  $\rightarrow (\underline{E}_{g_{00}+1;N}, \underline{E}_{g_{0*};N},
  \underline{E}_{h_{**};N}, \underline{E}_{g;N}, \underline{E}_{\partial \Phi;N})$ and
  $(S_{g_{00}+1;N},
  S_{g_{0*};N}, S_{h_{**};N}, S_{g;N}, S_{\partial \Phi;N})$ \\
  $\rightarrow (\underline{S}_{g_{00}+1;N}, \underline{S}_{g_{0*};N},
  \underline{S}_{h_{**};N}, \underline{S}_{g;N}, \underline{S}_{\partial \Phi;N})$.
\end{prop}

\begin{equation}[eq:hello]
      S_{\partial \Phi;N}(t)  \overset{\mbox{\tiny{def}}}{=} \sup_{0 \leq \tau \leq t} \underline{S}_{\partial \Phi;N}(\tau)
\end{equation}

%This equation links to equation~\rdfref{eq:second}, as well as to equation~\rdfref{eq:third}.

\begin{equation}[eq:first]
\begin{aligned}
      \underline{E}_{\partial \Phi;N}^2
  & \overset{\mbox{\tiny{def}}}{=}\\
   & \underline{E}_0^2\\
   & + \sum_{1 \leq |\vec{\alpha}| \leq N} \frac{1}{2} \int_{\mathbb{T}^3} e^{2 \varkappa \Omega}(\partial_t \partial_{\vec{\alpha}}\Phi)^2 + e^{2\varkappa \Omega} m^{ab} (\partial_a \partial_{\vec{\alpha}} \Phi)(\partial_b \partial_{\vec{\alpha}} \Phi) \,d^3x  \\
      E_{\partial \Phi;N}(t) & \overset{\mbox{\tiny{def}}}{=} \sup_{0 \leq \tau \leq t} \underline{E}_{\partial \Phi;N}(\tau).
     \end{aligned} 
\end{equation}

\begin{equation}[eq:speck]
\varkappa = \frac{3}{(2s+1)} = 3 c_s^2 \quad c_s^{2}\leq 1 \Rightarrow 1\leq \varkappa
\end{equation}
%This links to~\rdfref{eq:hello}.

\section{another}
\rdflabel{sec:another}

\begin{equation}[eq:second]
      \frac{2}{3c_1} \delta^{ab}X_{a} X_{b}
       \leq e^{2 \Omega} g^{ab}X_{a}X_{b} \leq \frac{3c_1}{2}\delta^{ab}X_{a}X_{b},  \forall (X_1,X_2,X_3) \in \mathbb{R}^3. 
\end{equation}

\begin{equation}[eq:forth]
      \Big\| m^{jk} - \frac{1}{2s+1} g^{jk} \Big\|_{L^{\infty}} \leq C e^{-(2 + q) \Omega} \mathbf{S}_{N}
\end{equation}

%Link to another equation~\rdfref{eq:third}, and \rdfref{eq:forth} in section~\rdfpageref{sec:first}. 

\begin{equation}[eq:third]
      C^{-1} E_{\partial \Phi;N} \leq S_{\partial \Phi;N}  \leq C E_{\partial \Phi;N}, 
\end{equation}
The final result, obtained by using \rdfref{eq:third}, and \rdfref{eq:forth}, \rdfref{eq:second}
\rdfref{eq:first} 
\rdfref{eq:hello}
\rdfref{eq:speck}

\RdfLoopReferences{}{eq:equation,sec:sectioning}{%
  \GetProperty{\currentobject}{rdfs:label} -> \GetProperty{\currentsubject}{rdfs:label}, %
}

\end{minipage}

\begin{minipage}{1.0\linewidth}

\RdfDrawGraph[\jobname-graph][eq:value]{}{eq:equation}
% always an empty line please

\end{minipage}
\end{document}
%%% Local Variables:
%%% mode: LaTeX
%%% TeX-engine: luatex
%%% TeX-output-dir: nil
%%% TeX-command-extra-options: "-shell-escape"
%%% End: