Skip to content

Commit b14dd87

Browse files
committed
Review (Partim)
1 parent 7381fe5 commit b14dd87

File tree

4 files changed

+66
-1
lines changed

4 files changed

+66
-1
lines changed

testXourses/labelsTest.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
\maketitle
77

88
\activity{testFiles/labels}
9+
\activity{testFiles/labelsFromOtherActivity}
910
\ifonline
1011
\activity{testFiles/labelsArticle}
1112
\fi

testXourses/testFiles/labels.tex

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
\documentclass{ximera}
22

3+
\numberedProblemstrue
4+
35
\title{Labels and refs}
46

57
\begin{document}
68
\begin{abstract}
79
\end{abstract}
810
\maketitle
11+
\label{xim:labels}
12+
913

1014
% {{\Huge \bfseries Last Updated: \today}} \\
1115

@@ -55,6 +59,8 @@ \section{Mathematics Example}
5559

5660
We refer to item~\ref{itm:first} in the list above.
5761

62+
You can find these same links from another activity, see \hyperlink{xim:labelsFromOtherActivity}{the labels test activity}.
63+
5864
\section{Figures and Tables}
5965

6066
\subsection{A Demo Figure}
@@ -82,6 +88,31 @@ \subsection{A Demo Table}
8288
\label{tab:example}
8389
}
8490

91+
\begin{theorem} \label{thm:1}
92+
93+
This is a theorem that refers to Equation~$\eqref{eq:pythagoras}$ and Figure~\ref{fig:demo}.
94+
95+
96+
\end{theorem}
97+
98+
\begin{example} \label{ex:1}
99+
First example
100+
101+
This example refers to Example~\ref{ex:2} and Example~\ref{ex:3}.
102+
103+
\end{example}
104+
\begin{example} \label{ex:2}
105+
Second example
106+
107+
This example refers to Example~\ref{ex:1} and Example~\ref{ex:3}.
108+
\end{example}
109+
\begin{example} \label{ex:3}
110+
Third example
111+
112+
This example refers to Example~\ref{ex:1} and Example~\ref{ex:2}.
113+
\end{example}
114+
115+
85116
\section{Custom Text Reference}
86117

87118
This document started in Section~\ref{sec:intro} and discussed math in Section~\nameref{sec:math}.

testXourses/testFiles/labelsArticle.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
\documentclass{article}
22

3-
\usepackage{hyperref} % optional, better caption formatting
3+
\usepackage{hyperref}
44
\usepackage{amsmath}
55
\usepackage{lipsum}
66

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
\documentclass{ximera}
2+
3+
\title{Links to other activities}
4+
5+
\begin{document}
6+
\begin{abstract}
7+
\end{abstract}
8+
\maketitle
9+
\label{xim:labelsFromOtherActivity}
10+
11+
\section{Introduction}
12+
\label{sec:intro} % Duplicate on purpose to test duplicate labels
13+
14+
15+
Here we link to the content of the \hyperlink{xim:labels}{labels test activity}.
16+
17+
18+
We can refer to the first equation \textbf{in mathmode} using \verb|\ref| : Equation~$\ref{eq:pythagoras}$ or with \verb|\eqref|: $\eqref{eq:pythagoras}$.
19+
20+
We can refer to the second equation \textbf{in mathmode} using \verb|\ref| : Equation~$\text{\ref{eq:tag:pythagoras}}$ or with \verb|\eqref|: $\eqref{eq:tag:pythagoras}$.
21+
22+
We can refer to the third one \verb|\hyperlink|, thus \hyperlink{ht:pythagoras}{like this}.
23+
24+
Note that in HTML \verb|\ref| and \verb|\eqref| without mathmode might jump to BELOW Equation~\ref{eq:pythagoras} or \eqref{eq:pythagoras}, and
25+
\verb|\ref| might need a \verb|\text| to avoid $\ref{eq:pythagoras}$.
26+
27+
The first equation appears on page~\pageref{eq:pythagoras}, the second on page~\pageref{eq:tag:pythagoras}.
28+
Note that this does not make a lot of sens online.
29+
30+
We refer to item~\ref{itm:first} in the list above.
31+
32+
\
33+
\end{document}

0 commit comments

Comments
 (0)