Commit graph

287 commits

Author SHA1 Message Date
John MacFarlane
d073b16892 Added Textile writer module. 2010-05-17 21:52:45 -07:00
John MacFarlane
fb201a5b46 Updated man page and README.
Pandoc no longer respects locale, even when compiled by GHC 6.12.
2010-05-06 22:32:06 -07:00
John MacFarlane
4fbacd5d5b Removed refs to hsmarkdown, html2markdown from pandoc man page. 2010-03-23 13:38:41 -07:00
fiddlosopher
56217f1004 Added --mathml option; removed Text.Pandoc.LaTeXMathML.
* Added data/MathMLinHTML.js, which is included when no URL is provided
  for --mathml.  This allows MathML to be displayed in better browsers,
  as text/html.
* The module was no longer necessary; its functionality (two lines)
  was incorporated into pandoc.hs.
* Consolidated the two LaTeXMathML.js files into one.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1909 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 06:45:56 +00:00
fiddlosopher
695961155a Added plain writer.
Text.Pandoc.Writers.Markdown now exports a writePlain,
which writes plain text without links, pictures, or
special formatting (not even markdown conventions).

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1907 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 06:45:43 +00:00
fiddlosopher
baae74af57 Added --base-header-level option.
Thanks to Jérémy Bobbio for the patch that formed the basis of this commit.
Closes Debian #563416.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1889 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-14 23:23:26 +00:00
fiddlosopher
3b9be92492 Use template variables for include-before/after.
* These options now imply -s; previously they worked also
  in fragment mode.
* Users can now adjust position of include-before and
  include-after text in the templates.
* Default position of include-before moved back (as it
  originally was) before table of contents.
* Resolves Issue #217.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1883 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-13 04:11:24 +00:00
fiddlosopher
997ea5ea1d Removed html2markdown and hsmarkdown.
html2markdown is no longer needed, since you can pass URI arguments
to pandoc and directly convert web pages. (Note, however, that pandoc
assumes the pages are UTF8. html2markdown made an attempt to guess the
encoding and convert them.)

hsmarkdown is pointless -- a large executable that could be replaced
by 'pandoc --strict'.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1834 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-06 18:55:28 +00:00
fiddlosopher
7414339e70 Updated markdown2pdf man page.
It no longer says all pandoc options are accepted.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1830 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-03 05:52:26 +00:00
fiddlosopher
183ea8d839 Removed advice to pipe through tidy before HTML reader.
This is obsolete, now that we have a forgiving HTML parser.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1827 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-02 16:39:15 +00:00
fiddlosopher
9fee73d2a3 Allow absolute URI as parameter (in this case, content is downloaded).
+ Adds dependency on HTTP.
+ If a parameter is an absolute URI, pandoc will try to
  get the content via HTTP.
+ So, you can do:  pandoc -r html -w markdown http://www.fsf.org

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1826 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-02-02 07:37:01 +00:00
fiddlosopher
eb851a41ca Added --data-dir option.
+ This specifies a user data directory. If not specified, will default
  to ~/.pandoc on unix or Application Data\pandoc on Windows.
  Files placed in the user data directory will override system default
  data files.
+ Added datadir parameter to readDataFile, saveOpenDocumentAsODT,
  latexMathMLScript, s5HeaderIncludes, and getTemplate.  Removed
  getDefaultTemplate.
+ Updated documentation.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1809 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-14 05:54:38 +00:00
fiddlosopher
96e0995258 Deprecated --custom-header in documentation.
Removed old "Custom Headers" section in README.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1800 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-10 02:40:08 +00:00
fiddlosopher
ed1535de10 Added --reference-odt option.
This allows the user to customized the styles used in pandoc-generated
ODTs.  The user may also put a default reference.odt in the ~/.pandoc
directory.

We have removed the old data/odt directory and replaced it with a
reference.odt.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1760 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 22:40:59 +00:00
fiddlosopher
c882232e94 Fuller discussion of Templates in README and man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1756 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 21:18:13 +00:00
fiddlosopher
ffed5c1cc3 Added --xetex option to pandoc and markdown2pdf.
If --xetex is specified, pandoc produces latex suitable for
processing by xelatex, and markdown2pdf uses xelatex to create
the PDF. Resolves Issue #185.

This seems better than using latex packages to detect xetex,
since not all latex installations will have these.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1737 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:18:06 +00:00
fiddlosopher
5ba6c0911c Added $for$ to template system.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1720 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:15:33 +00:00
fiddlosopher
60cb80b459 Revised documentation for templates.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1718 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:15:15 +00:00
fiddlosopher
4806628c8d Added 'standalone' variable, use in templates.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1697 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:12:14 +00:00
fiddlosopher
b771051432 Added -V/--variable option to set custom template variables.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1685 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:10:26 +00:00
fiddlosopher
c602ed3459 Added and documented --template option.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1683 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:10:04 +00:00
fiddlosopher
0d8fc82a8c Changed --print-default-header to --print-default-template.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1679 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:09:36 +00:00
fiddlosopher
2ced785e95 Added optional section numbering in HTML output.
This involves a change to the Element data structure,
including a section number as well as an id and title
for each section.  Section numbers are lists of integers;
this should allow different numbering schemes to be used
in the future.  Currently [1,2,3] -> 1.2.3.

Resolves Issue #150.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1658 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-08 02:36:16 +00:00
fiddlosopher
78475498b4 Added --id-prefix option.
This adds a prefix to all automatically generated HTML identifiers,
which helps prevent duplicate identifiers when you're generating
a fragment (say a blog post).

Added writerIdentifierPrefix to WriterOptions.

Resolves Issue #41.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1650 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-05 17:56:02 +00:00
fiddlosopher
eb5550a6e4 Changed --default-code-classes -> --indented-code-classes.
Also changed stateDefaultCodeClasses -> stateIndentedCodeClasses.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1643 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-05 04:46:57 +00:00
fiddlosopher
df0ce7658c Added --default-code-classes option.
This specifies classes to use for indented code blocks.
Thanks to buttock for the (slightly modified) patch.
Resolves Issue #87.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1637 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-01 06:56:47 +00:00
fiddlosopher
5f3a147dfd Removed plugin support.
Plugins will probably be added in a later version,
but for now we want to avoid the heavy GHC API dependency.
Also, plugins are very slow with the current system.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1548 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-02-24 22:59:44 +00:00
fiddlosopher
2806aee9b2 Added --email-obfuscation option.
+ Added writer option for email obfuscation.
+ Implemented email obfuscation options in HTML writer.
+ Added option to option parser.
+ Documented in README and pandoc man page.
+ Resolves Issue #97.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1523 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-24 19:58:48 +00:00
fiddlosopher
874c3e0dea Added a plugin system, based on hint.
+ In Text.Pandoc.Definition, added processIn, processInM,
  and queryIn, and deprecated processPandoc and queryPandoc
  for these more general functions, which are useful in writing
  plugins.

+ Added module Text.Pandoc.Plugins.

+ Added a --plugins option to Main, and code to run the parsed pandoc
  document through all the plugins.

+ Provided five sample plugin files in the plugins/ directory.

+ Documented --plugin in the pandoc man page and README.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1519 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-24 19:58:06 +00:00
fiddlosopher
4e122930f1 Modified README and man page to document lhs features.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1506 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-12-02 22:43:11 +00:00
fiddlosopher
430e55c0f1 Handle --lhs-out option in HTML, LaTeX, and Markdown writers.
Documented lhs options in man page and README.

Note:  HTML output with --lhs-out is not strictly literate haskell,
but it is designed so that the result of copying and pasting the
page in the browser will be a literate haskell file.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1501 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-12-02 22:42:29 +00:00
fiddlosopher
4f28d47b90 Added --jsmath option.
- Added --jsmath option to Main.hs
- Added JsMath to HTMLMathMethod in Text.Pandoc.Shared.
- Handle math appropriately in HTML writer when JsMath selected.
- Documented the option in README and man page.

Resolves Issue #68.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1472 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-10-28 21:54:50 +00:00
fiddlosopher
d00b52a4ed Removed spurious reference to a pdf output format in the pandoc(1) man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1446 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-09-14 00:11:17 +00:00
fiddlosopher
3d2ff3d0a8 Removed PDF writer from core pandoc, restored markdown2pdf.
+ Added markdown2pdf.
+ Removed Text/Pandoc/PDF.hs.
+ Removed references to PDF writer from Main.hs.
+ Removed references to PDF writer from pandoc.cabal.
+ Added markdown2pdf.1 to list of man pages in Setup.hs.
+ Added markdown2pdf.1.md man page source.
+ Added reference to markdown2pdf(1) in pandoc man page.
+ Added markdown2pdf to WRAPPERS in Makefile.
+ Removed mention of pdf writer from README; added markdown2pdf.
+ Added remarks on markdown2pdf dependencies to README.Debian.
+ Added markdown2pdf to web/index.txt.in.
+ Use markdown2pdf for pdf web demos.
+ Put markdown2pdf back into debian control and rules.
+ Added markdown2pdf to macports Portfile.
+ Added markdown2pdf to freebsd package.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1415 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-27 05:50:26 +00:00
fiddlosopher
f53fb554fe Support for display math; changed ASCIIMathML -> LaTeXMathML:
Resolves Issue #47.

+ Added a DisplayMath/InlineMath selector to Math inlines.
+ Markdown parser yields DisplayMath for $$...$$.
+ LaTeX parser yields DisplayMath when appropriate.  Removed
  mathBlock parsers, since the same effect is achieved by the math
  inline parsers, now that they handle display math.
+ Writers handle DisplayMath as appropriate for the format.
+ Changed -m option to use LaTeXMathML rather than ASCIIMathML.
  LaTeXMathML is closer to LaTeX in its display of math, and
  supports many non-math LaTeX environments.
+ Modified HTML writer to print raw TeX when LaTeXMathML is
  being used instead of suppressing it.
+ Removed ASCIIMathML files from data/ and added LaTeXMathML.
+ Replaced ASCIIMathML with LaTeXMathML in source files.
+ Modified README and pandoc man page source.
+ Modified web page.
+ Added --latexmathml option (kept --asciimathml as a synonym
  for backwards compatibility)
+ Modified tests accordingly; added new tests for display math.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1409 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-13 03:02:42 +00:00
fiddlosopher
79359605d1 Updated man page sources with pdf output option, minor cosmetic changes.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1398 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10 22:24:43 +00:00
fiddlosopher
1cbc974e7e Removed markdown2pdf and all references to it.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1395 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-10 17:34:02 +00:00
fiddlosopher
dfdf3311b7 Added information about odt to README and pandoc(1) man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1369 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-02 17:56:09 +00:00
fiddlosopher
d072ad4b66 Added 'odt' output option to pandoc:
Not a writer, but a module that inserts the output of the OpenDocument
writer into an ODT archive.  This replaces markdown2odt.

+ Added odt output option to Main.hs.
+ Added default for .odt output file.
+ Changed defaults so that .xml and .sgml aren't automatically DocBook.
+ Added odt writer to Text.Pandoc exports.
+ Added Text.Pandoc.ODT and included in pandoc.cabal.
+ Added reference.odt as data-file in pandoc.cabal.
+ Handle picture links in OpenDocument files using xml library.
+ Removed markdown2odt and references from Makefile, README, man.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1345 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-31 23:16:02 +00:00
fiddlosopher
ddaec05d8f Added MediaWiki writer.
+ Added Text/Pandoc/Writers/MediaWiki.hs
+ Added to pandoc.cabal
+ Added to Main.hs and Text/Pandoc.hs exports.
+ Added tests for mediawiki writer & table writer.
+ Added information on MediaWiki writer to README.
+ Added mediawiki markup to list of formats in pandoc(1) man page.
+ Updated debian/control with mediawiki output format.
+ Added mediawiki markup to description in macports portfile.
+ Updated freebsd package description to include mediawiki format.
+ Mention MediaWiki output format in web page index.
+ Added mediawiki demo to website.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1337 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-27 03:25:51 +00:00
fiddlosopher
891e06d4aa Added mention of opendocument writer to pandoc man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1336 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-26 21:29:09 +00:00
fiddlosopher
8624ed9bd3 The '--sanitize-html' option now examines URIs in markdown links
and images, and in HTML href and src attributes.  If the URI scheme
is not on a whitelist of safe schemes, it is rejected.  The main point
is to prevent cross-site scripting attacks using 'javascript:' URIs.
See http://www.mail-archive.com/markdown-discuss@six.pairlist.net/msg01186.html
and http://ha.ckers.org/xss.html.  Resolves Issue #62.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1262 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-03-22 20:41:56 +00:00
fiddlosopher
91d9fffe9e Added preliminary version of markdown2odt wrapper.
Added man page.
Modified Makefile to create markdown2odt from template.
Modified Makefile to create reference.odt file from files in odt-styles.
Modified Makefile to install reference.odt into PACKAGEDATAPATH.
Modified macports Portfile.
Modified freebsd Makefile.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1259 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-03-19 18:46:57 +00:00
fiddlosopher
74e8085631 Small fix to markdown2pdf man page:
only input needs to be piped through iconv.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1251 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-03-19 18:41:07 +00:00
fiddlosopher
858269dd20 Changes to Texinfo writer:
+ No space between paragraph and following @verbatim (provides more
  pleasing appearance in text formats)
+ Blank line consistently after list environments.
+ Removed deVerb.
+ Use @code instead of @verb for inline code (this solves the character
  escaping problem for texi2dvi and texi2pdf).
+ Modified test suite accordingly.
+ Added Peter Wang to copyright statement (for Texinfo.hs).
+ Added news of Texinfo writer to README.
+ Added Texinfo to list of formats in man page, and removed extra 'groff'.
+ Updated macports with Texinfo format.
+ Updated FreeBSD pkg-descr with Texinfo format.
+ Updated web page with Texinfo writer.
+ Added demos for Texinfo writer.
+ Added Texinfo to package description in debian/control.
+ Added texi & texinfo extensions to Main.hs, and fixed bug in determining
  default output extension.
+ Changed from texinfo to texi extension in web demo.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1244 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-24 05:48:59 +00:00
fiddlosopher
a7a519e04c Changed dates on documentation.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1180 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 17:25:57 +00:00
fiddlosopher
5df912b162 Added optional HTML sanitization using a whitelist.
When this option is specified (--sanitize-html on the command line),
unsafe HTML tags will be replaced by HTML comments, and unsafe HTML
attributes will be removed.  This option should be especially useful
for those who want to use pandoc libraries in web applications, where
users will provide the input.

+ Main.hs:  Added --sanitize-html option.
+ Text.Pandoc.Shared:  Added stateSanitizeHTML to ParserState.
+ Text.Pandoc.Readers.HTML:
  - Added whitelists of sanitaryTags and sanitaryAttributes.
  - Added parsers to check these lists (and state) to see if a given
    tag or attribute should be counted unsafe.
  - Modified anyHtmlTag and anyHtmlEndTag to replace unsafe tags
    with comments.
  - Modified htmlAttribute to remove unsafe attributes.
  - Modified htmlScript and htmlStyle to remove these elements if
    unsafe.
  - Modified rawHtmlBlock to use anyHtmlBlockTag instead of anyHtmlTag
    and anyHtmlEndTag.  This fixes a bug in markdown parsing, where
    inline tags would be included in raw HTML blocks.
  - Modified anyHtmlBlockTag to test for (not inline) rather than
    directly for block.  This allows us to handle e.g. docbook in
    the markdown reader.
  - Minor tweaks in nonTitleNonHead  and parseTitle.
+ Text.Pandoc.Readers.Markdown:
  - In non-strict mode use rawHtmlBlocks instead of htmlBlock.
    Simplified htmlBlock, since we know it's only called in strict
    mode.
+ Modified README and man pages to document new option.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1166 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-03 21:32:32 +00:00
fiddlosopher
6e079a67e8 Documented new --gladtex and --mimetex options, and new treatment of TeX math.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1124 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-01 03:11:47 +00:00
fiddlosopher
506bf38bcb Updated documentation to reflect the fact that LaTeX and ConTeXt writers
now wrap text by default.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1074 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-15 03:23:02 +00:00
fiddlosopher
447b99e35d '--no-wrap' option now prevents the addition of structural whitespace
in HTML output, minimizing the file size.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1053 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-18 15:36:51 +00:00
fiddlosopher
7a32ad72e3 Documented '--no-wrap' option in README and man pages.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1035 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-27 01:28:28 +00:00
fiddlosopher
85f655c8cb Changed pandoc home page to http://johnmacfarlane.net/pandoc/.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1014 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-13 17:26:01 +00:00
fiddlosopher
1e4f05d2bd Removed references to examplep package in documentation, and
removed suggest of latex-texlive-extras in debian/control,
since we're not using examplep.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@830 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 19:16:58 +00:00
fiddlosopher
d488dd0f66 Reinstated dependence on fancyvrb. It is compatible with examplep.
fancyvrb is needed for verbatim environments in footnotes.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@808 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 01:40:48 +00:00
fiddlosopher
b29f221cba Changed LaTeX writer to use the examplep package instead
of fancyvrb. examplep allows verbatim text in places where
fancyvrb does not, e.g. definition list terms, and provides
for line-breaking of verbatim text.
+ examplep code put in LaTeX header instead of being dynamically
  included, since it is frequently used, and people may want to
  customize the options.
+ documented dependency on examplep
+ added texlive-latex-extra as a "Suggested" package in debian/control
+ use examplep's \Q{} is now used instead of \verb:  note that 
  \Q requires backslash- escaping symbols in its scope.
+ modified README so that the verbatim sections will look good at
  shorter line lengths.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@807 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 01:10:04 +00:00
fiddlosopher
622606bae9 Updated documentation on ASCIIMathML.js.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@800 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-26 02:40:18 +00:00
fiddlosopher
33a2f1c78f Changed man page markdown sources to use new
system for specifying title, section, and header information.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@747 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21 20:36:08 +00:00
fiddlosopher
229b3107b6 Documented ConTeXt writer in pandoc man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@722 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15 03:17:33 +00:00
fiddlosopher
389c762afc Documented --toc/--table-of-contents option in pandoc man
page and README.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@679 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-12 03:45:00 +00:00
fiddlosopher
1ec47d3754 Use "Pandoc User Manuals" as bottom-left footer in man
pages.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@669 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-10 06:18:53 +00:00
fiddlosopher
595f6bf39a Man page templates:
Escaped --'s in option list headers, so they won't be parsed
as Em dashes when -S mode is used.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@644 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:31:26 +00:00
fiddlosopher
4fe56a8d18 Man writer:
- Added scheme for specifying manual section and additional
  headers:
  % PROGNAM | 1 | User Manual | Version 4.0
- Modified man page sources to include section 1


git-svn-id: https://pandoc.googlecode.com/svn/trunk@619 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04 15:53:49 +00:00
fiddlosopher
681ce02983 Documented man output in pandoc.1.md man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@615 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 03:40:46 +00:00
fiddlosopher
b412492725 Minor changes in man page sources.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@610 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02 02:16:58 +00:00
fiddlosopher
5fbe057d27 Man pages are now generated from markdown templates,
using pandoc's man page writer.  Removed man pages
from repository, added (.md) templates.  Modified
Makefile to generate man pages as part of the build
process.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@609 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-01 23:26:20 +00:00
fiddlosopher
23df0ed176 Extensive changes stemming from a rethinking of the Pandoc data
structure. Key and Note blocks have been removed. Link and image URLs
are now stored directly in Link and Image inlines, and note blocks
are stored in Note inlines. This requires changes in both parsers
and writers. Markdown and RST parsers need to extract data from key
and note blocks and insert them into the relevant inline elements.
Other parsers can be simplified, since there is no longer any need to
construct separate key and note blocks. Markdown, RST, and HTML writers
need to construct lists of notes; Markdown and RST writers need to
construct lists of link references (when the --reference-links option
is specified); and the RST writer needs to construct a list of image
substitution references. All writers have been rewritten to use the
State monad when state is required.  This rewrite yields a small speed
boost and considerably cleaner code. 

* Text/Pandoc/Definition.hs:
  + blocks:  removed Key and Note
  + inlines:  removed NoteRef, added Note
  + modified Target:  there is no longer a 'Ref' target; all targets
    are explicit URL, title pairs

* Text/Pandoc/Shared.hs:

  + Added 'Reference', 'isNoteBlock', 'isKeyBlock', 'isLineClump',
    used in some of the readers.
  + Removed 'generateReference', 'keyTable', 'replaceReferenceLinks',
    'replaceRefLinksBlockList', along with some auxiliary functions
    used only by them.  These are no longer needed, since
    reference links are resolved in the Markdown and RST readers.
  + Moved 'inTags', 'selfClosingTag', 'inTagsSimple', and 'inTagsIndented'
    to the Docbook writer, since that is now the only module that uses
    them.
  + Changed name of 'escapeSGMLString' to 'escapeStringForXML'
  + Added KeyTable and NoteTable types
  + Removed fields from ParserState;  'stateKeyBlocks', 'stateKeysUsed',
    'stateNoteBlocks', 'stateNoteIdentifiers', 'stateInlineLinks'. 
    Added 'stateKeys' and 'stateNotes'.
  + Added clause for Note to 'prettyBlock'.
  + Added 'writerNotes', 'writerReferenceLinks' fields to WriterOptions.

* Text/Pandoc/Entities.hs: Renamed 'escapeSGMLChar' and
  'escapeSGMLString' to 'escapeCharForXML' and 'escapeStringForXML'

* Text/ParserCombinators/Pandoc.hs: Added lineClump parser: parses a raw
  line block up to and including following blank lines.

* Main.hs:  Replaced --inline-links with --reference-links.

* README: 
  + Documented --reference-links and removed description of --inline-links.
  + Added note that footnotes may occur anywhere in the document, but must
    be at the outer level, not embedded in block elements.
  
* man/man1/pandoc.1, man/man1/html2markdown.1: Removed --inline-links
  option, added --reference-links option

* Markdown and RST readers:
  + Rewrote to fit new Pandoc definition.  Since there are no longer
    Note or Key blocks, all note and key blocks are parsed on a first pass
    through the document.  Once tables of notes and keys have been constructed,
    the remaining parts of the document are reassembled and parsed.
  + Refactored link parsers.

* LaTeX and HTML readers: Rewrote to fit new Pandoc definition. Since
  there are no longer Note or Key blocks, notes and references can be
  parsed in a single pass through the document.

* RST, Markdown, and HTML writers: Rewrote using state monad new Pandoc
  and definition. State is used to hold lists of references footnotes to
  and be printed at the end of the document.

* RTF and LaTeX writers: Rewrote using new Pandoc definition. (Because
  of the different treatment of footnotes, the "notes" parameter is no
  longer needed in the block and inline conversion functions.)

* Docbook writer:
  + Moved the functions 'attributeList', 'inTags', 'selfClosingTag',
    'inTagsSimple', 'inTagsIndented' from Text/Pandoc/Shared, since
    they are now used only by the Docbook writer.
  + Rewrote using new Pandoc definition.  (Because of the different
    treatment of footnotes, the "notes" parameter is no longer needed
    in the block and inline conversion functions.)

* Updated test suite

* Throughout:  old haskell98 module names replaced by hierarchical module
  names, e.g. List by Data.List.

* debian/control: Include libghc6-xhtml-dev instead of libghc6-html-dev
  in "Build-Depends."

* cabalize: 
  + Remove haskell98 from BASE_DEPENDS (since now the new hierarchical
    module names are being used throughout)
  + Added mtl to BASE_DEPENDS (needed for state monad)
  + Removed html from GHC66_DEPENDS (not needed since xhtml is now used)



git-svn-id: https://pandoc.googlecode.com/svn/trunk@580 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-04-10 01:56:50 +00:00
fiddlosopher
31c030e3a5 Added --inline-links option to force links in HTML to be parsed
as inline links, rather than reference links.  (Addresses Issue
#4.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@554 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-03 18:19:31 +00:00
fiddlosopher
9a37ee459c Documentation changes corresponding to r456.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@457 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08 21:16:18 +00:00
fiddlosopher
5dda65b5dc Changes to Pandoc's options to facilitate wrapper scripts:
+ removed -d/--debug option
+ added --dump-args option, which prints the name of the output file
  (or '-' for STDOUT) and all the command-line arguments (excluding
  Pandoc options and their arguments), one per line, then exits.  Note
  that special wrapper options will be treated as arguments if they
  follow '--' at the end of the command line.  Thus,
     pandoc --dump-args -o foo.html foo.txt -- -e latin1 
  will print the following to STDOUT:
     foo.html
     foo.txt
     -e
     latin1
+ added --ignore-args option, which causes Pandoc to ignore all
  (non-option) arguments, including any special options that occur
  after '--' at the end of the command line.
+ '-' now means STDIN as the name of an input file, STDOUT as the
  name of an output file.  So,
     pandoc -o - -
  will take input from STDIN and print output to STDOUT.  Note that
  if multiple '-o' options are specified on the same line, the last
  one takes precedence.  So, in a script,
     pandoc "$@" -o - 
  will guarantee output to STDOUT, even if the '-o' option was used.
+ documented these changes in man pages, README, and changelog.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@454 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-08 08:11:08 +00:00
fiddlosopher
cbfe29f205 Fixed formatting in pandoc man page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@439 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06 18:48:07 +00:00
fiddlosopher
bb8478e4e2 Merged changes from 'quotes' branch since r431. Smart typography
is now handled in the Markdown and LaTeX readers, rather than in
the writers.  The HTML writer has been rewritten to use the
prettyprinting library.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@436 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06 09:54:58 +00:00
fiddlosopher
5387ebd8db Added 'hsmarkdown' wrapper, designed to be used as a drop-in
replacement for Markdown.pl.  It calls pandoc with the options
'--from markdown --to html --strict' and disallows other options.
(Any command-line options will be interpreted as arguments.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@399 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-02 02:58:54 +00:00
fiddlosopher
a9e32505de Merged changes from docbook branch since r363.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@386 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-01 21:08:12 +00:00
fiddlosopher
e9abe72a27 Added a note to pandoc(1) man page about the differences between
standard markdown and Pandoc's markdown-variant.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@361 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-31 19:41:44 +00:00
fiddlosopher
4ea1b2bdc0 Merged 'strict' branch from r324. This adds a '--strict'
option to pandoc, which forces it to stay as close as possible
to official Markdown syntax.  


git-svn-id: https://pandoc.googlecode.com/svn/trunk@347 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-30 22:51:49 +00:00
fiddlosopher
3491420b53 + Changed 'web2markdown' to 'html2markdown'.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@309 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-29 18:50:13 +00:00
fiddlosopher
a1a30d69bd + Removed the convenience symlinks (which don't work on Windows under
Cygwin, due to Windows' lack of true symbolic links).
+ Modified the wrappers to use 'pandoc' instead of the symlinks.
+ Modified the Makefile to remove all references to the symlinks.
+ Removed code from Main.hs that made pandoc's behavior depend on the
  name of the calling program.
+ Added code to Main.hs that sets default reader and writer based on
  extensions of input and output filenames (if provided).  (Thanks to
  roktas for the idea.)
+ Modified README and man pages accordingly.
+ Removed WINDOWS-README target from Makefile.  It is no longer needed
  now that we don't have the symlinks.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@295 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-28 02:20:09 +00:00
fiddlosopher
d829c4820a Merged changes from branches/wrappers since r177.
Summary of main changes:
+ Added -o/--output and -d/--debug options to pandoc.
+ Modified pandoc to behave differently depending on the name
  of the program.  For example, if the program name is 'html2latex',
  the default reader will be html and the default writer latex. 
+ Removed most of the old wrappers, replacing them with symlinks
  to pandoc.
+ Rewrote markdown2pdf and created a new wrapper web2markdown,
  with the functionality of the old html2markdown script.  These
  new scripts exploit pandoc's -d option to avoid having to do
  complex command-line parsing.
+ Revised man pages and documentation appropriately.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@279 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-22 20:16:03 +00:00
roktas
426cbadfef Merge changes in branches/wrappers into trunk.
[in trunk] svn merge -r105:HEAD \
        https://pandoc.googlecode.com/svn/branches/wrappers


git-svn-id: https://pandoc.googlecode.com/svn/trunk@177 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-12 07:04:09 +00:00
fiddlosopher
6fc88e95fc Changes to man files documenting the ' -- ' option.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@100 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-11-14 07:06:14 +00:00
fiddlosopher
69e23af8e4 Made wrapper scripts sensitive to PANDOC_OPTS environment variable,
which may contain command-line options to be passed to pandoc.
+ Changed the scripts themselves, including $PANDOC_OPTS after 'pandoc'
+ Added ENVIRONMENT to man pages for wrappers
+ Formatting changes to man files
+ Added description of PANDOC_OPTS to README


git-svn-id: https://pandoc.googlecode.com/svn/trunk@91 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-11-12 01:50:56 +00:00
roktas
fdfe8494ca Fix all the errors lintian(1) reported:
+ "SEE ALSO" sections of man files have paragraph fillings errors which   
  groff(1) complains ("cannot adjust line").  This is because .BR line in 
  "SEE ALSO" section is too long to break properly.  Fix all man pages.
  While on it, move all AUTHORS section to the end of the files, this 
  section should come last.
+ lintian(1) complains about the debian/changelog symlink:
    W: pandoc source: changelog-is-symlink
    N:
    N:   The file debian/changelog is a symlink instead of a regular file. This
    N:   is unnecessary and makes package checking and manipulation more
    N:   difficult. If the changelog should be available in the source package
    N:   under multiple names, make debian/changelog the real file and the
    N:   other names symlinks to it.
    N:
    N:   This problem may have prevented lintian from performing other checks,
    N:   leading to undetected changelog errors.
  Reverse the source and targets in symlink to fix this warning.  Now, the 
  Debian packages can be cleanly built.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@74 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-11-03 07:08:47 +00:00
fiddlosopher
b8d960d1b9 Improved man files for pandoc and all wrappers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@57 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-11-01 06:32:52 +00:00
fiddlosopher
76bd231a70 + Improved man page for pandoc and markdown2pdf.
+ Changed README to recommend iconv on both input and output.
+ Added TODO items.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@53 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-11-01 04:32:00 +00:00
roktas
b7784aa411 Add "-o | --output" option to markdown2pdf, update man file.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@18 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-10-27 11:43:14 +00:00
fiddlosopher
efb2dbc990 Wording changes in man files.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@17 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-10-27 06:52:51 +00:00
fiddlosopher
df7b682251 initial import
git-svn-id: https://pandoc.googlecode.com/svn/trunk@2 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-10-17 14:22:29 +00:00