Created
December 3, 2013 08:44
-
-
Save rsdy/7765974 to your computer and use it in GitHub Desktop.
Pdflatex livecoding with tmux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SESSION=$USER-$(dirname "$0") | |
tmux -2 new-session -d -s $SESSION | |
# Setup a window for tailing log files | |
tmux new-window -t $SESSION:1 -n 'stuff' | |
tmux split-window -v -l 1 "okular plan.pdf" | |
tmux select-pane -t 0 | |
tmux split-window -v -l 10 "make live" | |
tmux select-pane -t 0 | |
tmux send-keys "$EDITOR plan.md" C-m | |
# Set default window | |
tmux select-window -t $SESSION:1 | |
# Attach to session | |
tmux -2 attach-session -t $SESSION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do: | |
pandoc -f markdown -t latex plan.md > sections.tex | |
pdflatex plan.tex | |
pdflatex plan.tex | |
live: | |
while inotifywait plan.md; do \ | |
make do; \ | |
done | |
.PHONY = do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment