Comments (10)
This is definitely a feature that should be prioritised. I'm not sure if the Java library I ported from handled this at all (actually there were two Java libraries; one for plain TeX and one for LaTeX), but it's worth a check. If not, having a look at the LaTeX source code may be informative.
from xaml-math.
I think that we'll need to store brace stack somewhere when interpreting the formula, and try to keep size of the matching braces equal. Note that different braces could match each one. E.g. \left< \frac{a}{\frac{b}{c}} \right\}
should be rendered as .
Here's a good explanation of so-called "extensible delimiters" on StackExchange: http://tex.stackexchange.com/a/77593/109147
from xaml-math.
Aha, it seems like jlatexmath have support for \left
and \right
.
from xaml-math.
Just dumping what I've found regarding this task so far.
It seems that we have the atom definition for the brace-enclosed formula; it's called FencedAtom
.
It looks like that FencedAtom
isn't used in the current code, but it could be exactly what we need. I plan to add the support for \left
and \right
commands into TexFormulaParser.ProcessCommand
method. It seems like that won't be very hard: just parse the formula part before the corresponding \right
command and enclose it in FencedAtom
(probably we'll want to keep that stack somewhere; we'll see).
I also want to add unit tests for the parser; I'll file another issue about that.
from xaml-math.
Good work on this. I haven't looked at the implementation yet, but I'm slightly concerned that most of the brackets are implemented except for \left|
. Did you not do this in a generic way?
from xaml-math.
Ah, that's a long story. My initial implementation had some flaws, and I thought there were problems with \left|
. Actually there're none.
The delimiters are implemented in a generic way (because there's already a metadata on delimiters), \left|
is working. I'll mark it now.
\left.
and \right.
aren't working currently exactly because there aren't any metadata about them. I think we'll handle them in a special way or simple declare as proper delimiters; will decide later.
from xaml-math.
Oh, right. Fair enough then!
from xaml-math.
I just noticed that \left|
and \right|
still don't work.
from xaml-math.
Oh, that's interesting. |
is considered as an opening delimiter only. Look:
from xaml-math.
Good spot. That was definitely the problem.
from xaml-math.
Related Issues (20)
- Alignment issue in matrix with an empty cell. HOT 1
- Padding is not respected with `\cases`
- Add support for \bigl, \bigr and friends
- Selection highlighting is broken in WPF HOT 1
- The logic in HorizontalBox.Add is broken HOT 2
- Box and derived type should be immutable HOT 1
- How to use SetBackground HOT 3
- Equation with cases
- Changing font has no effect HOT 4
- Crash on typing `\left\{\matrix{}\right\}`
- Allow overriding font for letters in math mode
- Block height for `\text`
- The new update: unknown error HOT 6
- Padding and Background HOT 9
- Size for a matrix doesn't get properly determined on exporting to image HOT 1
- Vectorize the output image (feature request) HOT 2
- Support for WinUI? HOT 1
- Split Fraction HOT 1
- Commutator Diagrams HOT 1
- Align matrix equation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xaml-math.