Skip to content

Instantly share code, notes, and snippets.

@hubgit
Last active June 15, 2025 20:43
Show Gist options
  • Save hubgit/07c0726f94e2f52933cd24bea5e92dbe to your computer and use it in GitHub Desktop.
Save hubgit/07c0726f94e2f52933cd24bea5e92dbe to your computer and use it in GitHub Desktop.
Convert tex.web to tex.pa
# install Free Pascal
brew install fpc
wget --no-verbose http://mirrors.ctan.org/systems/knuth/dist.zip
wget --no-verbose http://mirrors.ctan.org/systems/knuth/local.zip
wget --no-verbose http://mirrors.ctan.org/systems/unix/tex-fpc.zip
unzip '*.zip'
cd tex-fpc/
# compile tangle binary
fpc -Miso tangle.p
# untangle weave pascal from web
./tangle ../dist/web/weave.web weave.ch weave.pas weave.pool
# compile weave binary
fpc -Miso weave.pas
# unweave weave documentation from web
#./weave ../dist/web/weave.web weave.ch weave.tex
# untangle tex pascal from web
./tangle ../dist/tex/tex.web ../tex-fpc/tex.ch tex.pa tex.pool
# unweave tex documentation from web
./weave ../dist/tex/tex.web ../tex-fpc/tex.ch tex.tex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment