Live data from Hacker News

Typst: An easy to learn alternative for LaTex

github.com

121–130 of 192 posts

Re: Typst: An easy to learn alternative for LaTex

#121

Earlier quoted context omitted.

You've had some good replies already, but just want to add my thoughts. Markdown to me is more about (a) the content (the actual words) and (b) the semantics (text emphasis, headings, etc, which communicate information about the importance or meaning of particular things). Typesetting systems like Typst or LaTeX go beyond this. They're also about presentation, how precisely it is laid out, on mediums such as print or…

A few Markdown documents I've converted to PDFs: * https://impacts.to/downloads/lowres/impacts.pdf * https://whitemagicsoftware.com/softcover/technical.pdf * https://whitemagicsoftware.com/softcover/jekyll-hyde.pdf Respectfully, keeping presentation logic and content completely separated while having precise control over layout can happen with Markdown, as the example documents demonstrate. The ConTeXt typesetting sy…

>A few Markdown documents I've converted to PDFs:

These aren't Markdowns converted to PDFs. These are HTML websites rendered as PDF, where at some early point some text with basic formatting was fed in.

>keeping presentation logic and content completely separated while having precise control over layout

Does anyone really want that? I certainly wouldn't want that separation. I want to create some document and not a sophisticated template, so I am always willing to sacrifice generality over momentary needs, if I can't force the layout, then I need to waste time to implement some generality, which I don't need. Completely the wrong approach to document creation.

This looks like you really want to have a web framework, not a document creation system.

Re: Typst: An easy to learn alternative for LaTex

#122

I saw this come up today in a different thread. I'm a mature undergrad, I've never used LaTeX, actively avoided it in fact and am forced to produce word documents. My current workflow is pandoc style markdown and obviously pandoc for conversion, with zotero for citations. I make use of pandoc-crossref for figures, tables, sections, etc. I'm hopefully moving to a different uni for a masters this year. Can anyone who u…

You may be limited for your thesis. My grad program required us to conform to either a Word or LaTeX template, of which I found the latter actually much easier to deal with. I just kept my chapters in separate files that are inputted into the template.

If you're asking for other assignments, I'd actually recommend Quarto [1]. It's basically a streamlined version of your current workflow. The other benefit is that it can convert your markdown to Typst if you decide to switch over in the future.

1: https://quarto.org

Re: Typst: An easy to learn alternative for LaTex

#123

Earlier quoted context omitted.

A few Markdown documents I've converted to PDFs: * https://impacts.to/downloads/lowres/impacts.pdf * https://whitemagicsoftware.com/softcover/technical.pdf * https://whitemagicsoftware.com/softcover/jekyll-hyde.pdf Respectfully, keeping presentation logic and content completely separated while having precise control over layout can happen with Markdown, as the example documents demonstrate. The ConTeXt typesetting sy…

>A few Markdown documents I've converted to PDFs: These aren't Markdowns converted to PDFs. These are HTML websites rendered as PDF, where at some early point some text with basic formatting was fed in. >keeping presentation logic and content completely separated while having precise control over layout Does anyone really want that? I certainly wouldn't want that separation. I want to create some document and not a s…

> These aren't Markdowns converted to PDFs

Would you like to see the source Markdown documents? My workflow is:

    Markdown -> XML (XHTML) -> TeX -> PDF
If that isn't converting Markdown into PDF, what would you call it?

> Does anyone really want that?

At time of writing KeenWrite has had over 4,000 downloads. So, maybe? However, my point wasn't whether people want it (besides me). My point was that it is technically possible to keep a Markdown document's content separated from its final presentation form (e.g., PDF).

> This looks like you really want to have a web framework, not a document creation system.

Not really: I want to write in Markdown (or R Markdown) using interpolated variables and generate PDF documents. I have spent about 9 years working on a cross-platform desktop text editor that allows me to do so.

Re: Typst: An easy to learn alternative for LaTex

#125

Having composed many pieces of coursework using Typst, I must say that it certainly makes academic writing more streamlined, engaging, and dare I say fun — though that might just be me. The functional nature of Typst's syntax ensures I don't have the erratic behaviour emblematic of modern day Microsoft Word and sometimes even Google Docs. Using a local IDE such as VSCode brings all the features one could like. In com…

FWIW there is already partial LaTeX support for Typst via the mitex package: https://github.com/mitex-rs/mitex

