how to get hugo-compatible inline equations #12272
-
DescriptionI am trying to get math equations to a Example, also available in a repo context here: ---
title: ""
from: markdown+tex_math_single_backslash
html-math-method: mathjax
format:
hugo-md:
toc: false
preserve_yaml: true
output:
hugo-md:
maths: true
variant: gfm+footnotes+tex_math_gfm
---
I am losing my \( \sigma \)!
```{=markdown}
But I would like to keep \( \sigma \)...
```
via quarto render hugomd_testing.qmd --to hugo-md this becomes I am losing my $\sigma$!
But I would like to keep \(\sigma\)...
... which does not render well with When omitting Still, during rendering, the inline math brackets get converted to dollars. Is there a setting to encourage Thank you in advance! Footnotes |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
First, when you write in a .qmd, you need to use Quarto Markdown syntax as we document. So inline needs to be If you want to write hugo directly, then you need to use raw directly as you with the block
So to keep it you could do
If you want Through Pandoc, you can tweak the output by configure how the Pandoc writer behave. This is advanced (as not documented and requiring knowing how ---
title: Test
format:
hugo-md:
variant: -tex_math_dollars+tex_math_single_backslash
---
I am losing my $\sigma$
```{=markdown}
But I would like to keep \( \sigma \)...
```
This will output the following
which I think it what you want; Using Hope it helps |
Beta Was this translation helpful? Give feedback.
-
Thank you for taking the time, @cderv !
I also now found that I had only been checking the pandoc extensions for |
Beta Was this translation helpful? Give feedback.
First, when you write in a .qmd, you need to use Quarto Markdown syntax as we document. So inline needs to be
$ .. $
. This is so that the format is parsed correctly.If you want to write hugo directly, then you need to use raw directly as you with the block
So to keep it you could do
If you want
\(
in output, this is about the writer. As we document in webtex alternative section,format: hugo-md
will output$
for math.Through Pandoc, you can tweak the output by configure how the Pandoc writer behave. This is advanced (as not documented and requiring knowing how
…