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

"\ref" in math environment #144

Open
beroal opened this issue Oct 23, 2019 · 1 comment
Open

"\ref" in math environment #144

beroal opened this issue Oct 23, 2019 · 1 comment

Comments

@beroal
Copy link

beroal commented Oct 23, 2019

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?

@jgm
Copy link
Owner

jgm commented Oct 23, 2019

It would not be hard to change texmath so that it returns a placeholder of some kind, like a question mark. But to get real references would require a reference+label system which pandoc doesn't yet have.

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

2 participants