aboutsummaryrefslogtreecommitdiff
path: root/latex2markdown
diff options
context:
space:
mode:
Diffstat (limited to 'latex2markdown')
-rw-r--r--latex2markdown10
1 files changed, 9 insertions, 1 deletions
diff --git a/latex2markdown b/latex2markdown
index 4f5efef83..d6a991307 100644
--- a/latex2markdown
+++ b/latex2markdown
@@ -21,4 +21,12 @@ for p in pandoc; do
}
done
-iconv -t utf-8 $* | pandoc $PANDOC_OPTS -r latex -w markdown -s | iconv -f utf-8
+ALL="$*"
+ARGS=${ALL%%-- *}
+REST=${ALL#$ARGS}
+
+REST=${REST#--}
+PANDOC_OPTS=${REST:-$PANDOC_OPTS}
+
+iconv -t utf-8 $ARGS | pandoc $PANDOC_OPTS -r latex -w markdown -s | \
+ iconv -f utf-8