forked from phc/dm-scripts
removeproofs script
This commit is contained in:
@@ -71,3 +71,15 @@ Questa repository contiene i seguenti script:
|
||||
- `pdfcompress` — [@aziis98](https://git.phc.dm.unipi.it/aziis98) (script preso in prestito [da questa repo](https://git.phc.dm.unipi.it/aziis98/chatgpt-scripts/src/branch/main/bin/pdfcompress2))
|
||||
|
||||
Comprime un PDF vettorizzato (ad esempio note scritte su un iPad) utilizzando poppler (file di ~100MB diventa tranquillamente di ~10MB)
|
||||
|
||||
- `removeproofs` — [@lukefleed](https://git.phc.dm.unipi.it/lukefleed)
|
||||
|
||||
Rimuove le dimostrazioni da un file `.tex`, utile per creare piccoli cheat sheet da portare agli esami dove è consentito portare materiale di studio.
|
||||
|
||||
Utilizzo:
|
||||
|
||||
```bash
|
||||
removeproofs <file.tex>
|
||||
```
|
||||
|
||||
Questo script è stato utilizzato per creare dei riassunti di Geometria 2 da delle dispense più complete: [G2-cheat-sheet](https://github.com/lukefleed/G2-cheat-sheet)
|
||||
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: $0 <input_tex_file>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
input_file=$1
|
||||
output_file="${input_file%.tex}_without_proofs.tex"
|
||||
|
||||
awk '/\\begin{proof}/, /\\end{proof}/ {next} 1' "$input_file" > "$output_file"
|
||||
|
||||
echo "Lines between \\begin{proof} and \\end{proof} have been removed. Output saved to: $output_file"
|
||||
|
||||
Reference in New Issue
Block a user