Commit graph

101 commits

Author SHA1 Message Date
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
2e4592b35b Added paragraph to README about producing S5 with separate CSS/javascript.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1302 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-11 17:09:07 +00:00
fiddlosopher
824bb2d22e In smart mode, use nonbreaking spaces after abbreviations in markdown parser.
Thus, for example, "Mr. Brown" comes out as "Mr.~Brown" in LaTeX, and does
not produce a sentence-separating space.  Resolves Issue #75.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1298 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-11 02:14:57 +00:00
fiddlosopher
8ed710bc9d Treat '\ ' in (extended) markdown as nonbreaking space.
Print nonbreaking space appropriately in each writer (e.g. ~ in LaTeX).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1297 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-11 01:24:15 +00:00
fiddlosopher
5f5fb2e503 Additional README changes for OpenDocument writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1273 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-03-25 03:07:23 +00:00
fiddlosopher
9420982b1a Documented OpenDocument writer and markdown2odt in README.
Folded "Requirements" section into description of shell scripts.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1267 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-03-25 02:46:39 +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
83fe5ed66c Acknowledge contributors in README.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1257 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-03-19 18:46:32 +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
f6ea504b83 Updated README's instructions on delimited code blocks to include
information about syntax highlighting.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1225 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:21:57 +00:00
fiddlosopher
705340824d Documentation for delimited code blocks.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1208 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:19:29 +00:00
fiddlosopher
c453e2f7d5 Made -c/--css option repeatable on the command line (like -H, -A, -B).
Documented repeatability of these options in README.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1186 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 20:21:28 +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
0921704d92 Use an interpreted text role to render math in restructuredText.
See http://www.american.edu/econ/itex2mml/mathhack.rst for the
strategy.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1168 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-04 18:59:00 +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
48f2cc5600 Modified rules for HTML header identifiers to ensure legal identifiers.
+ Modified htmlListToIdentifier and uniqueIdentifier in HTML writer
  to ensure that identifiers begin with an alphabetic character.
+ The new rules are described in README.
+ Resolves Issue #33.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1150 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-21 19:25:54 +00:00
fiddlosopher
aea6f6802b Removed support for "box-style" block quotes in markdown.
This adds unneeded complexity and makes pandoc diverge further
than necessary from other markdown extensions.
Brought documentation, tests, and debian/changelog up to date.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1141 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-08 19:32:18 +00:00
fiddlosopher
804756dd1f Removed note about public mimetex server from README.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1134 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 16:29:07 +00:00
fiddlosopher
d411b10438 Put math in HTML inside <span class="math">.
This way it can be distinguished from the surrounding text, e.g. put
in a different font.  Updated README accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1130 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 02:50:41 +00:00
fiddlosopher
d1832da9e1 Added Text.Pandoc.Readers.TeXMath and changed default handling of math.
+ Text.Pandoc.Readers.TeXMath exports readTeXMath, which reads raw TeX
  math and outputs a string of pandoc inlines that tries to render it
  as far as possible, lapsing into literal TeX when needed.
+ Added Text.Pandoc.Readers.TeXMath to pandoc.cabal + ghc66 version.
+ Modified writers so that readTeXMath is used for default HTMl output
  in HTML, S5, RTF, Docbook.
+ Updated README with information about how math is rendered in all formats.
+ Updated test suite.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1129 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 00:36: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
b6f1ccc90b Small change to wording in README.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1121 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-01 03:11:35 +00:00
fiddlosopher
7deee9c874 Reverted changes in r1086 (implicit section header references).
This caused too much of a performance hit.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1093 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-23 03:51:21 +00:00
fiddlosopher
f7b705b44c Implemented implicit reference-style links to section headers in markdown.
For example, if you have a header '# Supported architectures', you can
link to it with '[Supported architectures]'.  If there are multiple
headers with this label, the link will point to the first of them.
Implicit references are always overridden by explicitly specified references.
Addresses Issue #20.

+ Moved isPunctuation, uniqueIdentifiers, and inlineListToIdentifier from
  Text.Pandoc.Writers.HTML to Text.Pandoc.Shared.

+ Added stHeaders to ParserState.   This holds a list of header texts
  used in the document, and is used to construct implicit header references.

+ In Text.Pandoc.Readers.Markdown, added call to headerReference
  parser in initial parsing pass, constructing a list of section header
  labels. This is then passed to uniqueIdentifiers to produce
  identifiers, and a list of implicit references is constructed. This is
  added to the end of the explicitly specified references, so it will be
  overridden by explicitly specified references. All of this processing
  is skipped if --strict was specified.

+ Modified documentation in README.



git-svn-id: https://pandoc.googlecode.com/svn/trunk@1086 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-22 17:14:21 +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
d98dcfbb94 Minor formatting change in README.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@895 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-25 18:04:17 +00:00
fiddlosopher
f11360f50e Added new rule for enhanced markdown ordered lists: if the list marker
is a capital letter followed by a period (including a single-letter
capital roman numeral), then it must be followed by at least two spaces.
The point of this is to avoid accidentally treating people's initials as
list markers: a paragraph may begin:

    B. Russell was an English philosopher.

and this shouldn't be treated as a list.

Modified Markdown reader and README documentation.
Added a test case.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@880 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-23 04:25:09 +00:00
fiddlosopher
e775273011 Changed date on README.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@856 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-15 23:49:25 +00:00
fiddlosopher
3d83624e22 Documented fix for paragraphs starting with (C)
in README.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@848 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-15 17:34:12 +00:00
fiddlosopher
8dc4e67400 Changed (C) to a unicode copyright symbol.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@843 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-15 17:27:46 +00:00
fiddlosopher
e814a3f6d2 Major change in the way ordered lists are handled:
+ The changes are documented in README, under Lists.
+ The OrderedList block element now stores information
  about list number style, list number delimiter, and
  starting number.
+ The readers parse this information, when possible.
+ The writers use this information to style ordered
  lists.
+ Test suites have been changed accordingly.

Motivation:  It's often useful to start lists with
numbers other than 1, and to have control over the
style of the list.

Added to Text.Pandoc.Shared:
+ camelCaseToHyphenated
+ toRomanNumeral
+ anyOrderedListMarker
+ orderedListMarker
+ orderedListMarkers

Added to Text.Pandoc.ParserCombinators:
+ charsInBalanced'
+ withHorizDisplacement
+ romanNumeral

RST writer:
+ Force blank line before lists, so that sublists will be handled
  correctly.

LaTeX reader:
+ Fixed bug in parsing of footnotes containing multiple paragraphs,
  introduced by use of charsInBalanced.  Fix: use charsInBalanced'
  instead.

LaTeX header:
+ use mathletters option in ucs package, so that basic unicode Greek
  letters will work properly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@834 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-08 02:43:15 +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
0ae4a1081b Changed [URL] to [url] in description of --asciimathml option.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@822 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 17:13:25 +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
dccc63fda4 Copyright date change - README.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@797 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-24 01:07:39 +00:00
fiddlosopher
76001db2c6 README: Use definition list for command-line options.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@796 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-24 01:04:19 +00:00
fiddlosopher
3b60ce318b README: Added missing ~ after '~a\ cat' in subscript example.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@794 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-24 00:16:53 +00:00
fiddlosopher
aaee6816b4 Added quotes around attribute in ASCIIMathML link example
(in README).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@788 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 22:31:05 +00:00
fiddlosopher
9a410e1635 README: Removed the statement that the RST reader doesn't parse
definition lists.
HTML reader:  Added failIfStrict to the definitionList parser, so
definition lists will be passed through as raw HTML if --strict
specified.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@783 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 01:41:37 +00:00
fiddlosopher
fbf7bba8af Clarified role of --strict option when input is HTML.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@773 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 20:15:19 +00:00
fiddlosopher
86453926b6 Documented fact that --strict option has a role even when
input format is not markdown (in README).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@749 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21 21:42:03 +00:00
fiddlosopher
1a90879f8b Use capital letters for title in sample man page title block.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@746 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21 20:33:26 +00:00
fiddlosopher
2f7a38e1ab Changed system for indicating man page title, section,
header and footer.  Documented in README.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@745 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21 20:30:40 +00:00
fiddlosopher
2df03311c3 README changes:
+ Documented superscript, subscript, and strikeout syntax
+ Modified description of LaTeX packages needed for markdown2pdf


git-svn-id: https://pandoc.googlecode.com/svn/trunk@743 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21 19:10:28 +00:00