-
Notifications
You must be signed in to change notification settings - Fork 77
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
equation label #413
Comments
I don't think you need "\begin{equation}" when you are using Markdown's
`$$` to specify an equation. So try this:
$$\begin{aligned}my fancy equation\end{aligned}$${#eq:test}
…On Wed, Nov 15, 2023 at 3:22 AM Amin Gholizad ***@***.***> wrote:
I have an equation like this
$$\begin{equation}\begin{aligned}my fancy equation\end{aligned}\end{equation}$${#eq:test}
how ever it renders it like this
[image: image]
<https://user-images.githubusercontent.com/39440488/283058675-6a01316d-8661-43ed-8787-c147e9de3f20.png>
for it to render properly I have to use it like this
$$\begin{equation}\begin{aligned}my fancy equation\end{aligned}\label{eq:test}\end{equation}$$
doing so, the markdown preview gets corrupted which is apparently a known
issue mathjax and obsidian as far as I know.
—
Reply to this email directly, view it on GitHub
<#413>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXYRURWANVIITTSAUXSPPX3YESCXBAVCNFSM6AAAAAA7MFH6I2VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4TIMZXGYYTMNA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
If I do not use equation environment I will get this error
|
I'm not an expert, but so long as you're outputting only to pdf (and not
docx, e.g.), I think this should work:
\begin{equation}
\begin{aligned}
my fancy equation\label{eq:name}
\end{aligned}
\end{equation}
This is a reference to \eqref{eq:name}
I just tested it and it seems pandoc-crossref seamlessly blends
equations/references of the above sort with equations set apart with `$$`
and cross-referenced with pandoc-crossref's own markdown syntax.
On Thu, Nov 16, 2023 at 2:36 AM Amin Gholizad ***@***.***>
wrote:
… If I do not use equation environment I will get this error
Error producing PDF. ! Package amsmath Error: \begin{aligned} allowed only
in math mode. See asmsmath package documantation for explanation. Type H
<return> for immediate help.
I have encountered this before and only solution i could find was using
equation.
I don't think you need "\begin{equation}" when you are using Markdown's $$
to specify an equation. So try this: $$\begin{aligned}my fancy
equation\end{aligned}$${#eq:test}
… <#m_-200488138766427079_>
On Wed, Nov 15, 2023 at 3:22 AM Amin Gholizad *@*.*> wrote: I have an
equation like this $$\begin{equation}\begin{aligned}my fancy
equation\end{aligned}\end{equation}$${#eq:test} how ever it renders it like
this [image: image]
https://user-images.githubusercontent.com/39440488/283058675-6a01316d-8661-43ed-8787-c147e9de3f20.png
<https://user-images.githubusercontent.com/39440488/283058675-6a01316d-8661-43ed-8787-c147e9de3f20.png>
for it to render properly I have to use it like this
$$\begin{equation}\begin{aligned}my fancy
equation\end{aligned}\label{eq:test}\end{equation}$$ doing so, the markdown
preview gets corrupted which is apparently a known issue mathjax and
obsidian as far as I know. — Reply to this email directly, view it on
GitHub <#413 <#413>>, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AXYRURWANVIITTSAUXSPPX3YESCXBAVCNFSM6AAAAAA7MFH6I2VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4TIMZXGYYTMNA
<https://github.com/notifications/unsubscribe-auth/AXYRURWANVIITTSAUXSPPX3YESCXBAVCNFSM6AAAAAA7MFH6I2VHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4TIMZXGYYTMNA>
. You are receiving this because you are subscribed to this thread.Message
ID: @.*>
—
Reply to this email directly, view it on GitHub
<#413 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXYRURRK7AWAS2E2IOC4B4DYEXGCVAVCNFSM6AAAAAA7MFH6I2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJUGAYDEMBSGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I forgot to mention that I am using "obsidian-enhancing-export" plugin which adds this lua filter to the mix return {
{
Math = function (elem)
if elem.text:find("^%s*\\begin{") ~= nil then
return pandoc.RawInline('tex', elem.text)
else
return elem
end
end,
}
}
|
Well, run that filter after pandoc-crossref. It's changing equations to raw TeX, pandoc-crossref doesn't handle raw TeX. ... also, just changing equations to raw TeX sounds like a bad idea, compatibility-wise. |
There's an option in pandoc-crossref to number all display math, see the docs (the one you want is There's one catch, though, you can't use |
I have an equation like this
$$\begin{equation}\begin{aligned}my fancy equation\end{aligned}\end{equation}$${#eq:test}
how ever it renders it like this
for it to render properly I have to use it like this
$$\begin{equation}\begin{aligned}my fancy equation\end{aligned}\label{eq:test}\end{equation}$$
doing so, the markdown preview gets corrupted which is apparently a known issue mathjax and obsidian as far as I know.
The text was updated successfully, but these errors were encountered: