Commit graph

53 commits

Author SHA1 Message Date
John MacFarlane
6a28923b9f Updated tests for context template changes. 2015-11-20 14:50:37 -08:00
John MacFarlane
0fd138167c Updated tests for template changes. 2015-11-12 16:09:41 -08:00
John MacFarlane
652b60f141 Updated tests for latex/context template changes. 2015-10-20 15:22:52 -07:00
mb21
fa2b26ddcb Added writers-lang-and-dir test, fixed ConTeXt writer test
The writers-lang-and-dir testGroup tests LaTeX and ConTeXt
writers' language and directionality output
2015-10-18 17:01:38 +02:00
John MacFarlane
7398dea65f Updated context writer test. 2015-07-06 17:20:26 -07:00
John MacFarlane
598d3ee23b Markdown reader: better handling of paragraph in div.
Previously text that ended a div would be parsed as Plain
unless there was a blank line before the closing div tag.

Test case:

    <div class="first">
    This is a paragraph.

    This is another paragraph.
    </div>

Closes #1591.
2014-08-31 12:55:47 -07:00
John MacFarlane
093229dc35 ConTeXt writer: Improved autolinks.
Closes #1270.
2014-04-30 08:58:10 -07:00
John MacFarlane
dde484f809 Fixed tests for new ConTeXt writer behavior. 2013-11-30 16:34:32 -08:00
John MacFarlane
526762bf22 ConTeXt writer: Use setupcaption to separate style from content.
Instead of adding 'nunumber' every time we place a figure...

Closes #1067.
2013-11-22 19:51:07 -08:00
John MacFarlane
8ff81dc9ca Updated tests for tight/loose lists.
Taking into account new context/latex output, and fixing
some bugs in the test suite Tests.Helpers and Tests.Writers.ConTeXt.
(We had the wrong order of expected/actual in the diff output.)
2013-01-07 20:58:49 -08:00
John MacFarlane
3e8e20b4f5 Fixed spacing in context writer test. 2012-09-08 12:13:36 -07:00
John MacFarlane
7da913dbd7 ConTeXt writer: don't escape &,^,<,>.
Simplified escapes for `}` and `{` to `\{` and `\}`.

Thanks to Aditya Mahajan.
2012-06-27 15:05:13 -07:00
John MacFarlane
e9f6366af7 Don't escape _ as \letterunderscore{} in ConTeXt. 2012-06-26 19:50:52 -07:00
John MacFarlane
210d186f9c Updated tests for context template changes. 2012-03-03 08:38:40 -08:00
John MacFarlane
661d0646d0 Updated context tests. 2011-12-30 18:22:09 -08:00
John MacFarlane
83680430b3 Updated ConTeXt tests. 2011-12-30 13:05:04 -08:00
John MacFarlane
2c15a876d8 Updated to use revised context template. 2011-08-25 09:39:20 -07:00
John MacFarlane
24095e0615 ConTeXt writer: Changed 'descr' to 'description', fixed alignment. 2011-08-20 15:30:57 -07:00
John MacFarlane
55b3d0f7c3 Fixed ConTeXt writer tests. 2011-08-18 19:29:22 -07:00
John MacFarlane
71736869bb ConTeXt writer: Made \start/stoptyping flush with margin.
This prevents extra blank lines.
2011-07-19 16:29:33 -07:00
John MacFarlane
eb26fa6f54 Distinguish latex & context environments; blank line after in writers. 2011-01-26 17:23:56 -08:00
John MacFarlane
bd43c0f4c9 Bumped version to 1.8; depend on pandoc-types 1.8.
The old TeX, HtmlInline and RawHtml elements have been removed
and replaced by generic RawInline and RawBlock elements.

All modules updated to use the new raw elements.
2011-01-26 17:22:53 -08:00
John MacFarlane
8dcc67a993 ConTeXt writer: Don't add cr at end of inline footnote. 2011-01-22 12:17:39 -08:00
John MacFarlane
2587543457 ConTeXt writer: Updated to use Text.Pandoc.Pretty. 2010-12-20 19:36:35 -08:00
John MacFarlane
7e9e959548 LaTeX & ConTeXt writers: escape [ and ] as {[} and {]}.
This avoids unwanted interpretation as optional arguments
in some contexts, which caused the brackets to silently
disappear!
2010-10-24 19:38:16 -07:00
John MacFarlane
feb70b6e93 Made spacing at end of output more consistent.
Previously some of the writers added spurious whitespace.
This has been removed, resolving Issue #232.

