Fix the indentation in PDF conversion files (#1091)

This commit is contained in:
Zlatan Vasović
2016-09-27 07:15:21 +02:00
committed by Agniva De Sarker
parent 26700bf198
commit 190f8bc5b1
2 changed files with 38 additions and 38 deletions

View File

@@ -6,24 +6,24 @@ template=template.tex
function getContent {
cd $src
cd $src
pages=$(ls -d */ | # list directories
tr -d '/' | # remove trailing slash
tr '[:lower:]' '[:upper:]') # transform to uppercase
pages=$(ls -d */ | # list directories
tr -d '/' | # remove trailing slash
tr '[:lower:]' '[:upper:]') # transform to uppercase
for page in $pages; do
for page in $pages; do
echo "\n\n# $page" >&1 # add a new chapter
echo "\n\n# $page" >&1 # add a new chapter
for file in $(ls $page); do
for file in $(ls $page); do
echo "\n\n" | # add some line breaks for latex
cat - $page/$file | # get the content of the tldr file
sed 's/^#/##/g' >&1 # transform h1 (chapter) to h2 (section)
echo "\n\n" | # add some line breaks for latex
cat - $page/$file | # get the content of the tldr file
sed 's/^#/##/g' >&1 # transform h1 (chapter) to h2 (section)
done
done
done
done
}
getContent | pandoc -o $target --template $template --latex-engine xelatex --listings