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
- [x] create md2verse.sh
- [ ] create mk2parallel.sh
- [ ] fix geometry bug
- [ ] fix multi-word string chapter bug
- [ ] create md2tex.sh
- [ ] create pdf2sig.sh /pdf2book.py -s/--sigsize [0,3,4,5]
- [X] create mk2parallel.sh
- [X] fix geometry bug
- [X] fix multi-word string chapter bug
- [X] create pdf2sig.sh /pdf2book.py -s/--sigsize [0,3,4,5]
- [ ] 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
# CONVERT MD TO TEX
#IFS_OLD=$IFS
#IFS="\n"
for tex in $( echo "$INFILES" | grep '.md$' )
do
if [[ -f $WD/$tex ]]
@ -42,7 +40,6 @@ do
fi
fi
done
#IFS=$IFS_OLD
# CREATE WRAPPER
WRAPPER="""
@ -85,6 +82,8 @@ WRAPPER_END="""
echo "$WRAPPER" > $PROJECT.tex
# INCLUDE INDIVIDUAL TEX FILE
first_lang="true"
IFS_OLD=$IFS
IFS=$'\n'
for input in $INFILES
do
if [[ $input == *.md ]]
@ -101,6 +100,7 @@ do
echo '\chapter' " { $input }" >> $PROJECT.tex
fi
done
IFS=$IFS_OLD
echo "$WRAPPER_END" >> $PROJECT.tex
# CREATE PDF

View File

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