jck21
jck21

Reputation: 811

How to number equations and refer to them in Xaringan

I want to number the equation and refer to it in the text. For example, the following is what I tried in Xaringan. Can you give me tips for this?

$$\begin{equation}\label{eq:1} y_t=x_t+3 \end{equation}$$.

\Cref{eq:1} can be solved.

Upvotes: 1

Views: 44

Answers (1)

Sinval
Sinval

Reputation: 1417

If you use this

output: 
  xaringan::moon_reader:
    mathjax: "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_HTMLorMML"
    includes:
      in_header: assets/html/mathjax-equation-numbers.html

The mathjax-equation-numbers.html is available here.

To make the reference to equations in the slides I do (for example:

\begin{align}
\rho_{ \varepsilon,\tau}=0 \label{corr1}
\end{align}  

The error of measurement on a test and the true scores on that test are uncorrelated 

\begin{align}
\rho_{ \varepsilon_1,\varepsilon_2}=0 \label{corr2}
\end{align}  

Error scores on two different tests are uncorrelated

\begin{align}
\rho_{ \varepsilon_1,\tau_2}=0 \label{corr3}
\end{align}  

The error of measurement on a test and the true scores on all other tests are uncorrelated

If two tests have observed scores $X$ and $X^\prime$ that satisfy assumptions \eqref{truescore} to \eqref{corr3}, and if, for every population of examinees, $\tau = \tau^\prime$ and $\sigma^2_\varepsilon=\sigma^2_{\varepsilon^\prime}$, then the tests are called **parallel tests**. In other words, parallel tests have the same true scores and error variances.  

If two tests have observed scores $X_1$ and $X_2$ that satisfy assumptions \eqref{truescore} to \eqref{corr3}, and if, for every population of examinees, $\tau_1=\tau_2+c$, where $c$ is a constant, then the tests are called essentially $\tau-\text{equivalent tests}$. To put it differently, **essentially τ-equivalent tests** have true scores that differ by a constant.

Which will be rendered as:

enter image description here

Upvotes: 1

Related Questions