Commit graph

4740 commits

Author SHA1 Message Date
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
22a6538557 Added parsing for \url to LaTeX reader.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@833 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-03 22:44:47 +00:00
fiddlosopher
271c3f987e Use \url{} for autolinks in LaTeX writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@832 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-03 22:14:32 +00:00
fiddlosopher
44b136740b Changes to Markdown reader:
+ added try to def of indentSpaces
+ in def of 'reference', check to make sure it's not a note reference
  first.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@827 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 19:14:50 +00:00
fiddlosopher
5e13f8c320 Removed examplep specific stuff in LaTeX reader.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@826 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 18:23:13 +00:00
fiddlosopher
1be1f77569 LaTeX writer:
+ No longer using examplep (too many quirks, too hard to install)
+ Instead, using deVerb function for environments that don't support
  \verb
+ And fancyvrb for footnotes and verbatim environments in footnotes.
+ Add fancyvrb to header if Code inline occurs in a footnote.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@825 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 18:14:40 +00:00
fiddlosopher
7c8dcc3db6 Cleaned up and fixed autolinks in RST. All that's needed
is a bare email address or URL.  This is now handled with
a separate matching clause in the definition of inlineToRST,
rather than with conditionals.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@821 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 15:33:58 +00:00
fiddlosopher
db0757d65b Don't put autolinks in typewriter font in ConTeXt, since
ConTeXt has its own way of printing links.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@820 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 15:33:04 +00:00
fiddlosopher
f273965e16 Fixed problems with obfuscateLink introduced by last round
of changes.  Changed type so that text parameter is String,
not HTML, which allows easier testing for autolinks.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@819 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 06:38:49 +00:00
fiddlosopher
d3404581d4 Changes in LaTeX reader to accommodate Pandoc's own use of
examplep.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@818 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 05:45:27 +00:00
fiddlosopher
d65f01f467 Man page writer: modified treatment of autolinks,
in accord with recent change from Str to Code.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@816 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 04:14:32 +00:00
fiddlosopher
94ed30cf15 LaTeX writer: include fancyvrb and \VerbatimFootnotes
line in header only if absolutely needed -- that is, only
if there is actually a code block in a footnote.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@815 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 03:58:09 +00:00
fiddlosopher
465c0849ff Simplified HTML writer's treatment of autolinks.
There are now a few different cases for Link, and
less conditional logic needed.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@813 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 02:43:04 +00:00
fiddlosopher
9939b0f07e Make URLs and emails in autolinks appear as Code.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@810 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 02:12:40 +00:00
fiddlosopher
cf87eb854d Fixed a bug in Docbook writer: email links with text were being
incorrectly treated as autolinks.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@809 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 02:11:04 +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
4283ce3662 Use ` as default character for \verb in LaTeX output.
If ` is in the content to be escaped, another symbol
will be used as before.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@806 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-27 22:52:11 +00:00
fiddlosopher
1f9d2f8fe7 Include empty \author{} in LaTeX preamble if no
author specified; otherwise LaTeX gives an error.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@803 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-26 03:49:21 +00:00
fiddlosopher
453dc53457 Fixes in LaTeX writer:
+ put \VerbatimFootnotes right before \title block, to avoid
  bad interactions.
+ added deVerb in description list.
+ removed \texttt{} from deVerb, because it cannot go in description
  lists.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@802 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-26 03:15:35 +00:00
fiddlosopher
f2e21a8476 Changed how ASCIIMathML is handled:
+ -m|--asciimathml option now takes an *optional* argument,
  the URL to an asciiMathML.js script.  This is much better
  in situations where multiple files with math must be served,
  as the script can be cached.
+ If the argument is provided, a link is inserted; otherwise,
  the whole script is inserted as before.
+ Nothing is inserted unless there is inline LaTeX.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@799 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-26 02:19:20 +00:00
fiddlosopher
6c8bb8e9a3 Fixed bug in TOC generation in HTML writer (regression,
introduced by the revision in the WriterState type).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@793 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-24 00:11:34 +00:00
fiddlosopher
e7a49d7c12 LaTeX writer: Make sure \VerbatimFootnotes goes after the
preamble; otherwise it has bad interaction effects
with the other stuff in the header.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@791 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 23:14:26 +00:00
fiddlosopher
d8762eb436 In HTML reader, filter Nulls in lists of blocks. (These can
be caused by raw HTML when the parse-raw option isn't selected.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@787 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 02:50:29 +00:00
fiddlosopher
9f871ab1ec Fixed bug in spanStrikeout: case was not exhaustive.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@786 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 02:28:15 +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
6a6b1a5842 Added support for definition lists to RST reader.
Added a relevant test to the test suite.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@782 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 01:35:03 +00:00
fiddlosopher
f69d9efc83 Added definition list support to HTML reader.
Added a test for definition lists to the html-reader test suite.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@781 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 01:21:21 +00:00
fiddlosopher
1296273c85 Added support for definition lists to LaTeX reader.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@780 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 00:19:37 +00:00
fiddlosopher
caef362065 Renamed parseFromStr -> parseFromString.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@779 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-23 00:19:00 +00:00
fiddlosopher
4beb0b9130 Superscript and Subscript support for RST reader.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@777 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 21:26:22 +00:00
fiddlosopher
c1f397622d Added a "try" to the end parser in enclosed (Text.Pandoc.ParserCombinators).
This makes errors in its use less likely. Removed some now-unneeded try's
in calling code.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@776 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 21:01:17 +00:00
fiddlosopher
3ca9932ca6 Added subscript and superscript support to LaTeX reader.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@775 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 20:30:07 +00:00
fiddlosopher
bb5ac55f67 Man writer: Use ~ and ^ for subscripts and superscripts.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@770 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 20:13:43 +00:00
fiddlosopher
7006d9a044 HTML writer: Use a record for state, instead of a tuple, for
easy extensibility.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@769 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 20:00:49 +00:00
fiddlosopher
b4d289c65e HTML writer: include css for .strikethrough only if strikethrough
is actually used in the document.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@768 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 19:32:39 +00:00
fiddlosopher
9ddd464a7e Added ~ to the list of characters the markdown
writer should backslash-escape.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@765 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 18:33:41 +00:00
fiddlosopher
4905ebadb3 LaTeX reader: Added clauses for tilde and caret.
Tilde is \ensuremath{\sim}, and caret is \^{},
not \^ as before.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@764 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 18:26:10 +00:00
fiddlosopher
b8e1e53053 Cleaned up character escaping in LaTeX writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@763 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 18:24:34 +00:00
fiddlosopher
b19c36970e Removed an extra occurance of escapedChar in definition
of inline.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@762 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 17:51:15 +00:00
fiddlosopher
9f38f9d039 Man writer:
+ Make sure to include "" if no section is specified
  in a man page TH line.
+ Updated man writer tests.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@758 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 16:17:20 +00:00
fiddlosopher
062cdfe7de Changed text to char for one character strings
in RST, Man, and Docbook writers.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@757 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 16:10:48 +00:00
fiddlosopher
2b3c2d43ef Markdown writer: Substituted char for text for single characters.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@756 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 16:08:19 +00:00
fiddlosopher
6bb6dd2bfd + Added support for superscript, subscript, and
strikeout to all writers. (Thanks to Bradley Kuhn
  for the patches for strikeout, here slightly modified.)
+ Refactored character escaping using the new functions
  escapeStringUsing and backslashEscapes.
+ Added state to LaTeX writer, which now keeps track of what
  packages need to be included in the preamble, based on the
  content of the document. (Thus, e.g., ulem is only required
  if you use strikeout.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@755 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 16:05:38 +00:00
fiddlosopher
d03ec5a4a2 Added support for strikeout (\sout) to latex
reader.  (Thanks to Bradley Sif for the patch.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@754 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 05:14:43 +00:00
fiddlosopher
a2194f23db Added support for Strikeout, Superscript, and Subscript to
HTML reader.  Thanks to Bradley Sif for the patch for
Strikeout (Issue #18).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@753 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21 22:54:40 +00:00
fiddlosopher
44b11214ba + Added support for Strikeout, Superscript, and
Subscript in markdown reader.
+ Also replaced constants like emphStart with literals. 


git-svn-id: https://pandoc.googlecode.com/svn/trunk@752 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21 22:52:07 +00:00
fiddlosopher
dc60aa3aea + Added Strikeout support to Markdown writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@751 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21 22:07:10 +00:00
fiddlosopher
9b664073d5 Moved failIfStrict from Markdown reader to
Text.Pandoc.Shared.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@750 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21 21:55:19 +00:00
fiddlosopher
f0fb4c496b Changes to functions for character escaping:
+ Removed escapeCharAsString
+ Added escapeStringUsing
+ Changed backslashEscape to backslashEscapes, which
  now returns an association list of escapes to be
  passed to escapeStringUsing


git-svn-id: https://pandoc.googlecode.com/svn/trunk@748 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-21 21:34:13 +00:00