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

wip fix equations #326

Merged
merged 20 commits into from
Mar 25, 2025
Merged

wip fix equations #326

merged 20 commits into from
Mar 25, 2025

Conversation

artivis
Copy link
Owner

@artivis artivis commented Mar 24, 2025

No description provided.

artivis added 3 commits March 24, 2025 21:15
Signed-off-by: artivis <jeremie.deray@canonical.com>
@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

Hi @joansola, I'm fixing the equations in the README using plain markdown - it now supports some latex-like math - see the branch fix/equations. Should I also convert your 'tangent spaces' table ? Maybe only the two columns on the right ?

@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

Should I also convert your 'tangent spaces' table ?

So, I went ahead and did just that. Have a look at this PR and let me know if that works for you.

@joansola
Copy link
Collaborator

Yes it looks good! I think then that the ´group elements´column should also be passed to latex! I´ll do it right away.

@joansola
Copy link
Collaborator

Done. @artivis see how it looks and for me this PR is ready.

@joansola
Copy link
Collaborator

BTW @artivis did you check that the order in those tangent elements is OK with the actual order in manif? I think they are OK but I think you know better than me.

@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

I'll double check before the final merge 👍

@joansola
Copy link
Collaborator

@artivis the \bm directive does not render on my Firefox. Is is possible to add somewhere

\usepackage{bm}

?

Signed-off-by: artivis <jeremie.deray@canonical.com>
@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

@artivis the \bm directive does not render on my Firefox. Is is possible to add somewhere

What are you looking at? The README on github or the website locally?
And what do you see? Simply the variable not bold or some error?
It seems that github support for math is limited.

@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

Ok I've seen the \bm not rendering properly in the README on github. Looking into it.

@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

So, github markdown uses mathJax for rendering math.
MathJax supports the macros listed here.
bm isn't support but boldsymbol is. I've tried boldsymbol; locally it is fine, in github, it doesn't seem to work. The greek letters are rendered fine, just not bold ...

@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

I'll replace bm with boldsymbol since at least it doesn't produce an error. It also seems to work fine on the doc website.

@artivis artivis marked this pull request as ready for review March 25, 2025 14:26
@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

@joansola if this pr is fine with you, I'll go on and merge to the other pr which in turn will be merge as well to release the new doc website.

@joansola
Copy link
Collaborator

joansola commented Mar 25, 2025

The matrix Q is not rendering on Firefox, and the vector tau is a row vector.

image

@joansola
Copy link
Collaborator

Same happens in:

Ubuntu Firefox
MacOS Firefox
MacOS Safari

so it's maybe a GitHub markdown issue.

It works fine on the vscode markdown renderer.

@joansola
Copy link
Collaborator

The bold issue is not at all essential. I just wanted to idfferentiate scalars from vectors. But we can remove them all from the greek symbols if this works.

However, I tried to do so with the matrix Q, and it did not solve the not-rendering issue.

@joansola
Copy link
Collaborator

joansola commented Mar 25, 2025

OK I got it to work.

the underscore '_' got scaped to mean "italic" and not subindex. I used "\_" instead of "_" in the matrix Q, and now it works.

I remember this happened again to me sometime in Github using mathjax.

@joansola
Copy link
Collaborator

I think this is not a neat solution, but it renders OK on firefox now.

It does not render well in vscode (now the underscore is visible, and the symbols are not sub-indexed), but htis is tolerable.

I doubt whether to validate this PR or not. What do you think? Any chance of having these underscores correctly interpreted by Github and/or mathjax?

@joansola
Copy link
Collaborator

Oh, one thing to try (I have no time now):

the underscore issue happens when there are two underscores in one same line, since someone there interprets what's in between as an italics indicator.

Therefore, the solution is to breat the code of the matrix Q into a lot of different lines, each one containing only one underscore:

[...]
Q_xx &
Q_xy &
Q_xz \\
Q_yx &
[...]

etc

@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

The solution for this particular equation is to use the ```math ``` block instead of $$ $$.
I switched to double dollars because the math environment isn't recognised by the markdown engine of the doc website.
Let me fix this equation then I'll merge.

Edit: Your last suggestion doesn't work unfortunately.

@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

I finally came across another workaround, using a trailing space after the underscore as suggested here. This renders fine on gh, vscode and the doc website.

@artivis
Copy link
Owner Author

artivis commented Mar 25, 2025

The matrix Q renders fine now, I'm merging this PR.

@artivis artivis merged commit 6935c9a into fix/doc Mar 25, 2025
3 checks passed
@artivis artivis deleted the fix/equations branch March 25, 2025 18:12
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

Successfully merging this pull request may close these issues.

2 participants