git.iko.soy/typeable/pandoc
on master help sign in
Removed markdown2pdf and all references to it.
1cbc974fiddlosopher
INSTALL+1−2
@@ -175,8 +175,7 @@ but are documented here for packagers and developers:
175 persistence.
175 persistence.
176 - Runs Cabal's "configure" command.
176 - Runs Cabal's "configure" command.
177* `build-exec`: Builds `pandoc` executable (using Cabal's "build"
177* `build-exec`: Builds `pandoc` executable (using Cabal's "build"
178− command) and creates the wrappers `html2markdown` and `markdown2pdf`
178+ command).
179− from templates in `src/wrappers`.
180* `build-doc`: Builds program documentation (e.g. `README.html`).
179* `build-doc`: Builds program documentation (e.g. `README.html`).
181* `build-lib-doc`: Builds Haddock documentation for Pandoc libraries.
180* `build-lib-doc`: Builds Haddock documentation for Pandoc libraries.
182* `install-doc`, `uninstall-doc`: Installs/uninstalls user documentation
181* `install-doc`, `uninstall-doc`: Installs/uninstalls user documentation
Makefile+3−3
@@ -24,7 +24,7 @@ EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:\{0,1\}[[:space:]]*//p' $(CABAL))
24#-------------------------------------------------------------------------------
24#-------------------------------------------------------------------------------
25# Install targets
25# Install targets
26#-------------------------------------------------------------------------------
26#-------------------------------------------------------------------------------
27−WRAPPERS := html2markdown markdown2pdf hsmarkdown
27+WRAPPERS := html2markdown hsmarkdown
28# Add .exe extensions if we're running Windows/Cygwin.
28# Add .exe extensions if we're running Windows/Cygwin.
29EXTENSION := $(shell uname | tr '[:upper:]' '[:lower:]' | \
29EXTENSION := $(shell uname | tr '[:upper:]' '[:lower:]' | \
30 sed -ne 's/^cygwin.*$$/\.exe/p')
30 sed -ne 's/^cygwin.*$$/\.exe/p')
@@ -85,8 +85,8 @@ all: build-program
85 ./$(MAIN) -s -w latex $< >$@ || rm -f $@
85 ./$(MAIN) -s -w latex $< >$@ || rm -f $@
86%.rtf: % $(MAIN)
86%.rtf: % $(MAIN)
87 ./$(MAIN) -s -w rtf $< >$@ || rm -f $@
87 ./$(MAIN) -s -w rtf $< >$@ || rm -f $@
88−%.pdf: % $(MAIN) markdown2pdf
88+%.pdf: % $(MAIN)
89− sh ./markdown2pdf $< || rm -f $@
89+ ./$(MAIN) -w pdf -o $@ $< || rm -f $@
90%.txt: %
90%.txt: %
91 perl -p -e 's/\n/\r\n/' $< > $@ || rm -f $@ # convert to DOS line endings
91 perl -p -e 's/\n/\r\n/' $< > $@ || rm -f $@ # convert to DOS line endings
92
92
README+10−35
@@ -55,9 +55,9 @@ If you want to write to a file, use the `-o` option:
55
55
56 pandoc -o hello.html hello.txt
56 pandoc -o hello.html hello.txt
57
57
58−[^1]: The exception is for non-text output formats, such as `odt`.
58+[^1]: The exception is for non-text output formats, such as `odt`
59− For output in `odt` format, an output file must be specified
59+ and `pdf`. For output in these formats, an output file must be
60− explicitly.
60+ specified explicitly.
61
61
62Note that you can specify multiple input files on the command line.
62Note that you can specify multiple input files on the command line.
63`pandoc` will concatenate them all (with blank lines between them)
63`pandoc` will concatenate them all (with blank lines between them)
@@ -148,37 +148,12 @@ then convert the output back to the local encoding.
148Shell scripts
148Shell scripts
149=============
149=============
150
150
151−Three shell scripts, `markdown2pdf`, `html2markdown`, and
151+Two shell scripts, `html2markdown` and `hsmarkdown`, are included in
152−`hsmarkdown`, are included in the standard Pandoc installation. (They
152+the standard Pandoc installation. (They are not included in the Windows
153−are not included in the Windows binary package, as they require a POSIX
153+binary package, as they require a POSIX shell, but they may be used in
154−shell, but they may be used in Windows under Cygwin.)
154+Windows under Cygwin.)
155
155
156−1. `markdown2pdf` produces a PDF file from markdown-formatted
157− text, using `pandoc` and `pdflatex`. The default
158− behavior of `markdown2pdf` is to create a file with the same
159− base name as the first argument and the extension `pdf`; thus,
160− for example,
161−
162− markdown2pdf sample.txt endnotes.txt
163−
164− will produce `sample.pdf`. (If `sample.pdf` exists already,
165− it will be backed up before being overwritten.) An output file
166− name can be specified explicitly using the `-o` option:
167−
168− markdown2pdf -o book.pdf chap1 chap2
169−
170− If no input file is specified, input will be taken from stdin.
171− All of `pandoc`'s options will work with `markdown2pdf` as well.
172−
173− `markdown2pdf` assumes that `pdflatex` is in the path. It also
174− assumes that the following LaTeX packages are available:
175− `unicode`, `fancyhdr` (if you have verbatim text in footnotes),
176− `graphicx` (if you use images), `array` (if you use tables),
177− and `ulem` (if you use strikeout text). If they are not already
178− included in your LaTeX distribution, you can get them from
179− [CTAN].
180−
181−2. `html2markdown` grabs a web page from a file or URL and converts
156+1. `html2markdown` grabs a web page from a file or URL and converts
182 it to markdown-formatted text, using `tidy` and `pandoc`.
157 it to markdown-formatted text, using `tidy` and `pandoc`.
183
158
184 All of `pandoc`'s options will work with `html2markdown` as well.
159 All of `pandoc`'s options will work with `html2markdown` as well.
@@ -207,7 +182,7 @@ shell, but they may be used in Windows under Cygwin.)
207 It uses [`iconv`] for character encoding conversions; if `iconv`
182 It uses [`iconv`] for character encoding conversions; if `iconv`
208 is absent, it will still work, but it will treat everything as UTF-8.
183 is absent, it will still work, but it will treat everything as UTF-8.
209
184
210−3. `hsmarkdown` is designed to be used as a drop-in replacement for
185+2. `hsmarkdown` is designed to be used as a drop-in replacement for
211 `Markdown.pl`. It forces `pandoc` to convert from markdown to
186 `Markdown.pl`. It forces `pandoc` to convert from markdown to
212 HTML, and to use the `--strict` flag for maximal compliance with
187 HTML, and to use the `--strict` flag for maximal compliance with
213 official markdown syntax. (All of Pandoc's syntax extensions and
188 official markdown syntax. (All of Pandoc's syntax extensions and
@@ -252,7 +227,7 @@ For further documentation, see the `pandoc(1)` man page.
252`-o` or `--output` *filename*
227`-o` or `--output` *filename*
253: sends output to *filename*. If this option is not specified,
228: sends output to *filename*. If this option is not specified,
254 or if its argument is `-`, output will be sent to stdout.
229 or if its argument is `-`, output will be sent to stdout.
255− (Exception: if the output format is `odt`, output to stdout
230+ (Exception: if the output format is `odt` or `pdf`, output to stdout
256 is disabled.)
231 is disabled.)
257
232
258`-p` or `--preserve-tabs`
233`-p` or `--preserve-tabs`
Setup.hs+1−1
@@ -50,7 +50,7 @@ makeReferenceODT sources = do
50
50
51-- | Build man pages from markdown sources in man/man1/.
51-- | Build man pages from markdown sources in man/man1/.
52makeManPages _ _ _ _ = do
52makeManPages _ _ _ _ = do
53− mapM makeManPage ["pandoc.1", "hsmarkdown.1", "markdown2pdf.1", "html2markdown.1"]
53+ mapM makeManPage ["pandoc.1", "hsmarkdown.1", "html2markdown.1"]
54 return ()
54 return ()
55
55
56-- | Build a man page from markdown source in man/man1.
56-- | Build a man page from markdown source in man/man1.
debian/control+9−9
@@ -18,9 +18,9 @@ Description: general markup converter
18 Pandoc is a Haskell library for converting from one markup format to
18 Pandoc is a Haskell library for converting from one markup format to
19 another, and a command-line tool that uses this library. It can read
19 another, and a command-line tool that uses this library. It can read
20 markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it
20 markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it
21− can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, DocBook XML,
21+ can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, PDF,
22− OpenDocument XML, RTF, GNU Texinfo, MediaWiki markup, groff man pages,
22+ DocBook XML, OpenDocument XML, ODT, RTF, GNU Texinfo, MediaWiki markup,
23− and S5 HTML slide shows.
23+ groff man pages, and S5 HTML slide shows.
24 .
24 .
25 Pandoc extends standard markdown syntax with footnotes, embedded LaTeX,
25 Pandoc extends standard markdown syntax with footnotes, embedded LaTeX,
26 tables, definition lists, and other features. A compatibility mode is
26 tables, definition lists, and other features. A compatibility mode is
@@ -44,9 +44,9 @@ Description: general markup converter
44 Pandoc is a Haskell library for converting from one markup format to
44 Pandoc is a Haskell library for converting from one markup format to
45 another, and a command-line tool that uses this library. It can read
45 another, and a command-line tool that uses this library. It can read
46 markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it
46 markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it
47− can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, DocBook XML,
47+ can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, PDF,
48− OpenDocument XML, RTF, GNU Texinfo, MediaWiki markup, groff man pages,
48+ DocBook XML, OpenDocument XML, ODT, RTF, GNU Texinfo, MediaWiki markup,
49− and S5 HTML slide shows.
49+ groff man pages, and S5 HTML slide shows.
50 .
50 .
51 Pandoc extends standard markdown syntax with footnotes, embedded LaTeX,
51 Pandoc extends standard markdown syntax with footnotes, embedded LaTeX,
52 tables, definition lists, and other features. A compatibility mode is
52 tables, definition lists, and other features. A compatibility mode is
@@ -70,9 +70,9 @@ Description: general markup converter
70 Pandoc is a Haskell library for converting from one markup format to
70 Pandoc is a Haskell library for converting from one markup format to
71 another, and a command-line tool that uses this library. It can read
71 another, and a command-line tool that uses this library. It can read
72 markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it
72 markdown and (subsets of) reStructuredText, HTML, and LaTeX, and it
73− can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, DocBook XML,
73+ can write markdown, reStructuredText, HTML, LaTeX, ConTeXt, PDF,
74− OpenDocument XML, RTF, GNU Texinfo, MediaWiki markup, groff man pages,
74+ DocBook XML, OpenDocument XML, ODT, RTF, GNU Texinfo, MediaWiki markup,
75− and S5 HTML slide shows.
75+ groff man pages, and S5 HTML slide shows.
76 .
76 .
77 Pandoc extends standard markdown syntax with footnotes, embedded LaTeX,
77 Pandoc extends standard markdown syntax with footnotes, embedded LaTeX,
78 tables, definition lists, and other features. A compatibility mode is
78 tables, definition lists, and other features. A compatibility mode is
debian/rules+1−1
@@ -111,7 +111,7 @@ binary-arch: build install
111 dh_installexamples -a
111 dh_installexamples -a
112 dh_installman -a
112 dh_installman -a
113 dh_link -a
113 dh_link -a
114− dh_strip -a -Xhtml2 -Xmarkdown2 -Xlatex2 -Xrst2
114+ dh_strip -a -Xhtml2
115 dh_compress -a
115 dh_compress -a
116 dh_fixperms -a
116 dh_fixperms -a
117 dh_installdeb -a
117 dh_installdeb -a
freebsd/Makefile.in+3−5
@@ -16,16 +16,14 @@ COMMENT= A general markup converter
16BUILD_DEPENDS= ghc>=6.6:${PORTSDIR}/lang/ghc
16BUILD_DEPENDS= ghc>=6.6:${PORTSDIR}/lang/ghc
17
17
18MANCOMPRESSED= no
18MANCOMPRESSED= no
19−MAN1= pandoc.1 markdown2pdf.1 html2markdown.1 hsmarkdown.1 markdown2odt.1
19+MAN1= pandoc.1 html2markdown.1 hsmarkdown.1
20
20
21USE_GMAKE= yes
21USE_GMAKE= yes
22USE_PERL5= yes
22USE_PERL5= yes
23
23
24−PLIST_FILES= bin/pandoc bin/markdown2pdf bin/html2markdown bin/hsmarkdown \
24+PLIST_FILES= bin/pandoc bin/html2markdown bin/hsmarkdown
25− bin/markdown2odt
26PORTDOCS= BUGS README README.html
25PORTDOCS= BUGS README README.html
27−SCRIPTS= hsmarkdown html2markdown markdown2pdf markdown2odt
26+SCRIPTS= hsmarkdown html2markdown
28−DATA_FILES= odt-styles/reference.odt
29
27
30do-install:
28do-install:
31 @${INSTALL_PROGRAM} ${WRKSRC}/dist/build/pandoc/pandoc ${PREFIX}/bin
29 @${INSTALL_PROGRAM} ${WRKSRC}/dist/build/pandoc/pandoc ${PREFIX}/bin
freebsd/pkg-descr+2−2
@@ -1,8 +1,8 @@
1Pandoc is a command-line tool for converting from one markup format
1Pandoc is a command-line tool for converting from one markup format
2to another. It can read markdown and (subsets of) reStructuredText,
2to another. It can read markdown and (subsets of) reStructuredText,
3HTML, and LaTeX, and it can write markdown, reStructuredText, HTML,
3HTML, and LaTeX, and it can write markdown, reStructuredText, HTML,
4−LaTeX, ConTeXt, DocBook XML, OpenDocument XML, RTF, GNU Texinfo,
4+LaTeX, ConTeXt, PDF, DocBook XML, OpenDocument XML, ODT, RTF, GNU
5−MediaWiki markup, groff man pages, and S5 HTML slide shows.
5+Texinfo, MediaWiki markup, groff man pages, and S5 HTML slide shows.
6
6
7Pandoc extends standard markdown syntax with footnotes, embedded LaTeX,
7Pandoc extends standard markdown syntax with footnotes, embedded LaTeX,
8and other features. A compatibility mode is provided for those who
8and other features. A compatibility mode is provided for those who
macports/Portfile.in+4−4
@@ -11,7 +11,7 @@ long_description \
11 Pandoc is a command-line tool for converting from one markup format \
11 Pandoc is a command-line tool for converting from one markup format \
12 to another. It can read markdown and (subsets of) reStructuredText, \
12 to another. It can read markdown and (subsets of) reStructuredText, \
13 HTML, and LaTeX, and it can write markdown, reStructuredText, HTML, \
13 HTML, and LaTeX, and it can write markdown, reStructuredText, HTML, \
14− LaTeX, ConTeXt, DocBook XML, OpenDocument XML, RTF, Texinfo, \
14+ LaTeX, ConTeXt, PDF, DocBook XML, OpenDocument XML, ODT, RTF, Texinfo, \
15 MediaWiki markup, groff man, and S5 HTML slide shows.
15 MediaWiki markup, groff man, and S5 HTML slide shows.
16
16
17homepage http://johnmacfarlane.net/pandoc/
17homepage http://johnmacfarlane.net/pandoc/
@@ -40,8 +40,8 @@ destroot {
40 xinstall -m 755 ${worksrcpath}/unregister.sh \
40 xinstall -m 755 ${worksrcpath}/unregister.sh \
41 ${destroot}${prefix}/libexec/${name}-${version}
41 ${destroot}${prefix}/libexec/${name}-${version}
42 # install shell scripts:
42 # install shell scripts:
43− xinstall -m 755 -W ${worksrcpath} html2markdown hsmarkdown markdown2pdf \
43+ xinstall -m 755 -W ${worksrcpath} html2markdown hsmarkdown \
44− markdown2odt ${destroot}${prefix}/bin
44+ ${destroot}${prefix}/bin
45 # install data file:
45 # install data file:
46 xinstall -d ${destroot}${prefix}/share/${name}
46 xinstall -d ${destroot}${prefix}/share/${name}
47 xinstall -m 644 -W ${worksrcpath} odt-styles/reference.odt \
47 xinstall -m 644 -W ${worksrcpath} odt-styles/reference.odt \
@@ -51,7 +51,7 @@ destroot {
51 xinstall -m 644 -W ${worksrcpath} README README.html COPYRIGHT BUGS \
51 xinstall -m 644 -W ${worksrcpath} README README.html COPYRIGHT BUGS \
52 ${destroot}${prefix}/share/doc/${name}
52 ${destroot}${prefix}/share/doc/${name}
53 xinstall -m 644 -W ${worksrcpath}/man/man1 pandoc.1 hsmarkdown.1 \
53 xinstall -m 644 -W ${worksrcpath}/man/man1 pandoc.1 hsmarkdown.1 \
54− markdown2pdf.1 html2markdown.1 markdown2odt.1 \
54+ html2markdown.1 \
55 ${destroot}${prefix}/share/man/man1
55 ${destroot}${prefix}/share/man/man1
56}
56}
57
57
man/man1/markdown2pdf.1.mddeleted−69
@@ -1,69 +0,0 @@
1−% MARKDOWN2PDF(1) Pandoc User Manuals
2−% John MacFarlane and Recai Oktas
3−% January 8, 2008
4−
5−# NAME
6−
7−markdown2pdf - converts markdown-formatted text to PDF, using pdflatex
8−
9−# SYNOPSIS
10−
11−markdown2pdf [*options*] [*input-file*]...
12−
13−# DESCRIPTION
14−
15−`markdown2pdf` converts *input-file* (or text from standard
16−input) from markdown-formatted plain text to PDF, using `pdflatex`.
17−If no output filename is specified (using the `-o` option),
18−the name of the output file is derived from the input file; thus, for
19−example, if the input file is *hello.txt*, the output file will be
20−*hello.pdf*. If the input is read from STDIN and no output filename
21−is specified, the output file will be named *stdin.pdf*. If multiple
22−input files are specified, they will be concatenated before conversion,
23−and the name of the output file will be derived from the first input file.
24−
25−Input is assumed to be in the UTF-8 character encoding. If your
26−local character encoding is not UTF-8, you should pipe input
27−through `iconv`:
28−
29− iconv -t utf-8 input.txt | markdown2pdf
30−
31−`markdown2pdf` assumes that the `unicode`, `array`, `fancyvrb`,
32−`graphicx`, and `ulem` packages are in latex's search path. If these
33−packages are not included in your latex setup, they can be obtained from
34−<http://ctan.org>.
35−
36−# OPTIONS
37−
38−`markdown2pdf` is a wrapper around `pandoc`, so all of
39−`pandoc`'s options can be used with `markdown2pdf` as well.
40−See `pandoc`(1) for a complete list.
41−The following options are most relevant:
42−
43−-o *FILE*, \--output=*FILE*
44−: Write output to *FILE*.
45−
46−\--strict
47−: Use strict markdown syntax, with no extensions or variants.
48−
49−-N, \--number-sections
50−: Number section headings in LaTeX output. (Default is not to number them.)
51−
52−-H *FILE*, \--include-in-header=*FILE*
53−: Include (LaTeX) contents of *FILE* at the end of the header. Implies
54− `-s`.
55−
56−-B *FILE*, \--include-before-body=*FILE*
57−: Include (LaTeX) contents of *FILE* at the beginning of the document body.
58−
59−-A *FILE*, \--include-after-body=*FILE*
60−: Include (LaTeX) contents of *FILE* at the end of the document body.
61−
62−-C *FILE*, \--custom-header=*FILE*
63−: Use contents of *FILE*
64− as the LaTeX document header (overriding the default header, which can be
65− printed using `pandoc -D latex`). Implies `-s`.
66−
67−# SEE ALSO
68−
69−`pandoc`(1), `pdflatex`(1)
markdown2pdfdeleted−140
@@ -1,140 +0,0 @@
1−#!/bin/sh -e
2−
3−REQUIRED="pdflatex"
4−SYNOPSIS="converts markdown-formatted text to PDF, using pdflatex."
5−
6−THIS=${0##*/}
7−
8−NEWLINE='
9−'
10−
11−err () { echo "$*" | fold -s -w ${COLUMNS:-110} >&2; }
12−errn () { printf "$*" | fold -s -w ${COLUMNS:-110} >&2; }
13−
14−usage () {
15− err "$1 - $2" # short description
16− err "See the $1(1) man page for usage."
17−}
18−
19−# Portable which(1).
20−pathfind () {
21− oldifs="$IFS"; IFS=':'
22− for _p in $PATH; do
23− if [ -x "$_p/$*" ] && [ -f "$_p/$*" ]; then
24− IFS="$oldifs"
25− return 0
26− fi
27− done
28− IFS="$oldifs"
29− return 1
30−}
31−
32−for p in pandoc $REQUIRED; do
33− pathfind $p || {
34− err "You need '$p' to use this program!"
35− exit 1
36− }
37−done
38−
39−CONF=$(pandoc --dump-args "$@" 2>&1) || {
40− errcode=$?
41− echo "$CONF" | sed -e '/^pandoc \[OPTIONS\] \[FILES\]/,$d' >&2
42− [ $errcode -eq 2 ] && usage "$THIS" "$SYNOPSIS"
43− exit $errcode
44−}
45−
46−OUTPUT=$(echo "$CONF" | sed -ne '1p')
47−ARGS=$(echo "$CONF" | sed -e '1d')
48−
49−
50−# As a security measure refuse to proceed if mktemp is not available.
51−pathfind mktemp || { err "Couldn't find 'mktemp'; aborting."; exit 1; }
52−
53−# Avoid issues with /tmp directory on Windows/Cygwin
54−cygwin=
55−cygwin=$(uname | sed -ne '/^CYGWIN/p')
56−if [ -n "$cygwin" ]; then
57− TMPDIR=.
58− export TMPDIR
59−fi
60−
61−THIS_TEMPDIR=
62−THIS_TEMPDIR="$(mktemp -d -t $THIS.XXXXXXXX)" || exit 1
63−readonly THIS_TEMPDIR
64−
65−trap 'exitcode=$?
66− [ -z "$THIS_TEMPDIR" ] || rm -rf "$THIS_TEMPDIR"
67− exit $exitcode' 0 1 2 3 13 15
68−
69−texname=output
70−logfile=$THIS_TEMPDIR/log
71−
72−pandoc -s -r markdown -w latex "$@" -o $THIS_TEMPDIR/$texname.tex
73−
74−if [ "$OUTPUT" = "-" ]; then
75− firstinfile="$(echo $ARGS | sed -ne '1p')"
76− firstinfilebase="${firstinfile%.*}"
77− destname="${firstinfilebase:-stdin}.pdf"
78−else
79− destname="$OUTPUT"
80−fi
81−
82−(
83− origdir=$(pwd)
84− cd $THIS_TEMPDIR
85− TEXINPUTS=$origdir:$TEXINPUTS:
86− export TEXINPUTS
87− finished=no
88− runs=0
89− while [ $finished = "no" ]; do
90− pdflatex -interaction=batchmode $texname.tex >/dev/null || {
91− errcode=$?
92− err "${THIS}: pdfLaTeX failed with error code $errcode"
93− [ -f $texname.log ] && {
94− err "${THIS}: error context:"
95− sed -ne '/^!/,/^[[:space:]]*$/p' \
96− -ne '/^[Ll]a[Tt]e[Xx] [Ww]arning/,/^[[:space:]]*$/p' \
97− -ne '/^[Ee]rror/,/^[[:space:]]*$/p' $texname.log >&2
98− if grep -q "File \`ucs.sty' not found" $texname.log; then
99− err "${THIS}: Please install the 'unicode' package from CTAN:"
100− err " http://www.ctan.org/tex-archive/macros/latex/contrib/unicode/"
101− fi
102− if grep -q "File \`ulem.sty' not found" $texname.log; then
103− err "${THIS}: Please install the 'ulem' package from CTAN:"
104− err " http://www.ctan.org/tex-archive/macros/latex/contrib/misc/ulem.sty"
105− fi
106− }
107− exit $errcode
108− }
109− if [ $runs -lt 3 ] &&
110− ((grep -q "LaTeX Warning: There were undefined references." $texname.log) ||
111− (echo "$@" | grep -q -- "--toc\|--table-of-contents")); then
112− runs=$(($runs + 1))
113− if grep -q "LaTeX Warning:.*[Cc]itation" $texname.log; then
114− bibtex $texname 2>&1 >bibtex.err
115− if [ $runs -gt 2 ]; then
116− if grep -q "error message" bibtex.err ||
117− grep -q "Warning" bibtex.err; then
118− cat bibtex.err >&2
119− fi
120− fi
121− fi
122− else
123− finished=yes
124− fi
125− done
126−) || exit $?
127−
128−is_target_exists=
129−if [ -f "$destname" ]; then
130− is_target_exists=1
131− mv "$destname" "$destname~"
132−fi
133−
134−mv -f $THIS_TEMPDIR/$texname.pdf "$destname"
135−
136−errn "Created $destname"
137−[ -z "$is_target_exists" ] || {
138− errn " (previous file has been backed up as $destname~)"
139−}
140−err .
pandoc.cabal+4−4
@@ -18,7 +18,7 @@ Description: Pandoc is a Haskell library for converting from one markup
18 this library. It can read markdown and (subsets of)
18 this library. It can read markdown and (subsets of)
19 reStructuredText, HTML, and LaTeX, and it can write
19 reStructuredText, HTML, and LaTeX, and it can write
20 markdown, reStructuredText, HTML, LaTeX, ConTeXt, Docbook,
20 markdown, reStructuredText, HTML, LaTeX, ConTeXt, Docbook,
21− OpenDocument, ODT, RTF, MediaWiki, groff man pages, and
21+ OpenDocument, ODT, PDF, RTF, MediaWiki, groff man pages, and
22 S5 HTML slide shows.
22 S5 HTML slide shows.
23 .
23 .
24 Pandoc extends standard markdown syntax with footnotes,
24 Pandoc extends standard markdown syntax with footnotes,
@@ -38,12 +38,12 @@ Extra-Source-Files:
38 -- documentation
38 -- documentation
39 README, INSTALL, COPYRIGHT, COPYING, changelog,
39 README, INSTALL, COPYRIGHT, COPYING, changelog,
40 -- sources for man pages
40 -- sources for man pages
41− man/man1/pandoc.1.md, man/man1/markdown2pdf.1.md,
41+ man/man1/pandoc.1.md,
42 man/man1/html2markdown.1.md, man/man1/hsmarkdown.1.md,
42 man/man1/html2markdown.1.md, man/man1/hsmarkdown.1.md,
43 -- Makefile
43 -- Makefile
44 Makefile,
44 Makefile,
45 -- wrappers
45 -- wrappers
46− markdown2pdf, html2markdown, hsmarkdown,
46+ html2markdown, hsmarkdown,
47 -- data for DefaultHeaders.hs
47 -- data for DefaultHeaders.hs
48 data/headers/ConTeXt.header,
48 data/headers/ConTeXt.header,
49 data/headers/Docbook.header,
49 data/headers/Docbook.header,
@@ -118,7 +118,7 @@ Extra-Source-Files:
118 tests/Diff.hs,
118 tests/Diff.hs,
119 tests/RunTests.hs
119 tests/RunTests.hs
120Extra-Tmp-Files: man/man1/pandoc.1, man/man1/hsmarkdown.1,
120Extra-Tmp-Files: man/man1/pandoc.1, man/man1/hsmarkdown.1,
121− man/man1/markdown2pdf.1, man/man1/html2markdown.1
121+ man/man1/html2markdown.1
122
122
123Flag splitBase
123Flag splitBase
124 Description: Choose the new, smaller, split-up base package.
124 Description: Choose the new, smaller, split-up base package.
web/Makefile+1−1
@@ -1,4 +1,4 @@
1−ALL := index.html README.html INSTALL.html examples.html pandoc.1.html markdown2pdf.1.html html2markdown.1.html hsmarkdown.1.html html2x.html
1+ALL := index.html README.html INSTALL.html examples.html pandoc.1.html html2markdown.1.html hsmarkdown.1.html html2x.html
2PANDOC_PATH ?= $(dir $(shell which pandoc))
2PANDOC_PATH ?= $(dir $(shell which pandoc))
3MAKEPAGE = $(PANDOC_PATH)/pandoc -s -S -H css -A footer.html
3MAKEPAGE = $(PANDOC_PATH)/pandoc -s -S -H css -A footer.html
4all : $(ALL)
4all : $(ALL)
web/demos+2−2
@@ -61,11 +61,11 @@ click on the name of the output file:
61
61
6213. From markdown to PDF:
6213. From markdown to PDF:
63
63
64−@ markdown2pdf @@README@@ -o @@example13.pdf@@
64+@ pandoc @@README@@ -o @@example13.pdf@@
65
65
6614. PDF with numbered sections and a custom LaTeX header:
6614. PDF with numbered sections and a custom LaTeX header:
67
67
68−@ markdown2pdf -N -C @@myheader.tex@@ @@README@@ -o @@example14.pdf@@
68+@ pandoc -N -C @@myheader.tex@@ @@README@@ -o @@example14.pdf@@
69
69
70[xmlto]: http://cyberelk.net/tim/xmlto/
70[xmlto]: http://cyberelk.net/tim/xmlto/
71
71
web/index.txt.in+4−5
@@ -6,8 +6,8 @@ Pandoc is a [Haskell] library for converting from one markup format
6to another, and a command-line tool that uses this library. It can read
6to another, and a command-line tool that uses this library. It can read
7[markdown] and (subsets of) [reStructuredText], [HTML], and [LaTeX],
7[markdown] and (subsets of) [reStructuredText], [HTML], and [LaTeX],
8and it can write [markdown], [reStructuredText], [HTML], [LaTeX], [ConTeXt],
8and it can write [markdown], [reStructuredText], [HTML], [LaTeX], [ConTeXt],
9−[RTF], [DocBook XML], [OpenDocument XML], [GNU Texinfo], [MediaWiki markup],
9+[PDF], [RTF], [DocBook XML], [OpenDocument XML], [ODT], [GNU Texinfo],
10−[groff man] pages, and [S5] HTML slide shows.
10+[[MediaWiki markup], groff man] pages, and [S5] HTML slide shows.
11
11
12Pandoc features
12Pandoc features
13
13
@@ -36,8 +36,6 @@ Pandoc features
36- Convenient wrapper scripts:
36- Convenient wrapper scripts:
37 + `html2markdown` makes it easy to produce a markdown version
37 + `html2markdown` makes it easy to produce a markdown version
38 of any web page.
38 of any web page.
39− + `markdown2pdf` converts markdown to PDF in one step.
40− + `markdown2odt` converts markdown to ODT in one step.
41 + `hsmarkdown` is a drop-in replacement for `Markdown.pl`.
39 + `hsmarkdown` is a drop-in replacement for `Markdown.pl`.
42- Multi-platform: runs on Windows, MacOS X, Linux, Unix.
40- Multi-platform: runs on Windows, MacOS X, Linux, Unix.
43- Free software, released under the [GPL].
41- Free software, released under the [GPL].
@@ -51,7 +49,6 @@ or [try pandoc on the web](/pandoc/try).
51- [Demonstrations](examples.html)
49- [Demonstrations](examples.html)
52- Man pages
50- Man pages
53 - [`pandoc(1)`](pandoc.1.html)
51 - [`pandoc(1)`](pandoc.1.html)
54− - [`markdown2pdf(1)`](markdown2pdf.1.html)
55 - [`html2markdown(1)`](html2markdown.1.html)
52 - [`html2markdown(1)`](html2markdown.1.html)
56 - [`hsmarkdown(1)`](hsmarkdown.1.html)
53 - [`hsmarkdown(1)`](hsmarkdown.1.html)
57- [Library documentation](doc/pandoc/index.html) (for Haskell programmers)
54- [Library documentation](doc/pandoc/index.html) (for Haskell programmers)
@@ -168,6 +165,8 @@ kind.
168[LaTeX]: http://www.latex-project.org/
165[LaTeX]: http://www.latex-project.org/
169[ConTeXt]: http://www.pragma-ade.nl/
166[ConTeXt]: http://www.pragma-ade.nl/
170[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
167[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format
168+[PDF]: http://en.wikipedia.org/wiki/Portable_Document_Format
169+[ODT]: http://en.wikipedia.org/wiki/OpenDocument
171[DocBook XML]: http://www.docbook.org/
170[DocBook XML]: http://www.docbook.org/
172[OpenDocument XML]: http://opendocument.xml.org/
171[OpenDocument XML]: http://opendocument.xml.org/
173[MediaWiki markup]: http://www.mediawiki.org/wiki/Help:Formatting
172[MediaWiki markup]: http://www.mediawiki.org/wiki/Help:Formatting