jgm / jgm/texmath

"\ref" in math environment

Open
#144 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
406
Forks
86
Avg merge
1h 25m
Merged PRs (30d)
1

Description

I want to use `\ref` in comments on equations inside `\begin{align} ... \end{align}`. It seems that "pandoc" does not process it even if I enclose `\ref` in `\text{...}`.

Without `\text`:
```
[WARNING] Could not convert TeX math '\begin{aligned}
10 &= 1\times 10 +0\times 3, \label{0}
\\ 3 &= 0\times 10 +1\times 3, \label{1}
\\ 1 &= 1\times 10 -3\times 3. & \# (\ref{0}) - 3\times (\ref{1}) \nonumber\end{aligned}', rendering as TeX:
-3\times 3. & \# (\ref{0}) - 3\times (\
^
unexpected "\\"
expecting "&", "\\\\", white space or "\\end"
```

With `\text`:
```
[WARNING] Could not convert TeX math '\begin{aligned}
10 &= 1\times 10 +0\times 3, \label{0}
\\ 3 &= 0\times 10 +1\times 3, \label{1}
\\ 1 &= 1\times 10 -3\times 3. & \# \text{(\ref{0})} - 3\times \text{(\ref{1})} \nonumber\end{aligned}', rendering as TeX:
0 -3\times 3. & \# \text{(\ref{0})} - 3\
^
unexpected "\\"
expecting "&", "\\\\", white space or "\\end"
```

Is it possible to implement this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.