intro & usecase
im sure many people here (especially yall nerds) know abt latex, but just in case you dont, latex is a system used to typset math (and other documents ig), and is rly widely used! if you see math typeset into a document online, theres an extremely high chance that it was typeset using latex
but latex has one key issue to me; its OLD. it was initially release 41 years ago and its age definitely shows. its annoying to get certain things i need to use (vectors, matrices, and integral signs), looks awful by default, and simultaneously does both too much and too little
so, in comes typst, the newfanlged tool for typesetting documents! it really feels like the new version of latex, and it fixes... basically all the issues ive had with latex in the past few years of using it?
however, before you go and switch everything over and write your doctorate thesis in typst on the opinion of one girl, keep in mind that typst is still in beta! it isn't a good idea to use it for ANY important documents!
with that being said, what is my usecase? well, in high school im in multivariable calculus, equivalent to calculus 3 in most colleges. we learn about multiple integration, vector fields, partial derivatives, etc., so all of the symbols used in calculus are extremely important to my notes. additionally, i study linear algebra on my own, so representing vectors and matrices is also nice to have.
with that out of the way, heres my comparison of the two, and why i strongly prefer typst!
alternate coordinate systems & symbol representation
we cover 2 different coordinate systems in our class; cylindrical and spherical coordinates. for anyone unfamiliar, cylindrical coordinates are an extension of polar coordinates into 3d space, and the coordinates are (r, θ, z). spherical coordinates are an evil coordinate system used to torture SPECIFICALLY ME where the coordinates are (ρ, θ, ɸ).
so! to test out the typesetting, lets just define the rules for converting from these systems to cartesian coordinates.
seeing how theyre actually typeset, they look fairly similar! (latex on top, typst the bottom)


now, personally i still prefer the typst typsetting, but they are fairly similar.
not so in the code!
typst's code is really nice and simple,
$ x &= r cos theta \
y &= r sin theta \
z &= z $
$ x &= rho sin phi cos theta \
y &= rho sin phi sin theta \
z &= rho cos phi $
y &= r sin theta \
z &= z $
$ x &= rho sin phi cos theta \
y &= rho sin phi sin theta \
z &= rho cos phi $
while latex's code is... something?
$$\begin{align}
x &= r \cos \theta \\
y &= r \sin \theta \\
z &= z
\end{align}$$
$$\begin{align}
x &= \rho \sin \varphi \cos \theta \\
y &= \rho \sin \varphi \sin \theta \\
z &= \rho \cos \varphi
\end{align}$$
x &= r \cos \theta \\
y &= r \sin \theta \\
z &= z
\end{align}$$
$$\begin{align}
x &= \rho \sin \varphi \cos \theta \\
y &= \rho \sin \varphi \sin \theta \\
z &= \rho \cos \varphi
\end{align}$$
now, lets take a second to really look at latex's code. first, the align sections aren't even in there by default, you need to import amsmath just to be able to align equations with each other! i wouldve thought thats a default at this point! and, the more widely used version of phi is marked as a variant, \varphi! now, this is obviously personal preference, but i almost always see people using \varphi, so its very nice that typst treats it as the default!
now, this may seem a little unfair if youre a latex meatrider, but i get it! so lets look at something far, far worse.
vectors and cross products
assume the evil wizard of math and 3d spaces curses you with having to find the vector orthogonal to two other vectors, u and v. oh dear! thankfully, oliver heaviside comes to the rescue with the cross product!
again, comparing the outcome when typeset, they look nearly identical!


but, the code here is where it gets really interesting, and really nasty for latex.
lets start with clean, beautiful typst!
$ mat(u_2, u_3; v_2, v_3) bold(i) - mat(u_1, u_3; v_1, v_3) bold(j) + mat(u_1, u_2; v_1, v_3) bold(k) $
how beautiful. i might even shed a tear.
latex... children under 13, anyone with a heart condition, and anyone who doesnt like horror should avert their eyes.
$$\begin{vmatrix}
u_2 & u_3 \\
v_2 & v_3
\end{vmatrix} \textbf{i} - \begin{vmatrix}
u_1 & u_3 \\
v_1 & v_3
\end{vmatrix} \textbf{j} + \begin{vmatrix}
u_1 & u_2 \\
v_1 & v_3
\end{vmatrix} \textbf{k}$$
u_2 & u_3 \\
v_2 & v_3
\end{vmatrix} \textbf{i} - \begin{vmatrix}
u_1 & u_3 \\
v_1 & v_3
\end{vmatrix} \textbf{j} + \begin{vmatrix}
u_1 & u_2 \\
v_1 & v_3
\end{vmatrix} \textbf{k}$$
now. im sure theres another way to do this thats nicer. but i dont know that way! and the typst way was right there, and was so, so nice! the way sections work in latex really hinder it, since instead of being able to make functions that align things, or give limits, or have matrices, latex has to use these sections, which really bloat up the code.
and now... the real issues i have with latex. integrals and (partial) derivatives.
triple integrals over a region
now, im not going to explain triple integrals because frankly, i cant think of anything funny to say. moreover, im only going to include a picture from latex, since they look nearly identical.

