@@ -8,17 +8,29 @@ PROGPATH=$2
11+EXAMPLES='HTML fragment:
11−EXAMPLES='pandoc README -o example0.html
12+pandoc README -o example0.html
12pandoc -s -S README -o example0.html
14pandoc -s -S README -o example0.html
15+HTML with smart quotes, CSS, and custom header and footer:
13pandoc -s -S -c main.css -B header.html -A footer.html README -o example0.html
16pandoc -s -S -c main.css -B header.html -A footer.html README -o example0.html
14pandoc -s README -o example0.tex
18pandoc -s README -o example0.tex
19+From LaTeX to markdown:
15pandoc -s README.tex -o example0.txt
20pandoc -s README.tex -o example0.txt
16pandoc -s -w rst README -o example0.txt
22pandoc -s -w rst README -o example0.txt
23+Rich text format (RTF):
17pandoc -s README -o example0.rtf
24pandoc -s README -o example0.rtf
25+S5 HTML slide show (all in one file):
18pandoc -s -m -i -w s5 S5DEMO -o example0.html
26pandoc -s -m -i -w s5 S5DEMO -o example0.html
19pandoc -s -w docbook README -o example0.db
28pandoc -s -w docbook README -o example0.db
29+Converting a web page to markdown:
20html2markdown http://www.gnu.org/software/make/ -o example0.txt
30html2markdown http://www.gnu.org/software/make/ -o example0.txt
21markdown2pdf README -o example0.pdf
32markdown2pdf README -o example0.pdf
33+Using a custom LaTeX header to change the font style of the PDF:
22markdown2pdf -C myheader.tex README -o example0.pdf'
34markdown2pdf -C myheader.tex README -o example0.pdf'
24oldifs=$IFS
36oldifs=$IFS
@@ -35,14 +47,20 @@ click on the name of the output file:
38−for command in "$@"; do
50+while [ $# -gt 0 ]; do
39 num=$(($num + 1))
53 num=$(($num + 1))
40 command=$(echo $command | sed -e "s/0/$num/")
54 command=$(echo $command | sed -e "s/0/$num/")
41 firstpart=$(echo $command | sed -e 's/\(.*\) [^ ]* -o.*/\1/')
55 firstpart=$(echo $command | sed -e 's/\(.*\) [^ ]* -o.*/\1/')
42 input=$(echo $command | sed -e 's/.* \([^ ]*\) -o.*/\1/')
56 input=$(echo $command | sed -e 's/.* \([^ ]*\) -o.*/\1/')
43 output=$(echo $command | sed -e 's/.*-o \(.*\)/\1/')
57 output=$(echo $command | sed -e 's/.*-o \(.*\)/\1/')
58+ echo "1. $description"
44− echo "1. <code>$firstpart <a href=\""$input"\" title=\""View input file"\">$input</a> -o <a href=\""$output"\" title=\""View pandoc output"\">$output</a></code>"
60+ echo " <code>$firstpart <a href=\""$input"\" title=\""View input file"\">$input</a> -o <a href=\""$output"\" title=\""View pandoc output"\">$output</a></code>"
45 echo $command >&2
61 echo $command >&2
46 result=$(PATH=$PROGPATH:$PATH $command) # run the command and create output file
62 result=$(PATH=$PROGPATH:$PATH $command) # run the command and create output file