Comments (10)
I think I managed to create a control that can render the formula control with normal text, but a lot of the features are still under development. I Would push it when it is quite decent.
from xaml-math.
Yes, that's right. Today WPF-Math doesn't help much with formatting whole TeX documents within WPF forms or documents.
I believe that FlowDocument
is the way to go, but I'd like someone (probably myself) to conduct more research on that, and maybe even implement some simple prototype. I still don't know what changes that'll require, and we need to ascertain that before doing anything.
from xaml-math.
I think this would be beyond the scope of the project. It would be great if someone implements this, but I think it's a big project, and probably best we stay clear of it for now.
from xaml-math.
I've looked at the FlowDocument tag a bit and it turns out adding WPF-Math is really not that hard, if you can accept not being able to use the standard <border>
section of the example with the following:
<Border Margin="10,0,10,10" BorderBrush="LightGray" BorderThickness="1" Grid.Row="3" Grid.Column="0">
<FlowDocumentScrollViewer>
<FlowDocument>
<Paragraph>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce faucibus odio arcu, luctus vestibulum tortor congue in. Lorem ipsum dolor sit amet, consectetur,
<InlineUIContainer BaselineAlignment="TextBottom">
<controls:FormulaControl x:Name="formula1" Formula="\sum d\theta = \tan^{-1}\theta+C" Scale="12" SnapsToDevicePixels="True"/>
</InlineUIContainer>
adipiscing elit. Fusce nec lacinia neque. Donec malesuada, ligula non vestibulum cursus, urna purus pellentesque orci,
aliquet accumsan dui velit ac justo.
</Paragraph>
<BlockUIContainer>
<controls:FormulaControl x:Name="formula" Formula="L = \int_a^b \sqrt[4]{ \left| \sum_{i,j=1}^ng_{ij}\left(\gamma(t)\right) \left[\frac{d}{dt}x^i\circ\gamma(t) \right] \left{\frac{d}{dt}x^j\circ\gamma(t) \right} \right|}dt" Scale="12" SnapsToDevicePixels="True"/>
</BlockUIContainer>
<Paragraph>
Nulla vitae suscipit tellus. Nunc sit amet tortor fermentum, sollicitudin enim cursus, sagittis lacus. Pellentesque tincidunt massa nisl, nec tempor nulla
consequat a. Proin pharetra neque vel dolor congue, at condimentum arcu varius. Sed vel luctus enim. Curabitur eleifend dui et arcu faucibus, sit amet
vulputate libero suscipit.
</Paragraph>
</FlowDocument>
</FlowDocumentScrollViewer>
</Border>
You actually get something that looks decent. The problem with the inline container is that the baseline, of course, is off. So essentially, what's needed, is a way to switch between the normal and in-line rendering of the formula.
Loving this project. Wish there was a way I could contribute in a meaningful way. Trying to get into the code, but it's a slow process :)
from xaml-math.
Okay, well maybe we could created a contrib repository and put your control there, if you get it working a bit more smoothly. :) It's been a long time since I did anything with flow documents, but that's good you've made some initial success.
from xaml-math.
On the topic of inline vs. display. How are these things handled by existing TeX parsers? Are there two character sets or is the existing character set adjusted to a different environment?
from xaml-math.
@alexreg I don't think we need to split our project into more fragments at the moment. If we can have a decent and non-intrusive solution to use WPF-Math in <FlowDocument>
context, I'll vote to accept such contribution and include in into the main code base.
Side note: I'll be absent from March 23rd to 24th on a small scientific trip; I hope you'll be fine here guys 😄
from xaml-math.
Hmm, well it's your decision @ForNeVeR, but I think it should at the least be in a separate VSproj, if not a separate repository.
from xaml-math.
I would very much ask you to please create a separate branch for that.
from xaml-math.
I will
from xaml-math.
Related Issues (20)
- 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
- Support for lines between columns and rows in matrices
- Test failures on CI: The process cannot access the file `XamlMath.Shared.net462.tmp.cs` because it is being used by another process
- Matrix should align its items with the baseline, not the total box
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.