Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to link to a title in the same document by MathJax \href? #1794

Open
IvanaGyro opened this issue Jan 18, 2023 · 5 comments
Open

How to link to a title in the same document by MathJax \href? #1794

IvanaGyro opened this issue Jan 18, 2023 · 5 comments

Comments

@IvanaGyro
Copy link

I know we can create a link by \href with MathJax.

$$
\href{https://this.is.a.doc/}{\text{this is a doc}}
$$

However, it seems that \href only works when the link starts with http(s)://. I want to link to a title in the same document.

$$
\href{#the-title-in-the-same-document}{=}
$$

Is it possible?

@biafffff
Copy link

biafffff commented Mar 2, 2023

If you are trying to cross-reference inside the same document, I've found this solution.

### Overview section

Please visit the [Overview section](#Overview-section) to find additional information. 

@IvanaGyro
Copy link
Author

IvanaGyro commented Mar 2, 2023

I am finding a solution in LaTeX (MathJax), not in pure markdown.

@biafffff
Copy link

biafffff commented Mar 3, 2023

If so you will need to label your Section/subsection/table/figure/equation \label{sec:overview} and reference them using the command \ref{sec:overview} or \eqref{eq:blackandscholes} for equations.

@vishalsingh2972
Copy link

is this issue still up? would like to give it a try @IvanaGyro

@IvanaGyro
Copy link
Author

IvanaGyro commented Jun 25, 2023

I tried. MathJax doesn't handle the references and the labels right.

Here is an example.

$$
\begin{equation}
  \int_0^\infty \frac{x^3}{e^x-1}\,dx = \frac{\pi^4}{15}
  \label{example}
\end{equation}
$$

this is eq $\ref{example}$

And this is the rendering result.
圖片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants