1
0
mirror of https://github.com/GijsVermarien/marktex.git synced 2025-12-19 19:21:21 +00:00

Created the marktex script

This commit is contained in:
Gijs Vermariën 2019-04-26 19:12:55 +02:00
commit f35abc59bb
2 changed files with 19 additions and 0 deletions

16
compile.sh Normal file
View File

@ -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"

3
readme.md Normal file
View File

@ -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