fix multi word chapter bug

This commit is contained in:
jowodo 2024-10-03 20:23:20 +02:00
parent 522bf736ca
commit 8095d94103
3 changed files with 9 additions and 10 deletions

View File

@ -69,10 +69,9 @@ s=4: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 -> 16,01.02,15 14,03.04,13 12,05.06,
### TODO ### TODO
- [x] create md2verse.sh - [x] create md2verse.sh
- [ ] create mk2parallel.sh - [X] create mk2parallel.sh
- [ ] fix geometry bug - [X] fix geometry bug
- [ ] fix multi-word string chapter bug - [X] fix multi-word string chapter bug
- [ ] create md2tex.sh - [X] create pdf2sig.sh /pdf2book.py -s/--sigsize [0,3,4,5]
- [ ] create pdf2sig.sh /pdf2book.py -s/--sigsize [0,3,4,5]
- [ ] insert cleaning step (html to md) - [ ] insert cleaning step (html to md)
- [ ] md2html -> sed pertubation -> html2md - [ ] md2html -> sed pertubation -> html2md

View File

@ -26,8 +26,6 @@ PATH=$PATH:$WD
pushd $TMPDIR > /dev/null pushd $TMPDIR > /dev/null
# CONVERT MD TO TEX # CONVERT MD TO TEX
#IFS_OLD=$IFS
#IFS="\n"
for tex in $( echo "$INFILES" | grep '.md$' ) for tex in $( echo "$INFILES" | grep '.md$' )
do do
if [[ -f $WD/$tex ]] if [[ -f $WD/$tex ]]
@ -42,7 +40,6 @@ do
fi fi
fi fi
done done
#IFS=$IFS_OLD
# CREATE WRAPPER # CREATE WRAPPER
WRAPPER=""" WRAPPER="""
@ -85,6 +82,8 @@ WRAPPER_END="""
echo "$WRAPPER" > $PROJECT.tex echo "$WRAPPER" > $PROJECT.tex
# INCLUDE INDIVIDUAL TEX FILE # INCLUDE INDIVIDUAL TEX FILE
first_lang="true" first_lang="true"
IFS_OLD=$IFS
IFS=$'\n'
for input in $INFILES for input in $INFILES
do do
if [[ $input == *.md ]] if [[ $input == *.md ]]
@ -101,6 +100,7 @@ do
echo '\chapter' " { $input }" >> $PROJECT.tex echo '\chapter' " { $input }" >> $PROJECT.tex
fi fi
done done
IFS=$IFS_OLD
echo "$WRAPPER_END" >> $PROJECT.tex echo "$WRAPPER_END" >> $PROJECT.tex
# CREATE PDF # CREATE PDF

View File

@ -7,7 +7,7 @@ PROJECT="asem"
TITLE="Nsɛm wɔ Twi ne Brɔfo\\\LARGE Texts in Twi and English" TITLE="Nsɛm wɔ Twi ne Brɔfo\\\LARGE Texts in Twi and English"
AUTHOR="" AUTHOR=""
INFILES=""" INFILES="""
'Anansesem - Ghanaian Folk Tales' Anansesem - Ghanaian Folk Tales
testfiles/parallel-ak.md testfiles/parallel-ak.md
testfiles/parallel-en.md testfiles/parallel-en.md
""" """