Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unfortunately out of the box typst is missing an important layout features compared to Latex: the auto-generation of headers (showing the section name in the header). There are some packages that help you with that:

- https://typst.app/universe/package/hydra,

- https://typst.app/universe/package/chic-hdr

- https://typst.app/universe/package/wonderous-book

However I believe this functionality should be available in the typst core.



Typst comes as a blank slate. You want to start with template, which defines things for you.

The difference between LaTeX and Typst is that LaTeX wants you to define a template with the "documentclass", if you want the same experience in Typst you want to setup typst with a template, there the headings will be defined for you already.

>However I believe this functionality should be available in the typst core.

You can trivially define headings in typst without using packages.


Practically nothing in Latex comes out of the box. Sure, you can bang out markdown-esque formatted text, but the moment you need something more complicated, say URLs, graphics, resize the margins, etc you are likely going to be pulling in a package.

No true scotsman and all that, but I suspect few documents in the wild are bare Latex.


But the feature I'm talking about comes out of the box. One just writes

\documentclass[twoside]{article}

\pagestyle{headings}

in LaTeX. And this also does the right thing on special pages like table of content, appendix, bibliography etc.

Implementing all that in Typst is quite a hassle.


The 'La' in 'LaTeX' stands for 'Lamport'. Leslie Lamport set up additional macros atop the base TeX language to make life easier. To this day LaTeX code can still be compiled with `pdftex` (note, no 'la' there).

The `article` document class is actually some `article.cls` file that resides somewhere in your TeX install root, is loaded, and implements macros such as `/title`, `/section`, `subsection`, and so on. All LaTeX eventually expands into a pile of TeX macros that are evaluated.

All this is to say... LaTeX comes with the templates, you've been using one all this while.


So I think Typst should come with a few default templates like Latex to make writing easier for beginners.


Great news then, it does! There are a number of templates maintained by the Typst team themselves [0] that are available under the templates section of the web app or via a simple command if you're using the CLI.

[0] - https://github.com/typst/templates/tree/main




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: