Last active
August 29, 2015 14:06
-
-
Save maxbeier/8bf146d596590f85f20d to your computer and use it in GitHub Desktop.
Takes a LaTeX file, replaces all `\input`s with the actual content and combines everything into a single file.
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
cat input.tex | ruby -pe '$_.match(/[^%]\\input\{(.+?)\}/) { $_ = IO.binread($1 + ".tex") + "\n\r" }' > output.tex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment