diff --git a/make_markdown.sh b/make_markdown.sh index 121baae4fc985a393a300eebe13bd104d1879fc9..5fb955b674a1c0b6908e69f456f463f81135868a 100755 --- a/make_markdown.sh +++ b/make_markdown.sh @@ -1,5 +1,16 @@ #!/bin/bash + + +# +# make markdown version of astro-lyx.lyx +# + +# use lyx to export astro-lyx.lyx in latex lyx --export latex astro-lyx.lyx +# remove inputenc and fontenc (these freeze pandoc) cat astro-lyx.tex |grep -v inputenc|grep -v fontenc > a.tex ; mv a.tex astro-lyx.tex +# run through pandoc to make markdown version +iconv -t utf-8 astro-lyx.tex | pandoc -s --wrap=none -f latex -t markdown | perl -pe "s/\{.*? \.unnumbered\}//g; s/\\\$\\\\rightarrow\\\$/\→/g;" > astro-lyx.md + +# export also as pdf lyx --export pdf astro-lyx.lyx -iconv -t utf-8 astro-lyx.tex | pandoc -s --wrap=none -f latex -t markdown | perl -pe "s/\{.*? \.unnumbered\}//g; s/\\\$\\\\rightarrow\\\$/\→/g;" > astro-lyx.md