- Twitter: @0xThePapercut
0xpapercut / obsidian-wypst Goto Github PK
View Code? Open in Web Editor NEWHigh quality rendering of Typst in Obsidian, powered by wypst.
License: MIT License
High quality rendering of Typst in Obsidian, powered by wypst.
License: MIT License
Hey,
the plugin doesn't work correctly with rtl text. It does show it as rtl, but as far as math concerned it's ltr :)
It would be nice if wypst could have syntax for an explicitly typst inline or display equation, like the asciimath plugin. Then, rendering all equations as typst could be optional behavior.
Is there any feature planned similar to the preamble one of obsidian-typst?
My use case is to add the physica package, required for most of the math in physics.
Thanks for this nice plugin ๐
Hi! I love this plugin and how easy it is to use without requiring any complicated settings!! โค๏ธ
I'm encountering an issue though: using multiline math like
$$
Q = rho A v + "time offset"
$$
causes
to be displayed. I usually format bigger math like described above, so it would be awesome if this plugin could support it :)
Any chance for making this plugin render code blocks and not only equations?
I want my files to be rendered outside obsidian and the math syntax can lead to problems with mathjax and things like that.
Just to be clear, I want to write all the equations in typst code blocks. For example:
f(x) = 8x^2 + 3x
Obsidian version: v1.5.12
Obsidian-wypst version: 0.0.3
Calling text()
in a wypst-math-block causes text not to be rendered if the fill
argument is passed.
How to recreate:
$text("n", fill: #rgb("#00ff00"))$
Expected result:
A green letter 'n'
Result:
The letter is not rendered
I have an existing vault full of LaTeX, and a great deal of LaTeX equations fail to render with this plugin enabled. The main issue I've noticed is that latex allows
If possible, it would be best for Wypst to fallback to LaTeX when a variable is not found, or perhaps any time there is an error rendering the equation.
None of the examples from Typst documentation work.
A simple example generates nothing and produces no error messages:
#grid(
columns: 5,
gutter: 5pt,
..range(25).map(str)
)
The tiger example and the chessboard example give an error message of 'expected semicolon or line break':
// We use `rect` to emphasize the
// area of cells.
#set rect(
inset: 8pt,
fill: rgb("e4e5ea"),
width: 100%,
)
#grid(
columns: (60pt, 1fr, 2fr),
rows: (auto, 60pt),
gutter: 3pt,
rect[Fixed width, auto height],
rect[1/3 of the remains],
rect[2/3 of the remains],
rect(height: 100%)[Fixed height],
grid.cell(
colspan: 2,
image("tiger.jpg", width: 100%),
),
)
#set text(15pt, font: "Noto Sans Symbols 2")
#show regex("[โ-โ๏ธ]"): set text(fill: rgb("21212A"))
#show regex("[โ-โ]"): set text(fill: rgb("111015"))
#grid(
fill: (x, y) => rgb(
if calc.odd(x + y) { "EFF0F3" }
else { "7F8396" }
),
columns: (1em,) * 8,
rows: 1em,
align: center + horizon,
[โ], [โ], [โ], [โ], [โ], [โ], [โ], [โ],
[โ], [โ], [โ], [โ], [], [โ], [โ], [โ],
grid.cell(
x: 4, y: 3,
stroke: blue.transparentize(60%)
)[โ],
..(grid.cell(y: 6)[โ],) * 8,
..([โ], [โ], [โ], [โ], [โ], [โ], [โ], [โ])
.map(grid.cell.with(y: 7)),
)
removing the first three lines (#set... #show...) gives an error of 'type color has no method transparentize
'.
Removing .transparentize(60%)
then gives an error of 'function grid does not contain field
cell`'.
Perhaps a separate ticket but none of the table examples in table documentation seem to work, either.
Thank you!
Finally! After looking for latex/typst plugins for obsidian, I found something that WORKS.
(now three) small issues:
Both 1,3 can be "fixed" by inserting an empty/space only string
Obsidian version: v1.5.12
Obsidian-wypst version: 0.0.3
Vectors that contain more than one non-numeric character in any component cause a "RuntimeError: unreachable"
Vectors that contain purely digits are fine, e.g. vec(111,222)
Vectors that contain single non-numeric characters per component also work fine, e.g. vec(n,k)
The problem arises when there are multiple such characters in a component (or a digit + non-numeric).
Examples:
vec(2, 2x)
vec(2, 2-1)
vec(2, n-k)
vec(2, [n])
vec(2, n!)
All result in "Runtime Error: Unreachable"
However, something like
vec(2, n_2)
dots.v
does not cause the error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.