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

Math in tables exhibits odd rendering behaviour #15

Open
averageflamethrowerguy opened this issue Jan 16, 2021 · 3 comments
Open

Math in tables exhibits odd rendering behaviour #15

averageflamethrowerguy opened this issue Jan 16, 2021 · 3 comments

Comments

@averageflamethrowerguy
Copy link

Hello again!

I'd like to take a moment to thank you for maintaining this package. I'm using it as a pretty major parsing component of a quantum computing app I'm trying to get off the ground, and this is by far the best general purpose math+markdown parser I've run into thus far.

I've recently been having some issues with math blocks in HTML tables, and I'm wondering if you have any experience with or suggestions for solving these problems.

First, math delimited with '$' is being parsed as text, not as math.
Math delimited with '$$' is being parsed correctly when using hard refreshes or url navigation, but not when using view-layer navigation. When using view-layer navigation, the math remains in string form, complete with the $$ delimiter.

As far as I can tell, this issue happens exclusively with tables. Do have any ideas as to what may be causing the problem?

Here's the table, for your reference.

  <table style='font-size:16px;margin-left:auto;margin-right:auto;'>
       <tr>
              <th>Bit Value</th>
             <th style='text-align:center;'>Basis</th>
             <th style='text-align:center;'>Qubit State</th>
         </tr>
         <tr>
             <td style='text-align:center;'>0</td>
             <td>Computational</td>
             <td style='text-align:center;'>$\\left|{0}\\right\\rangle$</td>
         </tr>
         <tr>
             <td style='text-align:center;'>1</td>
             <td>Computational</td>
             <td style='text-align:center;'>$$\\left|{1}\\right\\rangle$$</td>
    </table>
@averageflamethrowerguy
Copy link
Author

averageflamethrowerguy commented Jan 16, 2021

I did a bit more testing -- it looks like this is not specific only to tables. <p>, <div>, <section>, <table> all display this behavior at a depth of only one HTML tag.
However, <span> seems to be treated like plaintext (and doesn't experience either issue).

@captainsafia
Copy link
Member

@averageflamethrowerguy Just to confirm: you're trying to render LaTeX inside the HTML table within a Markdown component?

Also -- what version of the package are you using?

@averageflamethrowerguy
Copy link
Author

Yes, that's correct!
And I'm using 4.6.0

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