NOTE: If your application combines pandoc's output with other
text, for example in a template, you may need to add spacing.
For example, a pandoc-generated markdown file will not have
a blank line after the final block element.  If you are inserting
it into another markdown file, you will need to make sure there
is a blank line between it and the next block element.
2010-07-20 12:42:12 -07:00
fiddlosopher
9562390d68 ConTeXt writer: support images in figures.
Also, DON'T put image in figure (as was done previously)
when it's an inline image.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1893 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-16 06:45:47 +00:00
fiddlosopher
1bc5fc0117 Updated context tests.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1869 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-07 19:35:47 +00:00
fiddlosopher
22dcf7afdd Tweaked templates and tests.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1711 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:14:27 +00:00
fiddlosopher
3d8cccc7e3 Fixed spacing in latex, context templates.
Minor fixes in latex, context tests.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1707 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:13:56 +00:00
fiddlosopher
5082b5411b Improved syntax for markdown definition lists.
Definition lists are now more compatible with PHP Markdown Extra.
Resolves Issue #24.

+ You can have multiple definitions for a term (but still not
  multiple terms).
+ Multi-block definitions no longer need a
  column before each block (indeed, this will now cause
  multiple definitions).
+ The marker no longer needs to be flush with the left margin,
  but can be indented at or two spaces.  Also, ~ as well as :
  can be used as the marker (this suggestion due to David
  Wheeler.)
+ There can now be a blank line between the term and
  the definitions.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1656 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-07 08:26:53 +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
5d3d2d79b3 Rewrote test suite so it doesn't depend on perl or unix tools.
+ Replaced old runtests.pl with a Haskell script RunTests.hs.
+ Added Diff.hs module to be used by RunTests.hs instead of unix 'diff'.
+ Added test hook to Setup.hs, so tests may be run from cabal.
+ Changed Makefile's 'test' target to run tests via cabal.
+ Removed old generate.sh.
+ Since we no longer have 'sed' to filter out raw HTML sections
  from the docbook writer test, or raw LaTeX sections from the
  context writer test, we now just include these sections.
  They can be taken out if it is necessary to process the files.
+ Updated latex and context writer tests to remove extra spaces
  after '\\item'
+ Added a markdown table reader test.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1385 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-08-09 16:51:08 +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
cd38d4ae79 Markdown smart typography: Em dashes no longer eat surrounding whitespace.
Resolves Issue #69.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1279 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-06-08 03:20:15 +00:00
fiddlosopher
d3a179cdfc Added \setupitemize[autointro] to ConTeXt header, to prevent orphaned
list introduction lines.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1195 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-23 02:17:59 +00:00
fiddlosopher
5e65598b9e Use wrappers around Doc elements to ensure proper spacing in ConTeXt writer.
Each block element is wrapped with either Pad or Reg.  Pad'ed elements are
guaranteed to have a blank line in between.  Updated ConTeXt tests.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1158 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-29 09:31:45 +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
6cfe6c250a Adjusted test suite for footnote changes in LaTeX and ConTeXt writers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1138 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-04 04:14:27 +00:00
fiddlosopher
f957c6ef32 Changes to testsuite for new \useURL in context writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1088 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-22 18:16:39 +00:00
fiddlosopher
f4a1fa4b8d More improvements to ConTeXt writer:
+ writer options are now in state, so they don't have to be passed as
  a parameter
+ state also keeps track of ordered list level, so the right default
  numbering scheme can be used
+ extra blank line after \stopitemize
+ removed definitions of ltxenum and ltxitem from the preamble
+ both kinds of lists are now generated using \start-stopitemize, with
  appropriate options
+ in the case of bulleted lists, no options need be specified, because
  defaults are given in the preamble
+ test suite updated accordingly


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1084 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-18 01:24:43 +00:00
fiddlosopher
5fa78695bc ConTeXt writer:
+ Don't use \(sub)+subject if header level > 5.
+ Modified tests to conform to new treatment of level 4 and 5 headers.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1083 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-17 23:34:16 +00:00
fiddlosopher
09b57fcf9c Adjusted formatting of LaTeX and ConTeXt footnotes:
- in ConTeXt, % is not needed at end of line before note, since
  space is gobbled.
- beginning of footnote indented four spaces.
- this required an additional parameter in wrappedTeX and
  wrapTeXIfNeeded, in Text.Pandoc.Shared.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1080 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-17 18:42:11 +00:00
fiddlosopher
a487bbb5a9 Updated tests for changes in LaTeX and ConTeXt writers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1073 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-15 03:21:10 +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
e48f046aa0 + Fixed bug in markdown ordered list parsing. The problem was
that anyOrderedListStart did not check for a space following the
  ordered list marker. So, 'A.B. 2007' would be parsed as a list item,
  then fail because of the lack of space after 'A.' (required by
  orderedListStart). Resolves Issue #22.
+ Fixed a similar problem in RST reader.
+ Added regression test.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@861 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-18 15:26:29 +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
de72aea6b4 Brought test suite up to date.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@828 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 19:15:30 +00:00
fiddlosopher
c9e89e1793 Updated test suite for writers, adding tests for
strikeout, superscript, subscript.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@766 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 18:49:23 +00:00