Spaces:
Sleeping
Sleeping
Download scripts/find_and_replace.sh from msdkhairi/math2latex: direct link, hf CLI and curl.
- Browser
- Download file 472 Bytes
-
https://huggingface.co/spaces/msdkhairi/math2latex/resolve/main/scripts/find_and_replace.sh
- Command line
-
hf download hf://spaces/msdkhairi/math2latex/scripts/find_and_replace.sh
-
curl -L -o find_and_replace.sh https://huggingface.co/spaces/msdkhairi/math2latex/resolve/main/scripts/find_and_replace.sh
472 Bytes
| # Replace \left( with ( | |
| # Replace \right) with ) | |
| # Replace \left[ with [ | |
| # Replace \right] with ] | |
| # Replace \left{ with { | |
| # Replace \right} with } | |
| # Replace \vspace { } with an empty string | |
| # Replace \hspace { } with an empty string | |
| sed -E 's/\\left\(/\(/g; s/\\right\)/\)/g; s/\\left\[/\[/g; s/\\right\]/\]/g; s/\\left\{/\{/g; s/\\right\}/\}/g; s/\\vspace( \*)? \{ [ 0-9a-zA-Z.~-]*[^}]* \}//g; s/\\hspace( \*)? \{ [ 0-9a-zA-Z.~-]*[^}]* \}//g' \ | |
| $1 >> $2 |