Skip to content

Instantly share code, notes, and snippets.

View kysucix's full-sized avatar
👽

Silvano Galliani kysucix

👽
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kysucix on github.
  • I am kysucix (https://keybase.io/kysucix) on keybase.
  • I have a public key whose fingerprint is DCAF D3F4 2B54 637B 33A9 8491 9C97 0436 CDFB EF02

To claim this, I am signing this object:

@kysucix
kysucix / strip_comments.py
Created December 2, 2016 13:46 — forked from amerberg/strip_comments.py
A script to remove comments from LaTeX source
import ply.lex, argparse, io
#Usage
# python stripcomments.py input.tex > output.tex
# python stripcomments.py input.tex -e encoding > output.tex
def strip_comments(source):
tokens = (
'PERCENT', 'BEGINCOMMENT', 'ENDCOMMENT', 'BACKSLASH',
'CHAR', 'BEGINVERBATIM', 'ENDVERBATIM', 'NEWLINE', 'ESCPCT',