-
taggy
is an easy-to-use api for tagging structured text, see example below. -
With
taggy
you can make good-looking slides in pdf via latex. See example here. Future plans include generation of markdown and html. -
taggy
is a zero-dependency Scala 3 library that shows how you can construct a concise and type-safe Scala-embedded DSL using contextual abstraction. -
WARNING:
taggy
is a proof-of-concept and still under development. It benefits from an experimental feature of the Scala 3.2.nightly compiler calledfewerBraces
. -
You need to have
latexmk
from TexLive on your path. Install it on Ubuntu usingsudo apt install texlive-full
- See example usage of
taggy
below, withscala-cli
that automatically downloadstaggy
as a Github dependency. - Copy-paste the text below and save it in a file called
my-slides.scala
in an empty new folder and doscala-cli run .
in that folder.
// Two magic comments used by scala-cli (just copy-paste them):
//> using lib "taggy:taggy:0.0.5,url=https://github.com/bjornregnell/taggy/releases/download/v0.0.5/taggy_3-0.0.5.jar"
//> using scala "3.3.0-RC3"
// run this command in terminal to create slides in target/out.pdf
// scala-cli run .
import taggy.*
@main def run = slides.toPdf()
def slides = document("Taggy Slide Example"):
frame("Greetings in two languages"):
p("Nice greetings:")
itemize:
p("English: Hello world!")
p("Swedish: Hej världen!")
p("https://github.com/bjornregnell/taggy")
- Instead of doing the copy-paste-save above you can just run this command and you should get see slides in a pdf viewer when ready:
curl -fL https://github.com/bjornregnell/taggy/releases/download/v0.0.5/init-slides.sh | bash
- See more examples here.
scala-cli --power package taggy.scala -o taggy_3-0.0.5.jar --library
- Bump all versions to
x.y.z
in README.md and example.scala by replacing allx.y.{z - 1}
byx.y.z
- Draft a new release on https://github.com/bjornregnell/taggy/releases
- Build and upload jar named
taggy_3-x.y.z.jar