peele / plantuml-preview

Atom package.
MIT License
23 stars 13 forks source link

Support @startmath/@endmath and @startlatex/@endlatex #34

Closed peele closed 7 years ago

peele commented 7 years ago

Support the UML start and end tags related to math rendering for multipage handling. This was found while looking into #33.

Example, this UML only results in 3 images displayed in the preview pane

@startuml
:<math>int_0^1f(x)dx</math>;
:<math>x^2+y_1+z_12^34</math>;
note right
Try also
<math>d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h</math>
<latex>P(y|\mathbf{x}) \mbox{ or } f(\mathbf{x})+\epsilon</latex>
end note
@enduml

@startuml
Bob -> Alice : Can you solve: <math>ax^2+bx+c=0</math>
Alice --> Bob: <math>x = (-b+-sqrt(b^2-4ac))/(2a)</math>
@enduml

@startmath
f(t)=(a_0)/2 + sum_(n=1)^ooa_ncos((npit)/L)+sum_(n=1)^oo b_n\ sin((npit)/L)
@endmath

@startlatex
\sum_{i=0}^{n-1} (a_i + b_i^2)
@endlatex