obsidian-latex-suite icon indicating copy to clipboard operation
obsidian-latex-suite copied to clipboard

Better Concealing

Open vreithinger opened this issue 1 year ago • 2 comments

First of all let me thank you for this awesome plugin. I have a few questions regarding the concealing of the latex code

  1. I noticed that \overline{x} does not render to x̄. In fact, only very few overlined letters (i suspect the ones who have a single unicode letter corresponding to it) render in the concealed mode. It should be theoretically possible to render every possible overlined character as unicode is stackable (so even greek ones and fat ones and so on). Same goes for dotted / double dotted / hat and so on.
  2. is it possible to have \frac{a}{b} simply render to a/b? If the fraction is larger it could render with brackets like {...}/{...}
  3. A little thing: is it possible to have \, and \: and \; just render to [space]? I think it would make the concealed view even easier to read

vreithinger avatar Jul 04 '22 19:07 vreithinger

only very few overlined letters (i suspect the ones who have a single unicode letter corresponding to it) render in the concealed mode. It should be theoretically possible to render every possible overlined character as unicode is stackable (so even greek ones and fat ones and so on).

Yes, that's correct! Only letters that have a corresponding unicode character with a bar get concealed. I'll look into stacking unicode characters; I wasn't aware that overlines etc were stackable. Thank you for the tip!

  1. is it possible to have \frac{a}{b} simply render to a/b? If the fraction is larger it could render with brackets like (...)/(...)

Yep, I can try to add this in a future version. There's some discussion of this in #22.

  1. A little thing: is it possible to have , and : and ; just render to [space]? I think it would make the concealed view even easier to read

Good idea, I'll add this in the next release.

artisticat1 avatar Jul 04 '22 22:07 artisticat1

Thank you so much for the fast reply! Sounds good, im looking forward to the next release :)

vreithinger avatar Jul 05 '22 11:07 vreithinger

Fractions are now concealed in 1.4.5.

artisticat1 avatar Sep 18 '22 12:09 artisticat1

Fractions are now concealed in 1.4.5.

What theme are you using? The concealed code are quite wired in my case, and I thingk maybe this is caused by the theme.

thudjx avatar Oct 09 '22 03:10 thudjx

What theme are you using? The concealed code are quite wired in my case, and I thingk maybe this is caused by the theme.

This is the default theme in Obsidian v0.15. Can you share a screenshot showing the problem and the LaTeX source code behind it?

artisticat1 avatar Oct 09 '22 10:10 artisticat1

Can you share a screenshot showing the problem and the LaTeX source code behind it? image The powers in the first line is written as ^{2} while in the second line ^2.

thudjx avatar Oct 09 '22 12:10 thudjx

Moving to a new issue (#62).

artisticat1 avatar Oct 09 '22 15:10 artisticat1