Created
September 9, 2019 16:35
-
-
Save pedroarthur/886939465c2e0faa5889712ee9606ed5 to your computer and use it in GitHub Desktop.
The simplest LaTeX syntax remover
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
sed \ | |
-r \ | |
-e 's/^%.*$//' \ | |
-e 's/\\emph\{([^{]+)\}/\1/g' \ | |
-e 's/\\ref\{([^{]+)\}/\1/g' \ | |
-e 's/\\cite\{([^{]+)\} //g' \ | |
-e 's/ \\cite\{([^{]+)\}//g' \ | |
-e 's/\$.+\$/formula/' \ | |
-e 's/~/ /' \ | |
-e '/\\begin\{figure\}/,/\\end\{figure\}/d' \ | |
"${@}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment