Skip to content

Instantly share code, notes, and snippets.

@felsenhower
Last active April 12, 2023 16:15
Show Gist options
  • Save felsenhower/a975c137732e20273f47a117e0da3fd1 to your computer and use it in GitHub Desktop.
Save felsenhower/a975c137732e20273f47a117e0da3fd1 to your computer and use it in GitHub Desktop.
LaTeX-Logo in Typst
// © 2023 Ruben Felgenhauer
// Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.
#let LaTeX = {
let A = (
offset: (
x: -0.33em,
y: -0.3em,
),
size: 0.7em,
)
let T = (
x_offset: -0.12em
)
let E = (
x_offset: -0.2em,
y_offset: 0.23em,
size: 1em
)
let X = (
x_offset: -0.1em
)
[L#h(A.offset.x)#text(size: A.size, baseline: A.offset.y)[A]#h(T.x_offset)T#h(E.x_offset)#text(size: E.size, baseline: E.y_offset)[E]#h(X.x_offset)X]
}

Typesetting the LaTeX logo with Typst

How to use:

In order to typeset the LaTeX logo with a function, save latex-logo.typ in your working directory and write:

#import "latex-logo.typ": LaTeX

#LaTeX

If you simply want to replace all occurences of the string LaTeX in your document with the LaTeX logo, you can additionally use a show rule:

#show "LaTeX": name => LaTeX

LaTeX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment