From d25d51a2132df42e314379f4394c9f8ca61d67de Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 21 Jan 2024 11:57:20 +0100 Subject: initial commit --- demo.pdf | Bin 0 -> 67053 bytes demo.svg | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ demo.typ | 11 ++++ license | 21 +++++++ makefile | 9 +++ metalogo.typ | 11 ++++ readme.md | 22 ++++++++ typst.toml | 11 ++++ 8 files changed, 264 insertions(+) create mode 100644 demo.pdf create mode 100644 demo.svg create mode 100644 demo.typ create mode 100644 license create mode 100644 makefile create mode 100644 metalogo.typ create mode 100644 readme.md create mode 100644 typst.toml diff --git a/demo.pdf b/demo.pdf new file mode 100644 index 0000000..0c36bb6 Binary files /dev/null and b/demo.pdf differ diff --git a/demo.svg b/demo.svg new file mode 100644 index 0000000..dcee6e6 --- /dev/null +++ b/demo.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo.typ b/demo.typ new file mode 100644 index 0000000..2a01f6b --- /dev/null +++ b/demo.typ @@ -0,0 +1,11 @@ +#set page(width: 35em, height: auto) +#set text(font: "New Computer Modern") + +#import "metalogo.typ": TeX, LaTeX, XeLaTeX, XeTeX, LuaLaTeX + +#LaTeX is a typestting program based on #TeX. Some people use #XeLaTeX +(sometimes #XeTeX), or #LuaLaTeX to typeset their documents. + +People who are afraid of #LaTeX and its complex macro system may use typst +instead. + diff --git a/license b/license new file mode 100644 index 0000000..6faf3cf --- /dev/null +++ b/license @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 lonkaars + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/makefile b/makefile new file mode 100644 index 0000000..feef4f6 --- /dev/null +++ b/makefile @@ -0,0 +1,9 @@ +all: demo.svg + +%.pdf: %.typ + typst compile $< + +%.svg: %.pdf + pdf2svg $< $@ + rsvg-convert --zoom 3 --background-color white --format svg --output $@ $@ + diff --git a/metalogo.typ b/metalogo.typ new file mode 100644 index 0000000..5db1146 --- /dev/null +++ b/metalogo.typ @@ -0,0 +1,11 @@ +// TODO: base should *actually* be lowered by 0.5ex, but Typst does not yet +// have an ex unit, only em. See https://github.com/typst/typst/issues/2405 +#let baseline-drop = 0.22em + +#let TeX = [#box(baseline: baseline-drop)[T#h(-.1667em)#box(baseline: baseline-drop)[E]#h(-.125em)X]] +#let Xe = [#box(baseline: baseline-drop)[X#h(-.1667em)#box(baseline: baseline-drop)[#scale(x: -100%)[E]]#h(-.125em)]] +#let LaTeX = [#box(baseline: baseline-drop)[L#h(-.33em)#box(baseline: -0.2em)[#text(0.7em)[A]]#h(-.15em)#TeX]] +#let XeTeX = [#box(baseline: baseline-drop)[#Xe#TeX]] +#let XeLaTeX = [#box(baseline: baseline-drop)[#Xe#LaTeX]] +#let LuaLaTeX = [#box(baseline: baseline-drop)[Lua#LaTeX]] + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..7018ef8 --- /dev/null +++ b/readme.md @@ -0,0 +1,22 @@ +# typst-metalogo + +Typeset LaTeX compiler logos in [typst](https://github.com/typst/typst). + +## usage + +From [./demo.typ](./demo.typ): + +```typ +#import "metalogo.typ": TeX, LaTeX, XeLaTeX, XeTeX, LuaLaTeX + +#LaTeX is a typestting program based on #TeX. Some people use #XeLaTeX +(sometimes #XeTeX), or #LuaLaTeX to typeset their documents. + +People who are afraid of #LaTeX and its complex macro system may use typst +instead. +``` + +Output: + +![](./demo.svg) + diff --git a/typst.toml b/typst.toml new file mode 100644 index 0000000..1415bd4 --- /dev/null +++ b/typst.toml @@ -0,0 +1,11 @@ +[package] +name = "metalogo" +version = "1.0" +authors = ["Loek Le Blansch "] +license = "MIT" +description = "Typeset various LaTeX logos" +repository = "https://github.com/lonkaars/typst-metalogo.git" +keywords = ["metalogo", "logo", "LaTeX", "XeLaTeX", "XeTeX", "LuaLaTeX"] +entrypoint = "metalogo.typ" +compiler = "0.10.0" +exclude = ["demo.typ", "demo.pdf"] -- cgit v1.2.3