Quarkdown: A modern Markdown-based typesetting system
275 comments
·June 3, 2025thangalin
yndoendo
For me, the issue is not document conversion and is content de-duplication. Product A and Product B manual will share number of sections. Any spelling or grammar error must be updated in Product A and B manuals. They man share the same additions.
So far LaTex has been the only solution to allow binding shared sections into multiple document builds. These are for internal and customer facing information. Only binding duplication is in the revision overview sections pertaining to each document build.
thangalin
> So far LaTex has been the only solution to allow binding shared sections
R, being a Turing-complete language, can do this. If R Markdown can do it then KeenWrite and pandoc+knitr support it. R can also do conditional includes. For Product A and B to share authentication steps, this could look like:
`r#inc( '../common/authentication.Rmd' );`
Where TeX may resemble: \input ../common/authentication.tex
SGML, DocBook, AsciiDoc, RST, and other text formats have similar abilities.structural
Would be interesting to see a compare and contrast between this and Typst, which has gotten a lot of attention recently.
Kinda surprising that it isn't mentioned in their feature comparison matrix at all.
msravi
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.
junon
Last I checked Typst can't emit HTML.
lblume
They do now, experimentally. The support is getting improved a lot currently.
enricozb
It works really well, I've written three blog posts using typst.
Post: https://ezb.io/thoughts/interaction_nets/lambda_calculus/202...
Typst source: https://github.com/enricozb/enricozb.github.io/blob/master/t...
blacksqr
I've also heard that pandoc now supports typst, and will turn typst format files into html, independent of typst's own code. Have not confirmed.
sureglymop
That's really cool! Would love to create my website with that and also make it available as a pdf for easy archival.
shark1
It is mentioned now. Btw, it looks very similar to.
blenderob
Is the comparison table accurate? - https://github.com/iamgio/quarkdown#comparison
Surely LaTeX has full scripting ability even though I wouldn't wish such a punishment on anyone.
Surely Quarkdown's gibberish like syntax is not more concise and more readable than Typst?
And surely the learning curve is not easier than Typst? I'd say the learning curve is more or less the same as Typst.
Surely LaTeX can also produce HTML with tex4ht?
nonethewiser
>And surely the learning curve is not easier than Typst?
To be fair, (most) markdown is valid Quarkdown. Barrier to entry really doesnt get any lower than that. Of course the learning curve is not fully synonymous with the barrier to entry, but it's a significant part.
And "learning curve" is really such a subjective quality. Kinda fucked from the start once you put it in a comparison table. Explicit features are more objective but even then sometimes products dont NEED certain features because of their design.
flenserboy
Pandoc is your friend for this and many other use cases.
blenderob
Not sure I understand. I never said anything about my use cases. I was checking the accuracy of the comparison table. Did you mean to post that comment here or were you replying to another comment?
cAtte_
they were probably mentioning that, with pandoc, you can convert between HTML and PDF for any of these tools anyway
kccqzy
I mean one can take a quick look at what has been accomplished in TikZ and pgf to figure LaTeX and plain TeX's scripting ability.
The comparison table is clearly inaccurate.
account-5
How is this different from Quarto [0]? Quite similar in name, same extension, appears the same aims, but at the minute less functionality.
jsilence
Also let's not forget that Quarto is the spiritual successor of the widely successful R Markdown ecosystem. By the same developers: https://quarto.org/docs/faq/#who-are-the-developers-of-quart...
riskassessment
Not just the spiritual successor but also backwards compatible in that Quarto can render R Markdown files (in addition to the newer quarto .qmd spec).
tecleandor
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
null
jbverschoor
Yeah that's the immediate connection I got too.
I like the syntax.
zelphirkalt
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.
TacticalCoder
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.
hypertexthero
QuarkXpress for typesetting, Photoshop for painting pixels, and Macromedia Freehand for turning scanned drawings into vector graphics.
Was still using these in the early 2000s. Good times.
https://www.simongriffee.com/notebook/american-overseas-scho...
riedel
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.
pinoy420
[dead]
looneysquash
The sample outputs look nice!
But I always hate it when a templating language grows function calls and all of that. Maybe it makes sense in this context, I'm not sure.
But if you end up using it together with another language, maybe for server side rendering or some kind of document from data generation, you quickly realize that switching between the two languages wastes a lot of time, and the templating language is never as powerful as the "real" language. So I prefer JSX, or something like Javascript's tagged template literals. Something where you use a real programming language, but where the context of the document is understood, so you don't have to worry about escaping or XSS.
rendaw
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.
blacklion
> 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.
Edit: typo test → text.
rendaw
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.
blacklion
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.
andy12_
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).
jamesmunns
You definitely can, I designed a 206x85cm standing banner for my last trade show as one of the first "production" things I built in Typst:
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.
rendaw
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!
lblume
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.
andy12_
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).
freefrog334433
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.
rendaw
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!
fmoralesc
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.
grahameb
Can you make slides and handouts from the same primary document? That'd save me an inordinate amount of time for some church use-cases.
Onawa
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'.
dvdkon
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.
blindstitch
Flowing text between boxes can be done with flowfram, which is old and clunky, but works OK.
kzrdude
I might be using Typst wrong, but it's like a visual programming environment. I guess I found my jsfiddle or other tools that other people use.
It's very satisfying to play with visualizations in Typst, especially since it updates the output so fast (instant for small projects).
dleeftink
You may be familiar already, but does paged.js fit your bill?
rendaw
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.
davidpapermill
[dead]
krick
Since 70% of comments under each of these posts are always "why not LaTeX?!", I want to start by reaffirming: yes, I do want a modern Markdown-based typesetting system. There even is a place of several of them. It would be absolutely nice to replace LaTeX, simply because it's old trash with remarkably inconvenient syntax, so, yes, a system with full control over markup is desirable. And if it necessarily increases verbosity, then there absolutely is a place for something "just a touch more powerful than markdown".
However, at a glance it doesn't strike me as what I was looking for. There aren't too many examples, but it seems like it leans heavier towards "just a touch more powerful than markdown" rather than to "replace LaTeX" (or Typst, for that matter). And for the first scenario to play out, it must be really seamless to use. This one doesn't seem to be.
1. Just to take care of the elephant in the room: JVM. Same as many others, I won't even bother installing it to try it out, so it doesn't help virality much.
2. I don't like the syntax. It needs to be as compatible with plain markdown as possible, and this one isn't quite. My main issue is with argument to a function being tabulated. It seems like it will lead to the whole document being tabulated. It is a natural for markdown-compatible add-ons to employ a code/monospace blocks, but ```plugin-name is a better way to do it, because it doesn't mean you have to reformat your whole document when you decide to step off from plain markdown.
3. Since a "better markdown" is something more suitable for something that starts as your personal notes (if you are specifically working on preparing a document for publishing, indeed you can just do it in LaTeX as well), I suppose it's only useful to an extent it is integrated into your notetaking app. Surely, there are still some people who do it in Emacs or Vim, but even such a retrograde as myself eventually moved on to Obsidian. I want ways to control my document structure better inside my notetaking app with a potential ability to publish. But as a standalone thing, I'm not sure why would I use it. At least Typst has a proprietary online editor. I suppose, that's also how nearly everyone uses it.
deppep
LaTeX is not "old trash". It's one of the best piece of software ever written. Just don't import bs in your document.
Aeolun
I’d argue that Typst probably beats it on all levels. Have you ever seen a LaTeX document? (The question is rhetorical, of course you have) Just because it was the best thing before doesn’t mean it still is now. I’d say the only thing it still has going for it is momentum.
earthicus
I looked at the Typst documentation and from what I could tell, it has 3 hard-coded "Modes" for 3 hard-coded kinds of syntax (normal, math, code). I couldn't find any way to add any custom syntax - is there a way to do this?
Tex/LaTeX are completely syntactically extensible. For example, a logician might want to use the software with any number of their notations, or a physicist drawing Feynmann diagrams, etc. I think at one point Lillypad used it for typesetting sheet music.
Edit: i found it! https://typst.app/docs/guides/guide-for-latex-users/#package...
Lammy
> What could be mistaken for a planet is actually a quark or, more specifically, a down quark, an elementary particle that is a major constituent of matter: they give life to every complex structure we know of, while also being one of the lightest objects in existence.
Cool project, but seems dangerous to use the word “Quark” in a publishing context RE: QuarkXPress:
- https://tsdr.uspto.gov/#caseNumber=90886976&caseSearchType=U...
- https://tsdr.uspto.gov/#caseNumber=97009034&caseSearchType=U...
(Why do they have two for the same word?)
cbarrick
This just looks like reStructuredText.
Quarkdown:
.somefunction {arg1} {arg2}
Body argument
rST: .. somefunction:: {arg1} {arg2}
Body argument
AmazingTurtle
Markdown, Quardown, Typst, this and that. This looks to LaTeX. All of this became so confusing and un-standardized - I went back to HTML+CSS.
rTX5CMRXIfFG
You know what, while you're at it, I might as well bring it up. How about XML?
I haven't really tried writing large pieces of text in it but I am already seriously considering. All other alternatives are too complicated and have a learning curve that gets in the way of writing itself. With XML, I'd be able to define my own tags and run them by a parser later on to auto-generate indexable footnotes, and create my own ways of structuring text besides the usual ones (chapters, sections, etcetera). Has anyone tried this approach?
andrewd18
Professional tech writer here: We use GitHub and a tool called OxygenXML to write docs-as-code in an XML DTD called "DITA". It's a hefty IBM invention from the early aughts, but it covers every use case I've thrown at it, from small documentation sets to multi-thousand-page monsters. Supports PDF, HTML, Word, and many other output types.
starkparker
DITA's so great at everything _except contributions from non-tech writers_ that half of my career has involved migrating tech writing stacks that use it to Markdown/SSGs in git repos.
DITA's benefits require a certain scale that most tech companies never achieve. And the Open Toolkit is a nightmare piece of software.
rmnclmnt
Basically DocBook?
drob518
Exactly. Seems like we already invented that but it didn’t really catch fire.
dgb23
There's also a standard to turn XML into HTML via XSLT.
tempfile
I have been thinking about this seriously myself. Not with a specific existing schema like DocBook, but with a custom schema (defined by me) that I then compile to standard schemas, like DocBook or HTML.
This seems extensible to the degree that I want (i.e. semantically rich enough that you can conceivably hang any application from it). But I just can't bring myself to write in XML syntax, especially for maths.
davidpapermill
[dead]
schaefer
I gave your splash page a look: no docs, no examples, no screenshots.
Your "free trial" is behind a sign-up wall. and I left.
ozim
Well basic markdown is super useful to do stuff quickly.
Problem is when people started to build systems upon systems upon something that should not be used for more complicated cases.
Maybe not a problem because I don't care but I just see how loads of things that someone created to be "just that" someone takes without understanding and builds on top instead of understanding limitations and scope of the initial idea or system.
It is "oh it is missing a feature" - where it is "no it wasn't built to do that".
I have seen notepad in windows shipping some formatting features, I don't see that as an improvement. Notepad was notepad for purpose.
zamadatix
I think a good balance for a markdown syntax is something you can write nearly naturally on the fly (very low syntax needed for basic use) but can continue to mark up in more detail when you want to turn something into a complex use case (very high syntax ceiling for the complex cases). HTML+CSS almost gets there except the tags are a bit awkward for simple things like just <strong>bolding</strong> a word.
Regarding Notepad, keep in mind they dumped an entire separate app (WordPad) by merging the ability to format into Notepad. This kind of mirrors what I was talking about above: one app with a very low floor but a flexibly high ceiling when you want to go there with it rather than two separate apps you need to pick from up front.
setopt
There’s also the mature and reliable Org-mode, if you don’t mind Emacs as an editor.
blenderob
Does org-mode have a spec? From what I've seen, org-mode is defined as whatever Emacs does. Without a spec I can't see how it's a viable format for widespread usage.
everybodyknows
Org-mode has all three of:
1. Spec, written after the fact, not by a core dev.
2. Live help in 'org-info'.
3. Elisp string extraction via 'M-x describe-function' and the like.
Difficulties arise from subtle inconsistencies between the three, and inability of any one to comprehend the kitchen-tool-bin jumble of low- and high-level functionality that has been added over the years.
OTOH, content display is economical of eye and finger effort, and some of the Emacs interaction features startingly powerful.
I wrote my own, use-case specific converter to expand org-format to HTML. Runs on the CL, written in Go.
eGQjxkKF6fif
Same. Replacing elements in with DOM in webdev is surprisingly fun with websockets too.
Having to know and learn 300 clunky frameworks, 97 different syntaxes it gets old.
HTML. CSS. Javascript.
Ask the AI to give me a markdown to html converter, good2go
runarberg
> Ask the AI to give me a markdown to html converter, good2go
Why would you do that? There are dozens of libraries which do exactly that. Instead of AI you can ask npm or pip, heck you can even ask CRAN[1].
1: https://cran.r-project.org/web/packages/markdown/index.html
eGQjxkKF6fif
Exactly. It tells me the same things. It'll often give me the require() for javascript on packages I should use.
aitchnyu
If 2005 text editors autocomplete made it easy to balance and indent html/xml tags and syntax highlighting like today, would JSON, Yaml, Markdown have taken off? In The Art of Unix Programming from 2003, the author states editing xml by hand is torture, hence we must invent unique text formats and parsers for the same.
tempfile
I have not been able to configure an editor that makes it less painful. I think it's not just the verbosity (although that is painful) - the prefix notation makes some things inherently hard to read. MathML is almost impossible.
360MustangScope
Ah yes, writing my notes down in css and html. My favorite!
Seriously though, every time some new hotness comes along, you don’t really have to use it or even waste your time looking at it. Markdown will likely be here after all of its derivatives are long gone.
sixtyj
Gruber and Schwarz knew that in simplicity is a beauty.
Basic markdown format is good enough.
For specific cases, it depends what is the outcome - html, pdf…
But hell are binary formats that are used for page layout - vendor lock for centuries. Backward compatibility? Forget about it.
From this point of view people should stick to text based formats. Markdown, LaTex, Typst… you name it. Just use it :)
maclong9
For me the only addition to markdown I usually enjoy is mathematical typesetting like on GitHub using the inline $$ syntax or the code blocks with the language set to `math`
silvestrov
.function {greet}
.greet {world} from:{iamgio}
I strongly suggest that the greet call uses a slightly different syntax (e.g. two dots) as the system otherwise can't introduce new keywords without risking conflict with function names in existing documents.zelphirkalt
Does it need more keywords? This syntax reminds me of Smalltalk syntax a little and Smalltalk famously got away with merely 6 keywords. I didn't check the syntax in detail for quarkdown, and I don't expect it to be as well thought out as Smalltalk, but it is quite possible to get away with only few keywords. Question is then how complete their concept is right now. Also there could be a versioning mechanism, that labels a document as for a specific version of Quarkdown.
ehutch79
64kb of ram is enough for anyone.
maxloh
A backward compatible design would be resolve to user-defined functions first, built-in keywords afterwards.
That way any new keywords won't be a backward incompatible change.
IshKebab
That's a pretty bad design. You don't want users to be able to create functions named as keywords because it will break other code.
willvarfar
if you have a UDF called .until and then this becomes a keyword, does the new 3rd party library you start using that uses the keyword .until still work, and what does the LLM vibe-coded start doing in the future when it makes use of the .until keyword?
TheEdonian
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.
My FOSS text editor, KeenWrite[1], takes a similar approach: Markdown -> XHTML -> TeX -> PDF. The software architecture shows how you can have processor chains:
https://gitlab.com/DaveJarvis/KeenWrite/-/blob/main/docs/ima...
I developed KeenWrite to help write a sci-fi novel where I can use variables for character names, places, etc. See the tutorials[2] for details.
For anyone still using pandoc and shell scripts, my Typesetting Markdown[3] series describes building a script-based infrastructure for converting Markdown into PDF.
[1]: https://keenwrite.com/
[2]: https://www.youtube.com/watch?v=CFCqe3A5dFg&t=15s
[3]: https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdow...