You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: combine latex virtual lines use center positioning
## Details
Request: #520
This is a fairly substantial re-work of how latex formulas ultimately
get rendered.
The first major change is now, regardless of positioning, we will
attempt to combine virtual lines related to latex formulas. This means
for instance if the position is set to `above`, there are 3 formulas on
a particular row, and each of them renders as 3 lines, these will get
padded and combined together such that only 3 virtual lines are added to
show all the formulas, rather than 3 lines each, producing 9 hard to
follow virtual lines. This is possible thanks to the recent changes that
allow us to process all the nodes at once and do a row level ordering.
The second change is the addition of the `center` position value, which
is also the new default. When this is set virtual lines flow through the
actual text. What this means is if a formula is rendered as 3 lines, one
virtual line will be added above, one virtual line will be added below,
and the center line will be inlined into the actual text. This makes the
rendering feel much more like it is part of the document rather than
entirely separate. This is only possible if the underlying latex nodes
are a single line exactly. Once you have multi-line nodes we end up with
much more edge cases, so multi-line nodes are rendered using the `above`
value if `center` is set. If the position is set to `above` or `below`
then no override happens.
The `latex.virtual` parameter has been removed, as it is now redundant.
Users who set a position of `above` or `below` will always get only
virtual lines so there is no need for the additional setting. It is now
the case that only the `center` position is capable of any amount of
inline rendering, and again, it is limited to single line equations
only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,15 @@
2
2
3
3
## Pre-release
4
4
5
+
### Features
6
+
7
+
- remove delimiters around latex text before converting [2c6cf12](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/2c6cf127c577712bd29d38f6391b3045c5f0180a)
- use display width of concealed ranges [b4885a9](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/b4885a95e5082a6ed164830c581aac257a74f355)
0 commit comments