Thanks! The main thing that I had difficulty with, which you can see from the typst source, is the rendering and spacing around inline math symbols. They are rendered as SVGs, which is fine but then copying them doesn't work. Their spacing is sometimes unpredictable so I'll add something like $thick x + y$ to pad on the left hand side. I'm not sure what parts of the math symbol contribute to the dimensions of the SVG and I'm sure it's rather complex, but other than that the experience has been solid.
It's very much worth it, but absolutely not necessary. You can always generate images/figures beforehand and include them in Typst. There are also packages for various styles of diagrams, e.g. diagraph ships with a Graphviz renderer.
There is also CeTZ, which this article uses. It is highly inspired by TikZ and is just as powerful.
Looking at the "mock" document (https://github.com/iamgio/quarkdown/tree/main/mock) which is supposed to be a comprehensive and detailed guide for all visual elements, I don't see ways of getting anything other than basic markdown tables. How do you get merged cells? Cell formatting? Typst has some nice ways of implementing sophisticated grids and tables.
Also how do you implement things like different page numbering for front matter content and the main content? In general, the "simplicity" of markdown seems to be taking away a lot of granular control that people use LaTeX and Typst for.
This is so powerful, it makes me wonder why they didn't just make a new markdowny syntax for Latex so they could reuse everything from the Latex ecosystem. A bit like what CoffeeScript was for JavaScript, I mean.
That assumes that the only issue with LaTeX is its syntax. Other issues I can think of are that LaTeX doesn't generate HTML and that LaTeX is completely Unicode-disabled.
How do the science and math papers use characters that aren't in... ASCII? Maybe I need to look at an ASCII chart.
Out of curiosity, isn't UTF implementation much easier now than it has been? I piddle in writing things and I rarely contemplate UTF. Once I tried to reverse engineer an encryption plugin that used Asiatic characters as the ciphertext, and I wanted to use emoji, and that was when I learned I am too dumb to understand utf. But there's libiconv, which I first saw in production (ICQ or aim or Trillian or so) over 22 years ago, personally.
So is the latex thing obstinance, technical, or political?
Sorry you need to catch up! The latest LaTeX engines (LuaLaTeX) can even do unicode math! But yes the Unicode spec s not something one can understand in a few hours.
Other incorrect statement is that LaTeX cannot generate HTML. There is number of projects for LaTeX to HTML conversion (TeX4ht, Lwarp, LaTeXML), also Pandoc can convert subset of LaTeX to HTML.
Absolutely; One should also keep in mind why do you need the HTML, drop the pdf file on Google drive, and it will serve it fine, no webservers can limit who can see it, no friction for authorizations etc. Granted difficult to view on a mobile, but who can really do serious reading of a paper on mobile?
OK so either you're confirming that LaTeX is useless for anyone who actually needs to generate HTML and not PDF, or you're implying that nobody ever needs to use HTML and the whole Internet should just be PDFs?
I'm confused. Your first sentence implies that LaTeX can generate HTML and then you process to list other projects that you need. This whole thread is about an alternative to LaTeX which can actually genuinely just output HTML.
HN is fickle, it'll revert, faster if you don't mention it.
I have a couple of "proprietary" pipelines that I'd love to replace, and this also gave me an idea.
For instance when I want to publish a screenshot from windows to my fediverse homeserver, I want it to be as few kilobytes as possible, as I've run a homeserver and the storage needs are obnoxious, so I do my part. Windows takes massive screenshots, embarrassing even by windows 95 bitmap screenshot standards. So win+shift+s, crop selection, win - ms <enter>, shift+insert, ctrl+shift+x, file->save as JPEG, name, enter.
As few as three years ago if I cropped right I could paste the clipboard JPEG and all was well. It doesn't take me long but every time I do it I get three more grey hairs. And I take a lot of screenshots. 2,209 in my screenshot folder. did you know windows saves all your screenshots? they used to be ephemeral.
anyhow i have a bunch of screwy things similar to but not as "simple" as that example. Audio work, text work, data manipulation.
Maybe look at Quarto? Almost every project I start now begins with `quarto project create`. From there I can pivot the material into HTML, .docx, PDF, .PPTX, Typst, LaTeX, and all of them simultaneously.
VSCode and RStudio Desktop both have visual editor components, although they are not perfect. Positron is another editor that is data science specific built on top of VSCode that has Quarto rendering support.
There isn't an 'on-the-fly' rendering component for Quarto per se, but using the preview mode it will re-render a preview watching for file changes. A nice GUI editor for Quarto is definitely something people have been asking for. Closest equivalent would probably be Overleaf or Typst web editors?
I guess that the similarity of the names come from different places, and in this case might be a remembrance of QuarkXPress. It's convergent evolution! :D
I guessed the name derived as follows: Quarks as the smallest particles, a view in most detail, the building blocks of things. Typesetting as the lowest level of abstraction for creating a document, "down" from Markdown.
People may not know it but at some point in the nineties you'd enter a bookstore and 95%+ of all the books and magazines were typeset using QuarkXPress.
Then Adobe's InDesign showed up in 1999 and things began to change.
FWIW I both wrote and typeset books myself (for a traditional publisher): I did most of them using QuarkXPress but I managed to sneak one I made with LaTeX (it was a hard sell to the publisher / printing press guys who were only ever using QuarkXPress). Also I was forced to heavily modify LaTeX templates to match exactly the one the publisher was using with QuarkXPress.
So yup when I read "Quarkdown is a modern Markdown-based typetting system" the first thing I think about is QuarkXPress: great memories of MacOS (8? then 9?, pre OS X for sure) and my Sony Trinitron monitor.
Was going to ask the same question. Was talking to a friend just 2 days ago who redid all his lecture scripts with quarto and embedded the lecture presentations. Looked neat. Also that quarto interacts well with R studio and jupyter notebooks comes as a big plus.
Is this standalone, as in: an actual file format people can use? From their website it looks like it won't work without using their service or hosting something yourself?
I like it for what it is, a layer on top of markdown. That said, the main usage of markdown for me is that it's just the content and it doesn't have any opinions on the layout let alone logic.
I can add those with the use of css/js for web and interpreters and themes for print/non web.
I would like to have a compiled demo PDF available for download, along with a direct comparison of the same paper created in LaTeX. I would like to see the differences both on screen and in print.
If the LLM's are starting to output Quarkdown by default - even just one provider (like OpenAI), this will catch on like wildfire. The limitations of Markdown is getting a bit old.
The syntax feels complicated. Maybe I just don't have enough patience for learning a typesetting syntax (I never worked with Latex before).
On top of that, there is no easy way to create a template. For example, I want an invoice template which I can reuse with different data. Theoretically, I can create a typ file for the template, and define the invoice as a function which I then call from a string with, say, json data. It seems great as web service, but not as a library I can use from, say, Rust.
And the type system is a bit confusing. I can define basic types like numbers or string, but when it comes to structs, they don't seem to have support for that.
I find it easier to create a handlebars template, and feed the HTML to headless chrome printing service, which will output a PDF for me. It's not scalable for high volume, but good enough for my needs (takes about 2-3 seconds to generate PDF).
> On top of that, there is no easy way to create a template
Templates are just functions [0].
I think much of the frustration comes from typesetting being a harder problem than it seems at first. In general a typesetting system tries to abstract away how layout is recomputed depending on content.
Supporting contextual content -- cases where the content depend on other content, e.g. numbered lists, numbered figures, references, etc -- involves iterative rendering. This is evidentidly a complexity sinkhole and having a turing complete script language will bite you back when dealing with it. I recommend reding their documentation about it [1] where they explain how they propose solving this problem.
> From a technical point of view, WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF. It aims to support web standards for printing. WeasyPrint is free software made available under a BSD license.
> It is based on various libraries but not on a full rendering engine like WebKit or Gecko. The CSS layout engine is written in Python, designed for pagination, and meant to be easy to hack on.
Cool, not who you replied to but this is a cool idea, another way to archive pages. Gotta compare it to singlefile and headless chrome - I've been looking for a faster way to get a snapshot of a webpage via a chatbot (like in discord or matrix). Used to use Firefox headless, but large pages/slower sites would time out the api.
Had a chance to read the wiki/docs deeper. Quarkdown seems to use puppeteer and chrome-print-to-pdf to generate PDF from HTML [1].
So, aside from the more minimal format or Markdown compared to HTML, I don't see much appeal in quarkdown compared to feeding HTML to a headless chrome instance.
But it is a cool project if one wants to turn a bunch of markdown files to say a book or an article.
The comparison to LaTeX is a bit unfair... the latex code is much larger than it needs to, and does things that the quarkdown doesn't (like floating the figure in the page).
Once you remove that, both versions look essentially equivalent and just as readable.
The words "begin" and "end" are very readable, actually. "includegraphics" as well. Remains the aversion against backslashes. What exactly do you find less readable about them than other symbols like for example the colons or braces in Quarkdown? Or is it about the number of backslashes?
Actually, no, if markup takes more space than content, it hurts readability of the content. Especially for such common stuff like images.
But if you don't see this obvious barrier, I will unlikely be able to explain the issue with backslashes: it's partially about the number, but also visibility - .period syntax is a smart choice as it's unobtrusive and not part of the regular syntax, and it's more ergonomic to type, so a universal win.
This, Typst, etc etc are primarily typesetting systems for papers.
I would love alternatives to HTML or whatever, but I tried Typst too and it's very clear that the authors only really care about typesetting for papers and other long form prose. Stuff like forms, invoices, flyers, handouts, leaflets, business cards -- an afterthought, at best.
Edit: Actually I was thinking of Sile not Typst, but I think the same applies to Typst too. I didn't dig into Typst too much because it was commercial though.
That looks interesting, and to be fair right now I'm doing something similar... but doing headless rendering with that sort of stuff is very hard, AFAIK the standard tool for that has been abandoned now for a couple years. Also there are other issues with browsers, like creating CMYK PDFs.
The online editor is commercial. They have a github repository releasing Typst under an Apache 2.0 license for free. I installed it using cargo (Rust), and don't use the online editor.
Oh, I didn't realize that! I can't shake the feeling that the open source community engagement might cater to paying customers, but I'll need to take a closer look!
Is there any reason why you can't use Typst for any of the stuff you mentioned? I can't see why you couldn't (except for interactive forms, which is already being worked on [1]. The pdf-writer low-level backend seems to have already implemented support for form fields, so it seems like a matter of time until it is implemented in Typst).
I believe you can do those sorts of layouts in Typst (and Latex, and Sile!), but it's about how far out of the way you have to go and how much you fight the system in the process. I don't see any examples of Typst doing anything other than papers, I believe for good reason.
To be clear, I mean from a design perspective. Like take a print copy of Wired... how hard would it be to replicate any of those pages? Without using other software (aside from maybe cutting up stock photos). I can format scientific papers in HTML and it's not too hard, I can also format a cookbook, and it's not that hard. It's not great either!
Honestly, I don't think that it would be too hard. With the grid function you can do a lot of things, specially because you can use grid.cell(rowspan:3, colswap:4) to make cells that span multiple rows or columns, use fractional sizes for the columns (1fr, 2fr, etc), and add independent insets and strokes for each cell, so you can already do a lot of the things you can achieve with css flexbox.
Though I suppose the docs could include tutorials for how to use them to make a more diverse kind of documents, and adding another layout function that behaves more like flexbox would be nice (though it wouldn't be too hard to create a function that re-creates the behaviour of flexbox based on the grid function).
I found it much easier to use Typst to create any of these documents than any other software I used before. Just loading data from a JSON and incrementally regenerating the document on each change is game-changing for me.
You can use typst locally and bypass the commercial bits. It is really easy to create different kinds of documents with it. I have been using it to create slides and handouts, and for that I already find it much easier to use than the alternatives.
Look at Quarto. Markdown input, basically any output you want, including HTML, PDF, DOCX, PPTX, etc... All from the same input. Reuse text chunks, use variables, templates, and more. Then just run 'quarto render'.
My first "real" usecase for Typst was a poster [0], since it was much easier than doing it in LaTeX. It's missing some features, like wrapping around figures and flowing text between boxes, but TeX doesn't have the second either and both are planned in Typst.
> Stuff like forms, invoices, flyers, handouts, leaflets, business cards -- an afterthought, at best.
It is because you can typeset beautiful long text algorithmically and all these small forms like invoices and flyers are more graphical design than typesetting: you need to place many small elements precisely, not relative to each other but to the edges of the page / optical centers / etc. It is not very convenient without WYSIWYG. Possible, yes, but will require many trial-and-error when in WYSIWYG layout program can be done from first try.
Think about tabloids too: text, which wraps around non-rectangualr images, cut-outs, etc. Hard to do without seeing what you do, only with text and coordinates.
I don't agree. Plenty of people write HTML by hand, no WYSIWYG, often with no more than a live preview pane like Typst's.
Why isn't it easy to place something relative to the edges of a page via text? In HTML I do `padding: 2cm` and I'm done. I'd say most of design involves placing elements relative to eachother; half the constraints in GUI design tools are matching spacing or aligning to nearby elements.
I'm not saying you can do the whole thing blind, but for the odd thing that does need visual feedback, not having a convenient UI isn't a critical failure. Some of those things are hard to do in a GUI too, and having a good text based layout tool could be easier.
On the other hand, all "official-looking" documents like invoices (with complex headers and footers) I seen in HTML was ungodly mess of nested tables, not something clean and structured.
I don't say it is impossible. But looks like it is hard.
I have been generating documents for a while using https://github.com/enhuiz/eisvogel. It's nice to use markdown, but I feel really limited, and can't do much customization.
I've started using presenterm for markdown presentations. Given that markdown is just a format, a comprehensive comparison should find the tools using markdown to export to pdf and epub.
Which is where MyST [0] gets its structural cues. That's another alternative missing from the comparison table of this project, and an interesting one for how much it seems to be going for the science community that loves Jupyter notebooks.
284 comments
[ 0.23 ms ] story [ 221 ms ] threadKinda surprising that it isn't mentioned in their feature comparison matrix at all.
Post: https://ezb.io/thoughts/interaction_nets/lambda_calculus/202...
Typst source: https://github.com/enricozb/enricozb.github.io/blob/master/t...
Thanks for sharing!
There is also CeTZ, which this article uses. It is highly inspired by TikZ and is just as powerful.
It's definitely not "just as powerful", and will likely not be so for years. TikZ is an absolutely monumental work.
Also how do you implement things like different page numbering for front matter content and the main content? In general, the "simplicity" of markdown seems to be taking away a lot of granular control that people use LaTeX and Typst for.
Out of curiosity, isn't UTF implementation much easier now than it has been? I piddle in writing things and I rarely contemplate UTF. Once I tried to reverse engineer an encryption plugin that used Asiatic characters as the ciphertext, and I wanted to use emoji, and that was when I learned I am too dumb to understand utf. But there's libiconv, which I first saw in production (ICQ or aim or Trillian or so) over 22 years ago, personally.
So is the latex thing obstinance, technical, or political?
As a comparison to scripting features of Quarkdown, above uses macros plugin which enables python scripting
I see somebody else downvoted me: presumably they didn't like my excitement! I appreciate the positivity here.
I have a couple of "proprietary" pipelines that I'd love to replace, and this also gave me an idea.
For instance when I want to publish a screenshot from windows to my fediverse homeserver, I want it to be as few kilobytes as possible, as I've run a homeserver and the storage needs are obnoxious, so I do my part. Windows takes massive screenshots, embarrassing even by windows 95 bitmap screenshot standards. So win+shift+s, crop selection, win - ms <enter>, shift+insert, ctrl+shift+x, file->save as JPEG, name, enter.
As few as three years ago if I cropped right I could paste the clipboard JPEG and all was well. It doesn't take me long but every time I do it I get three more grey hairs. And I take a lot of screenshots. 2,209 in my screenshot folder. did you know windows saves all your screenshots? they used to be ephemeral.
anyhow i have a bunch of screwy things similar to but not as "simple" as that example. Audio work, text work, data manipulation.
There isn't an 'on-the-fly' rendering component for Quarto per se, but using the preview mode it will re-render a preview watching for file changes. A nice GUI editor for Quarto is definitely something people have been asking for. Closest equivalent would probably be Overleaf or Typst web editors?
[0] https://quarto.org/
I like the syntax.
Then Adobe's InDesign showed up in 1999 and things began to change.
FWIW I both wrote and typeset books myself (for a traditional publisher): I did most of them using QuarkXPress but I managed to sneak one I made with LaTeX (it was a hard sell to the publisher / printing press guys who were only ever using QuarkXPress). Also I was forced to heavily modify LaTeX templates to match exactly the one the publisher was using with QuarkXPress.
So yup when I read "Quarkdown is a modern Markdown-based typetting system" the first thing I think about is QuarkXPress: great memories of MacOS (8? then 9?, pre OS X for sure) and my Sony Trinitron monitor.
Was still using these in the early 2000s. Good times.
https://www.simongriffee.com/notebook/american-overseas-scho...
I can add those with the use of css/js for web and interpreters and themes for print/non web.
As some who uses headless chrome to turn html into pdf (for invoices), I have been looking for something simpler and faster.
I tried typst, but it felt messy to me. I wonder if quarkdown offers more streamlined experience
What exactly is messy about Typst?
On top of that, there is no easy way to create a template. For example, I want an invoice template which I can reuse with different data. Theoretically, I can create a typ file for the template, and define the invoice as a function which I then call from a string with, say, json data. It seems great as web service, but not as a library I can use from, say, Rust.
And the type system is a bit confusing. I can define basic types like numbers or string, but when it comes to structs, they don't seem to have support for that.
I find it easier to create a handlebars template, and feed the HTML to headless chrome printing service, which will output a PDF for me. It's not scalable for high volume, but good enough for my needs (takes about 2-3 seconds to generate PDF).
Templates are just functions [0].
I think much of the frustration comes from typesetting being a harder problem than it seems at first. In general a typesetting system tries to abstract away how layout is recomputed depending on content.
Supporting contextual content -- cases where the content depend on other content, e.g. numbered lists, numbered figures, references, etc -- involves iterative rendering. This is evidentidly a complexity sinkhole and having a turing complete script language will bite you back when dealing with it. I recommend reding their documentation about it [1] where they explain how they propose solving this problem.
[0]: https://typst.app/docs/tutorial/making-a-template/
[1]: https://typst.app/docs/reference/context/#compiler-iteration...
https://weasyprint.org/
Also the only good implementation of web layout/rendering I've seen done in python.
> From a technical point of view, WeasyPrint is a visual rendering engine for HTML and CSS that can export to PDF. It aims to support web standards for printing. WeasyPrint is free software made available under a BSD license.
> It is based on various libraries but not on a full rendering engine like WebKit or Gecko. The CSS layout engine is written in Python, designed for pagination, and meant to be easy to hack on.
So, aside from the more minimal format or Markdown compared to HTML, I don't see much appeal in quarkdown compared to feeding HTML to a headless chrome instance.
But it is a cool project if one wants to turn a bunch of markdown files to say a book or an article.
[1] https://github.com/iamgio/quarkdown/wiki/pdf-export
Once you remove that, both versions look essentially equivalent and just as readable.
But if you don't see this obvious barrier, I will unlikely be able to explain the issue with backslashes: it's partially about the number, but also visibility - .period syntax is a smart choice as it's unobtrusive and not part of the regular syntax, and it's more ergonomic to type, so a universal win.
I would love alternatives to HTML or whatever, but I tried Typst too and it's very clear that the authors only really care about typesetting for papers and other long form prose. Stuff like forms, invoices, flyers, handouts, leaflets, business cards -- an afterthought, at best.
Edit: Actually I was thinking of Sile not Typst, but I think the same applies to Typst too. I didn't dig into Typst too much because it was commercial though.
[0]: https://github.com/pagedjs/pagedjs
[1] https://github.com/typst/typst/issues/1765
To be clear, I mean from a design perspective. Like take a print copy of Wired... how hard would it be to replicate any of those pages? Without using other software (aside from maybe cutting up stock photos). I can format scientific papers in HTML and it's not too hard, I can also format a cookbook, and it's not that hard. It's not great either!
Though I suppose the docs could include tutorials for how to use them to make a more diverse kind of documents, and adding another layout function that behaves more like flexbox would be nice (though it wouldn't be too hard to create a function that re-creates the behaviour of flexbox based on the grid function).
https://typst.app/project/r1YNDcKpoF1sVXHf5n4VKB
Plus you can share the rendered and preview form of the project with a single link, which is pretty neat.
[0]: https://dvdkon.ggu.cz/projects/pppql/poster.pdf
It is because you can typeset beautiful long text algorithmically and all these small forms like invoices and flyers are more graphical design than typesetting: you need to place many small elements precisely, not relative to each other but to the edges of the page / optical centers / etc. It is not very convenient without WYSIWYG. Possible, yes, but will require many trial-and-error when in WYSIWYG layout program can be done from first try.
Think about tabloids too: text, which wraps around non-rectangualr images, cut-outs, etc. Hard to do without seeing what you do, only with text and coordinates.
Edit: typo test → text.
Why isn't it easy to place something relative to the edges of a page via text? In HTML I do `padding: 2cm` and I'm done. I'd say most of design involves placing elements relative to eachother; half the constraints in GUI design tools are matching spacing or aligning to nearby elements.
I'm not saying you can do the whole thing blind, but for the odd thing that does need visual feedback, not having a convenient UI isn't a critical failure. Some of those things are hard to do in a GUI too, and having a good text based layout tool could be easier.
I don't say it is impossible. But looks like it is hard.
It's very satisfying to play with visualizations in Typst, especially since it updates the output so fast (instant for small projects).
I have been generating documents for a while using https://github.com/enhuiz/eisvogel. It's nice to use markdown, but I feel really limited, and can't do much customization.
I would love to see some templates for this.
Is very slightly more concise syntax worth it?
https://github.com/iamgio/quarkdown/blob/main/mock/images.qm...
- https://marp.app/
https://github.com/pedroth/nabladown.js
[0] https://mystmd.org/