Live data from Hacker News

Typst, a new markup-based typesetting system, is now open source

github.com

51–60 of 147 posts

Re: Typst, a new markup-based typesetting system, is now open source

#51
post #9

There's also Sile: https://sile-typesetter.org/ LaTeX (Well, LuaTeX) powers my E-ink newspaper ( https://imgur.com/a/NoTr8XX ), but I've been curious to use it as a vehicle to try out some of these alternatives and see if they can put together a non-trivial layout.

I wonder if using Bluetooth LE would use less power as you wouldn’t have to connect to a hotspot? The display could wake up and ping the raspberry pi which would send it the new image and everyone goes back to sleep until the next morning. Probably doesn’t matter all that much but if you wanted maximum battery life, maybe?

Might be worth trying :-). BLE has the lower data rate so the transfer takes overall longer, though. Wonder how that adds up.

I already have tuned things to lower the RF power output of the esp32 Wifi habitually - there's a Fritz Wifi repeater just across the room in a corner with near line of sight, so the little thing doesn't exactly have to strain to reach the hotspot.

Also curious how the optimized -S3 and the upcoming -C6 do in the various transfer/power equations.

Re: Typst, a new markup-based typesetting system, is now open source

#52
Latex is "typesetting-complete". This language is not, so it's not a replacement. For instance

* The syntax does not use escape sequences for functions/symbols, i.e. phi instead of \phi or floor instead of \floor. You will inevitably run into situations where, for instance, you want to write the letters phi, and have to resort to some ugly hack to write the natural language. This is not okay.

* There is reasonable syntax for text-formatting in bulk (whole paragraphs), but if you want to format a single word or sentence, the syntax seems to involve way too much work.

A side concern: This uses a mix of markdown-style formatting (asterisks for bold text) and programming style formatting. Personally, I think this makes it difficult to visually parse complex documents.

Re: Typst, a new markup-based typesetting system, is now open source

#53

I have spent probably too much time trying to gain a comfortable level of proficiency with LaTex and I have not been able too. Maybe I just don't use it often enough but I always now find myself just using HTML/CSS instead. Even when the thing I'm laying out is specifically just something to be printed. I feel similarly about LaTeX and Vim. I like them. They are interesting. I appreciate the history around their deve…

You can develop muscle memory for vim, less so with LaTeX. Vim motions are absolutely worth learning, even if you don't use vim itself - it is the most efficient way to navigate and manipulate text.

My main problem with vim is navigating and manipulating files rather than text.

I use vim fairly frequently for quick edits and small changes but as soon as the scope of the change starts to span more than one file vim starts to feel really frustrating really fast (to me).

Re: Typst, a new markup-based typesetting system, is now open source

#54
As a computer science researcher, I have hundreds of LaTeX macros, basically a DSL for my specific field of research, where I more or less write out natural language and it comes out as formulae with all the specific symbols and stuff.

I think for people who write LaTeX in this kind of professional capacity, the macro language is the killer feature.

But I could see fields light on formalism embracing something like this over Ms word, if there was a nice Toolchain for collaborative writing and versioning.

Re: Typst, a new markup-based typesetting system, is now open source

#55

I have spent probably too much time trying to gain a comfortable level of proficiency with LaTex and I have not been able too. Maybe I just don't use it often enough but I always now find myself just using HTML/CSS instead. Even when the thing I'm laying out is specifically just something to be printed. I feel similarly about LaTeX and Vim. I like them. They are interesting. I appreciate the history around their deve…

If you need to share a professional document that involves mathematical expressions and equations, LaTeX is very helpful as a tool to use. The need arises if you are a professional or student registered in a course in mathematics or computer science. It's much easier to type multiple lines of equations, with the equation signs aligned, in LaTeX than in Word. It's a bit of a grind, but you can learn the fundamentals o…

I used LaTeX in school too and I agree theres probably no better tool for math-heavy documents.

I stopped using it for my resume because I was too frustrated with essentially re-learning latex basics every time I wanted to make minor changes to content or format.

Re: Typst, a new markup-based typesetting system, is now open source

#56
This looks cool!

I understand that, just like any tool that has sufficiently many users, (La)TeX grew exponentially in terms of the number of features it has. I like the its core, and I also like the ability to write scientific texts somewhat conveniently. I haven't used Typst yet, but it looks to be something I wanted for quite a while: similar convenience to LaTeX and yet much more simplicity.

To be fair, though, Markdown + KaTeX and MathJax are kind of everything I need right now. Jupyter Notebooks can render enough LaTeX formulas for me to use it when I needed it, even in the university when I'm writing some CS algorithm overview/tutorial or need to do some calculations and hand it in with the explanation. Whenever we had labs in Physics I would do all the calculations in Jupyter Notebooks and that actually looked pretty good. And for my personal blog, I just set up the KaTeX + Hugo which I love: the convenience of Markdown + LaTeX is enough.

This being said, I'm sure there are many people who still have to write papers and would find it useful, but at least for me LaTeX is not a standalone tool that I would use anymore.

Also, part of the value that LaTeX has is an enormous amount of templates that I don't understand but I use them because I have to (e.g. when writing a thesis - it has all the right typesetting, formatting and so on) or because they look very good (I still maintain my Resume in LaTeX format. This is hard to replicate or capture with a new system.

EDIT: Oh, and also Mermaid.js which is now integrated into both GitHub Markdown and Hugo is wonderful for a very small version of TikZ. Although, it is very inconvenient for my taste, but it's still very useful.

Re: Typst, a new markup-based typesetting system, is now open source

#57
post #46

So far, my favorite thing about it is matching parentheses scale automatically. No more \left(\right) nonsenses.

Can you show an example of what you mean by "scaling automatically"?

in latex, when typesetting math, by default, parentheses (and other brackets) are always a constant height. So if you put something which is taller than one line in between parentheses, it will look strange, with the content sticking out past the parentheses at the top and/or bottom.

The fix for this (in latex) it to mark pairs of matching parentheses with the macros `\left` and `\right`, (for example: `\left( \frac{x}{y} \right)`) which informs latex that it should figure out how tall the content between the brackets is, and then resize the parentheses appropriately.

Re: Typst, a new markup-based typesetting system, is now open source

#58
post #14

It seems to me that LaTeX is primarily used as academic gatekeeping. This is one step better, but why a new DSL versus a library to build your layout representation from a common language?

People familliar with LaTeX will use it in places where it is definitely not required and sometimes even where it’s arguably not a very good fit, such as for presentation slides, illustrated posters laid out in complicated ways, or in one notable case a diagramming package with automatic graph layout, plotting, symbols for circuits, and a boatloat of other things (TikZ). It might be difficult to believe given the unf…

I have to disagree to "arguably not a very good fit, such as for presentation slides." I have to make regular work presentations with a lot of math. There are two choices: Powerpoint and Latex/beamer. While the latter is far from painless, powerpoint takes much more time and is much worse to revise.

Re: Typst, a new markup-based typesetting system, is now open source

#59

Looks very cool, but LaTeX still feels superior for non-mathematical documents like a resumé, right?

In the case of CVs/resumes, I've never liked LaTeX CVs when I encountered them... Most of the time they just looked horrible and messy. Or they were for some reason being rendered without anti-aliasing and text selection broken when exported as a PDF. Probably because people gave up trying to get it to work.

I'd rather use something like JSONResume, Markdown, or even HTML/CSS and printing to PDF. Google docs also has a few nice CV templates.

Re: Typst, a new markup-based typesetting system, is now open source

#60
post #45
post #9

There's also Sile: https://sile-typesetter.org/ LaTeX (Well, LuaTeX) powers my E-ink newspaper ( https://imgur.com/a/NoTr8XX ), but I've been curious to use it as a vehicle to try out some of these alternatives and see if they can put together a non-trivial layout.

Wow this is cool! I made a sort of similar e-ink display piece that shows your current song on Spotify - https://github.com/CampbellOwen/NowPlaying . Your project is making me want to try another e-ink project! I'm especially impressed with the overall polish of the enclosure and hardware, that's always my weak point. I saw you mentioned you wrote a custom driver for the display controller. I'm curious how you found…

"Driver" is in all honesty a bit overly braggy!

Technically it's a driver, but in practice I'm just talking over a chip via SPI. It's weird and quirky SPI - I think this chip originally just had an I80 interface (Intel 8080 protocol) and then they added a SPI frontend that internally translates to I80. That means you have to SPI with I80-ish chip select semantics etc. which is not what the SPI APIs in the ESP-IDF or Arduino frameworks do by default (leading to things not working unexpectedly), so I had to "bit-bang" CS. Aside from quirks like this it was pretty simple and just following the datasheet to stream the right commands and data.

One thing that made it functionally worth it (aside from the hacking fun and learning) is that E-ink panels perform best if run at a particular drive voltage ('VCOM') that is determined at manufacturing time and attached as a little sticker to the flex cabling sticking out of the unit. I stumbled upon this while reading various data sheets, and as a result my custom code will set the correct voltage, driven by config. If I had used a random lib I probably wouldn't have encountered this.

That said, I've found there's very cool projects out there that go a level deeper. Instead of using an EPD controller like the IT8951 as a convenience, this project runs E-ink panels directly off a MCU by implementing the waveforms directly: https://github.com/vroland/epdiy

After reading the panel datasheets I find that approach quite interesting, and am considering doing fresh Rust impl of that as well.

The Spotify project looks cool! I dig the dithering style. Would like to try a multi-color panel as well.

Post reply on HN