From 0927f9fc56f9758e678d344d625f21c7f11d3a78 Mon Sep 17 00:00:00 2001
From: Robert Izzard <r.izzard@surrey.ac.uk>
Date: Mon, 15 Jun 2020 11:56:44 +0100
Subject: [PATCH] update markdown maker with comments

---
 make_markdown.sh | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/make_markdown.sh b/make_markdown.sh
index 121baae..5fb955b 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\\\$/\&rarr;/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\\\$/\&rarr;/g;" > astro-lyx.md
-- 
GitLab