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