quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.

Home Page:https://quarto.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WebTex not working as expected

pat-alt opened this issue · comments

According to the docs rendering the TeX below to WebTex

$x + 1$

is supposed to yield:

![](https://latex.codecogs.com/svg.latex?x%20%2B%201)

Using the latest version of quarto-cli (0.9.21) I cannot reproduce this. Instead I get the following:

![x + 1](https://latex.codecogs.com/svg.latex?x%20%2B%201 "x + 1")

The actual Tex x + 1 is rendered as a caption. I've added a minimum working example to this repo.

Thanks!

The problem here is that your Hugo template/configuration is taking the presence of the markdown to mean that this is a "figure" so it should display the caption. Here's a discussion of the technique: https://sebastiandedeyne.com/captioned-images-with-markdown-render-hooks-in-hugo/

The basic Hugo template I am testing with doesn't do this transformation but perhaps your template is configured to do this?

Thanks - I'm using the starter-hugo-academic template and that does have its own render-image.html, so this seems to be the reason, yup. Have tried adding a default hook to overwrite the template, but that doesn't seem to work. If I find a solution I'll post it here, but perhaps I'll just move to quarto altogether for my website.

Thanks again!