Why should I use the Typst symbols/emojis instead of just pasting them in?

What are the advantages of using #symbol, #emoji and \u{0000} over just pasting the corresponding symbol in the Typst file?

2 Likes

The font used for editing the Typst source file usually is different from the font used for output. It might not contain the symbol, which is possibly more relevant when you share Typst sources between people / computers.

4 Likes

I think the main idea of #symbol and #emoji are to be able to write common symbols with the normal keyboard, allowing you to stay in the flow of writing without needing to switch back and forth between applications to insert symbols.

3 Likes

Using the ASCII symbol/emoji functions also avoids the headache of encodings. Usually it’s UTF-8 when you’re pasting, but you never know if someone you’re working with (or even you by accident) pastes a symbol from a different weird encoding. It’s better to be consistent and avoid any ambiguity.