From 574290c92f0c62298491134458bd98ceba151774 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Mon, 13 Nov 2006 15:22:41 +0000 Subject: Modified wrapper scripts to pass all command-line options after -- to pandoc. These options override the environment variable PANDOC_OPTS, if it is set. (Note: these changes don't include changes to the documentation or man pages, or to markdown2pdf.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@95 788f1e2b-df1e-0410-8736-df70ead52e1b --- latex2markdown | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'latex2markdown') 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 -- cgit v1.2.3