and for once, the code for latex is shorter! but.. that doesn't mean its nicer.
\iiint \limits_Q dV
personally, im not a fan at all of multiple integrals being indicated with multiple is at the start of the command, its... really easy to get confused? especially when your font is small, its really difficult to tell \iint and \iiint apart, especially if theres a lot of them near each other.
on the other hand, typst handles this in a much nicer way
limits(integral.triple)_Q d V
this absolutely is longer than latex's solution but, its significantly easier to read! you can tell that the limits function applies to the integral, and the triple integral is clearly indicated with the .triple suffix.
line integrals and greens theorem
oh darn! the grass isnt greener in haney-land (ultra-niche reference), but luckily, we can fix that! oh no... we need to find the area inside of a piecewise, positively-oriented, smooth, closed curve where the area enclosed by said curve is the region D. thank GOD in this highly realistic scenario, we have greens theorem to make haney-land green again! too bad, never liked that place.
so! heres the equation.

so, in latex, its
\oint_C Mdx + Ndy = \iint \limits_R \left( \frac{\partial N}{\partial x} - \frac{\partial M}{\partial y} \right) dA
big thumbs down! real fucked up i reckon. especially not a fan of how you need to specifically mark the left and right sides of parentheses, or how you need to fully write out \partial.
in typst, we get a beautiful little solution!
integral.cont_C M d x + N d y = limits(integral.double)_R (frac(diff N, diff x) - frac(diff M, diff y)) d A
notice that M d x and any other sequence of letters get separated. this is really annoying, and its just a side effect of typst not having every command preceded with a \, which means that any sequence of letters is interpreted as a command or a symbol. but still, you can see how straight forward typst is compared to latex, its super evident what everything is doing.
now, lets do something thatll really push these systems to their limits.
jacobians and change of variables
so theres this guy. carl gustav jacob jacobi. and he realizes, shit! i wanna change one variable system to another. i cant think of any fun introduction for this, so lets just get on with it.

this one... is really bad in latex (also yes i realize i forgot a closing parentheses i dont wanna redo it)
\iint \limits_R f(x,y)\ dA = \iint \limits_S f(g(u,v),h(u,v)) \begin{vmatrix} \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\ \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v}\end{vmatrix}\ dA
holy fuck! holy fucking yap session! now, lets see the beautiful code that typst has...
limits(integral.double)_R f(x,y) d A = limits(integral.double)_S f(g(u,v),h(u,v)) mat(frac(diff x, diff u), frac(diff x, diff v); frac(diff y, diff u), frac(diff y, diff v)) d A
still pretty long and hard to read, but i think its definitely much easier to read than the latex's way of doing it!
conclusion
in terms of clarity and readability, i think there really isnt any competition between the two, typst is so, so much easier to read than latex, and there are also a lot more symbols to use, which i didnt even cover here!
when it comes to styling, im not too sure how they compare. i dont do styling in either, and it really doesnt matter to me! but im sure you can do basically the same thing in whichever you want, so thats more personal preference.
buuut... the major benefit of latex is support and age. latex is so widely supported and has so many different resources to use, and is overall much easier to learn, and since there are a lot of online templates made by other people, you can make anything you want a lot easier.
still, i prefer typst over latex. i make my own templates, and really only take simple notes, so it doesnt matter too much how styling is.
if you want to see a real example of my math notes, you can check out my most recent ones here! hopefully you learn something abt math there hehe
thank u for reading my post!!! if yall want any of my templates or math notes, just let me know!
Comments
Displaying 0 of 0 comments ( View all | Add Comment )