Skip to content

Instantly share code, notes, and snippets.

/*
The MIT License (MIT)
Original work Copyright (c) 2014 Ismael Celis
Modified work Copyright 2022 Markus Bach
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
@dingensundso
dingensundso / latex-mupdf-update
Created April 20, 2013 16:30
These to scripts monitor the tex-File you're editing and compile it (and tell mupdf to reload) when you made changes. Just start mupdf with "mupdf-latex-launch file.tex" and start working on your masterpiece.
#!/bin/bash
# Licensed under GPL <http://www.gnu.org/licenses/>.
# Slightly edited version of the live-latex-update.sh from vim-live-latex-preview
# <https://aur.archlinux.org/packages/vim-live-latex-preview/>
file="$1"
mupid=$(cat /tmp/llmupdf.pid)
windowid=$(xdotool search --pid $mupid --class MuPDF | head -n1)
logfile="${file%.tex}.log"
auxfile="${file%.tex}.aux"