Closed heinrich26 closed 1 year ago
Hi, thanks for reporting this. Unfortunately, I couldn't see any problems in my quick test:
Thank you in advance!
One possibility is that the debug mode (especially "Disable atomic ranges") might be turned on.
If your settings look like this, it's fine:
Sorry, I should've been more clear ^^. As seen in your clip, the columns don't align anymore, that's my issue.
.cm-s-obsidian .HyperMD-table-row .cm-math {
font-size: inherit;
}
I'd want it to format to (look) exactly this: (of course keeping the ghost braces, just didn't bother writing them here)
| $E_{kin} = e \cdot U$ in $\text{eV}$ | 8 | 7 |
| -------------------------------------------- | --- | ---- |
| Wellenlänge $\lambda$ in $10^{-9}\ \text{m}$ | 120 | 133 |
| Frequenz $f$ in $10^{15}\ \text{Hz}$ | 2.5 | 2.26 |
| Auslösearbeit | | 4.16 |
however, it'll look like this:
| ${} E_{kin} = e \cdot U$ in ${} \text{eV} {}$ | 8 | 7 |
| ----------------------------------------------------- | --- | ---- |
| Wellenlänge ${} \lambda$ in ${} 10^{-9}\ \text{m} {}$ | 120 | 133 |
| Frequenz $f$ in ${} 10^{15}\ \text{Hz}$ | 2.5 | 2.26 |
| Auslösearbeit | | 4.16 |
(the placement of ghost braces is also a bit strange there, but I don't mind...)
and being rendered as:
| $E_{kin} = e \cdot U$ in $\text{eV}$ | 8 | 7 |
| ----------------------------------------------------- | --- | ---- |
| Wellenlänge $\lambda$ in $10^{-9}\ \text{m}$ | 120 | 133 |
| Frequenz $f$ in $10^{15}\ \text{Hz}$ | 2.5 | 2.26 |
| Auslösearbeit | | 4.16 |
(this looks bad)
which shows that it counts {}$
as 4 chars instead of 1.
Ahh thanks for elaborating, I got it now.
As you might expect, I don't think this is something fixable within this plugin.
As you know, this plugin presents ${}
as if it were a single character $
, but this hack only affects the UI and doesn't affect the actual/raw content of the note. And the Advanced Tables plugin seems to only care the actual content.
It seems that the only possibility is to sending a PR to Advanced Tables that patches this issue, although it's unclear whether they accept such a modification specific to this (pretty minor) plugin.
I might be able to find time to do that in the future, but I can't say when. If this problem is urgent for you, I'm sorry to say this but fixing it yourself may be the quickest solution.
Another workaround: simply disabling this plugin's feature inside tables. This seems to be doable within this plugin. What do you think? One thing to note is that essentially the same problem still remains even if this comes true because Advanced Tables doesn't care whether $
is hidden or not.
For example, this table
| col | col2 |
| --- | ---- |
| $a$ | $b$ |
is rendered like this even when this plugin is not installed:
Edit: If you're using Source mode, this won't be a problem
Released as 0.1.4. This is the best that I can do in a short term.
Very nice, thanks alot ;)
Your hack to count the ${}... as one does not work inside tables/with the advanced tables plugin, thus formatting tables doesn't work anymore. You might want to look into advanced tables for a PR there to work arround this.