Using Unicode in README.md file?

If I look at the README at this website: GitHub - baggepinnen/TrajectoryLimiters.jl: Nonlinear filters to create dynamically feasible reference trajectories with Firefox the unicode characters are very distorted and hardly readable. Example:

This is supposed to be \dot{x}_M and \ddot{x}_M. This problem is much smaller when using Chrome, but still exists:

In Chrome, only the dots are shifted a bit to the right, but you can at least understand what is meant.

What is the suggested way to use Unicode in a README.md file?

Of course it is possible to use LaTeX $\dot{x}_M$ and $\ddot{x}_M$, but that does not render on JuliaHub and it is also not an option in the source code examples.

1 Like

I would use LaTeX, renders nice on GitHub and even when you include it in your docs. Sure JuliaHub does not have MathJax/KaTeX running, but isn‘t their their problem and not yours?

Do you have a use case for code examples? If that’s quarto (or Literate) in the docs or Pluto they would render LaTeX as well in their Markdown.
In comments in code I would maybe do less math, sure; In doc strings I heavily use math, though on REPL that sometimes doe not look that nice.

1 Like

The rendering is determined by your browser and font, so you probably need a better font if you want better rendering.

(But for equations I would just use LaTeX now that GitHub supports it.)

3 Likes

I already installed extra fonts which did not help:

@baggepinnen Any comment?

I have already given you my comment in the issue and PR you opened.

So for now my conclusion is, do NOT use Unicode characters in Julia code or in README.md without checking their readability on Github in the browser. I think most Greek letters are no problem. but variables like \dot{X} should be avoided.

1 Like

2 posts were split to a new topic: Complications of diacritical marks in Unicode