Documenting Tools: LaTeX & Typst

An introduction to LaTeX by Dr. Yi-Xin Liu at Fudan University (lyx@fudan.edu.cn).

This is a part of the course: Road to Scientific Research: Powerful Computer Applications (XDSY118019.01).

Lecture date: 2024.11.07

What is LaTeX?

LaTeX, which is pronounced /Lah-tech/ or /Lay-tech/, is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation.

  • LaTeX is the de facto standard for the communication and publication of scientific documents.
  • LaTeX is available as free software.
  • LaTeX file ends with extension .tex.

LaTeX Features

  • Typesetting journal articles, technical reports, books, and slide presentations.
  • Control over large documents containing sectioning, cross-references, tables and figures.
  • Typesetting of complex mathematical formulas.
  • Advanced typesetting of mathematics with AMS-LaTeX.
  • Automatic generation of bibliographies and indexes.
  • Multi-lingual typesetting.
  • Inclusion of artwork, and process or spot color.
  • Using PostScript or Metafont fonts.

Getting started with LaTeX

Other videos in this Youtube playlist for LaTeX tutorials are highly recommended.

Demo and exercises of LaTeX

  • Go to Overleaf and create an account.
  • Follow the demonstration:

In fact, LaTeX can be edited in any editors. You can use VS Code + LaTeX extensions to do the job. Do not forget to install a suitable LaTeX distribution for your OS though.

Typst

Typst is a new markup-based typesetting system for the sciences. It is designed to be an alternative both to advanced tools like LaTeX and simpler tools like Word and Google Docs. The goal of Typst is to build a typesetting tool that is highly capable and a pleasure to use.

Why Typst?

As compared to LaTeX, it

  • is easy to learn and use.
  • previews your changes instantly.
  • provides clear, understandable error messages.
  • has a consistent styling system for configuring everything from fonts and margins to the look of headings and lists.
  • uses familiar programming constructs instead of hard-to-understand macros.
  • has a very small executable size.
  • is free and open source.

Getting started with Typst

Inline math equations:

$lim_(x->oo) 1/x = 0$

Block math equations:

$ lim_(x->oo) 1/x = 0 $

Demo and exercises of Typst

  • Install VS Code extension: Tinymist Typst.
  • Or go to the webapp (sign up required): https://typst.app/.