Is that just common constructs, or can I pull in amsmath and other similar packages?

Re: Typst: An easy to learn alternative for LaTex

#126

Earlier quoted context omitted.

>A few Markdown documents I've converted to PDFs: These aren't Markdowns converted to PDFs. These are HTML websites rendered as PDF, where at some early point some text with basic formatting was fed in. >keeping presentation logic and content completely separated while having precise control over layout Does anyone really want that? I certainly wouldn't want that separation. I want to create some document and not a s…

> These aren't Markdowns converted to PDFs Would you like to see the source Markdown documents? My workflow is: Markdown -> XML (XHTML) -> TeX -> PDF If that isn't converting Markdown into PDF, what would you call it? > Does anyone really want that? At time of writing KeenWrite has had over 4,000 downloads. So, maybe? However, my point wasn't whether people want it (besides me). My point was that it is technically po…

>Would you like to see the source Markdown documents?

I am pretty sure I know what they look like from the end result.

My point was that almost all of the design effort wasn't contained in the markdown. So clearly there were at least two major inputs to the documents. But of course you agree with that.

>Not particularly; I want to write in Markdown (or R Markdown) using interpolated variables and generate PDF documents.

To me the total separation only makes sense if you are designing for unknown content. If you control the input of content and formatting, then a closer linkage between both seems superior. Markdown is (intentionally) extremely limited, so everything that markdown can't do needs to be implemented in a general way on the formatting layer. Obviously that is more tedious if you have total separation.

What I meant by "web framework" is that they can't assume content, so need to deal with generality. Essentially what you are writing is a website generator, except with PDF being the end output. But generating general and reusable components doesn't seem to be how I would want to create a document.

Re: Typst: An easy to learn alternative for LaTex

#127

Earlier quoted context omitted.

As someone who almost never needs equations, does this have any benefits to me over using markdown?

Typst deals with documents, so if you want to prepare an actual document, with a defined page layout, style, font, etc. typst gives you that. Markdown does not do any of that, it just gives you html. You would want to use typst if you want to create a document and need to control how that document looks from the language itself. Even if you were to render the markdown html to a PDF, markdown itself, or even css doesn…

I've done .doc -> .md -> .tex -> .pdf via pandoc (e.g. to convert a confluence document to a nicely typeset PDF), so I'm not sure there's much difference.

Naturally, a format with more metadata loses metadata when converted to one with less (and the reverse, you may need to add metadata in when going up the chain), but unless your document is bound to a specific format (in which case, I'd pick RST for HTML and LaTeX for pdf), markdown gives you the content and pandoc lets you specify a template (and with pandoc, you can take the markdown and generate slides in HTML, PDF and create notes through the different outputs).

Re: Typst: An easy to learn alternative for LaTex

#128

Typst has been pretty amazing, and at my organization, we’re very happy with it. We needed to generate over 1.5 million PDFs every night and experimented with various solutions—from Puppeteer for HTML to PDF conversions, to pdflatex and lualatex. Typst has been several orders of magnitude faster and has a lighter resource footprint. Also, templating the PDFs in LaTeX wasn’t a pleasant developer experience, but with T…

I was reading second sentence, and I knew it was zerodha. It’s good to see more open source in your tech stack.

Re: Typst: An easy to learn alternative for LaTex

#129

Earlier quoted context omitted.

Typst deals with documents, so if you want to prepare an actual document, with a defined page layout, style, font, etc. typst gives you that. Markdown does not do any of that, it just gives you html. You would want to use typst if you want to create a document and need to control how that document looks from the language itself. Even if you were to render the markdown html to a PDF, markdown itself, or even css doesn…

I've done .doc -> .md -> .tex -> .pdf via pandoc (e.g. to convert a confluence document to a nicely typeset PDF), so I'm not sure there's much difference. Naturally, a format with more metadata loses metadata when converted to one with less (and the reverse, you may need to add metadata in when going up the chain), but unless your document is bound to a specific format (in which case, I'd pick RST for HTML and LaTeX…

Conversions don't just loose metadata, you loose the ability to specify things. LaTeX shines because it can do everything by itself, markdown clearly can't and even with a TeX template you loose much of TeX's power.

You should start out by defining your desired output and needed input. I realize that 99% of document content can be fully realized in markdown, but the 1% can easily be a total deal breaker and make using markdown a complete nonstarter.

Post reply on HN