mirror of
https://github.com/kuhyx/engineer-thesis-WUT.git
synced 2026-07-06 22:03:01 +02:00
feat: nice script
This commit is contained in:
parent
649c74ce97
commit
8831dd011c
File diff suppressed because it is too large
Load Diff
16
Thesis/latex_transform.sh
Executable file
16
Thesis/latex_transform.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Usage: ./latex_transform.sh <input_file.tex> <output_file.tex>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
input_file=$1
|
||||
output_file=$2
|
||||
|
||||
# First, transform subsections
|
||||
sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+) (.*)/\\subsection{\2}/' $input_file > $output_file
|
||||
|
||||
# Then, transform sections (note the use of `-i` to modify the output file in place)
|
||||
sed -i -E 's/^([0-9]+\.[0-9]+) (.*)/\\section{\2}/' $output_file
|
||||
|
||||
Loading…
Reference in New Issue
Block a user