Skip to content

Instantly share code, notes, and snippets.

@mooz
Last active April 29, 2018 09:09
Show Gist options
  • Save mooz/ea98bd35ac4b041bef9afa3f7f719954 to your computer and use it in GitHub Desktop.
Save mooz/ea98bd35ac4b041bef9afa3f7f719954 to your computer and use it in GitHub Desktop.
latex-strip-comments
#!/bin/sh
# Usage: latex-strip-comments.sh some_tex_file.tex
cat $1 | latexpand --empty-comments - | sed '/^\s*%/d' | cat -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment