math: use in divs #11852

Closed
opened 2025-11-02 09:49:42 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @nschloe on GitHub (Oct 14, 2023).

Feature Description

Gitea apparently disallows Markdown syntax without HTML tags. This

<div align="center">
*a*
</div>

renders as

screenshot_2023-10-14-144139

While it's easy to work around that with bold text -- simply use <b>...</b>, I haven't found a way to get math to work in div-aligned blocks.

<div align="center">
Lorem \(a\) ipsum
</div>

screenshot_2023-10-14-144242

Screenshots

No response

Originally created by @nschloe on GitHub (Oct 14, 2023). ### Feature Description Gitea apparently disallows Markdown syntax without HTML tags. This ```markdown <div align="center"> *a* </div> ``` renders as ![screenshot_2023-10-14-144139](https://github.com/go-gitea/gitea/assets/181628/6198e4c1-ab06-4fc2-af00-7200f4b19bb6) While it's easy to work around that with bold text -- simply use `<b>...</b>`, I haven't found a way to get math to work in div-aligned blocks. ```markdown <div align="center"> Lorem \(a\) ipsum </div> ``` ![screenshot_2023-10-14-144242](https://github.com/go-gitea/gitea/assets/181628/5abc22ab-e4f1-4645-897f-fa3de25b36bd) ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 09:49:42 -06:00
Author
Owner

@KroMignon commented on GitHub (Oct 26, 2023):

Mixing HTML tags and Markdown is always complicated, because the markdown interpreter has to find out where HTML tags ends and where the Markdown sequence starts.

Did you try to add empty lines between Tags and markdown text?

<div align="center">

**Lorem** \(a\) _ipsum_

</div>

Lorem (a) ipsum

@KroMignon commented on GitHub (Oct 26, 2023): Mixing HTML tags and Markdown is always complicated, because the markdown interpreter has to find out where HTML tags ends and where the Markdown sequence starts. Did you try to add empty lines between Tags and markdown text? ``` <div align="center"> **Lorem** \(a\) _ipsum_ </div> ``` <div align="center"> **Lorem** \(a\) _ipsum_ </div>
Author
Owner

@nschloe commented on GitHub (Oct 26, 2023):

This does the trick, thanks!

@nschloe commented on GitHub (Oct 26, 2023): This does the trick, thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11852