commit f35abc59bb07cde59b1415dd86b945b450105e90 Author: Gijs Vermariƫn Date: Fri Apr 26 19:12:55 2019 +0200 Created the marktex script diff --git a/compile.sh b/compile.sh new file mode 100644 index 0000000..c68e03b --- /dev/null +++ b/compile.sh @@ -0,0 +1,16 @@ +# /bin/bash +notforconversion="readme.md" +echo $notforconversion is excluded from the conversion +markdownfiles=$(find ./ -iname "*.md" -and ! -name $notforconversion) +echo Trying to convert: $markdownfiles +for markdownfile in $markdownfiles; do + latextarget="$(echo $markdownfile | sed -e 's/.md/.tex/')" + if [ $latextarget -ot $markdownfile ]; then + latextarget="$(echo $markdownfile | sed -e 's/.md/.tex/')" + pandoc -f markdown -t latex $markdownfile >>$latextarget + echo "converted" $markdownfile "to" $latextarget + else + echo $markdownfile did not need converting as $latextarget is newer + fi +done +echo "done" diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e5cce4a --- /dev/null +++ b/readme.md @@ -0,0 +1,3 @@ +# marktex +This is a small tool that writes converts all the markdown files in this folder to +a LaTeX .tex files with the corresponding name. It will not convert the readme.md file