Commit graph

33 commits

Author SHA1 Message Date
John MacFarlane
c8333b5d1b Made author/date more consistent in HTML templates.
Authors are now h2, date h3. (Instead of h3/h4, as in the past.)
2011-12-01 18:57:41 -08:00
John MacFarlane
821286a6f3 Update templates to use Content-Style-Type meta tag.
Closes #337.
2011-11-08 11:54:10 -08:00
John MacFarlane
12110f3282 HTML writer: Display author and date after title. 2011-07-23 11:26:11 -07:00
John MacFarlane
bb89fd9959 Updated tests. 2011-02-04 23:09:51 -08:00
John MacFarlane
ce4f9a3787 HTML writer: Spacing adjustments for Plain and RawHtml blocks. 2011-02-04 21:05:48 -08:00
John MacFarlane
90647a56f6 Updated tests for new HTML format.
Verified against old tests using tidy and diff.
2011-02-04 20:38:08 -08:00
John MacFarlane
91510a109f Improvements to --html5 support:
+ <nav> for TOC, <figure> for figures, type attribute in <ol>.
+ Don't add math javascript in html5.
+ Use style attributes instead of deprecated width, align.
+ html template: move <title> after <meta>.
  Note: charset needs to be declared before title.
+ slidy and s5 templates: move <title> after <meta>.
+ html template: Added link to html5 shim for IE.
+ Make --html5 have an effect only for 'html' writer (not s5, slidy, epub).
2011-01-11 23:15:30 -08: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
John MacFarlane
9be9bccfcf Added --section-divs option.
+ Header identifiers now get attached to the headers, unless
  --section-divs is specified, in which case they are added to
  enclosing divs. By default, the divs are not added.
+ Resolves Issue #230, #239.
2010-07-15 22:26:45 -07:00
John MacFarlane
a59a141906 Put insert-before text before the title h1 in HTML.
+ This is the documented behavior; the insert-before text
  comes after the <body> tag.
+ Resolves Issue #241.
2010-07-13 19:30:10 -07:00
John MacFarlane
c243e5b67b Use texmath's parser in TexMath module.
* This replaces a lot of custom parser code, and expands
  the tex -> unicode conversion.
* The behavior has also changed: if the whole formula can't
  be converted, the whole formula is left in raw TeX.
  Previously, pandoc converted parts of the formula to unicode
  and left other parts in raw TeX.
* Added (but not yet exported) readTeXMath', which returns a Maybe.
* Updated tests
2010-04-25 20:30:27 -07: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
709de16223 Use UTF8 instead of entities in HTML.
Resolves Issue #163.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1744 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 02:06:52 +00:00
fiddlosopher
312d9337b9 Improved RST writer.
Updated test suite.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1725 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:16:19 +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
df5244fd48 HTML writer: wrap sections in divs. Resolves Issue #70.
+ hierarchicalize has been rationalized; it builds a hierarchical
  representation of the document from the headers, and simultaneously
  gives each section a unique identifier based on the heading title.
+ Identifiers are now attached to the divs rather than
  to the headers themselves.
+ Table of content backlinks go to the beginning of the table, rather
  than to the section reference that was clicked.  This seems better.
+ Code for constructing identifiers has been moved to Text.Pandoc.Shared
  from the HTML writer, since it is now consumed only by
  hierarchicalize.
+ In --strict mode, pandoc just prints bare headings, as before
  (unless --toc has been specified).
+ In s5 output, it does not wrap sections in divs, as that seems to
  confuse the s5 javascript.
+ Test suite updated accordingly.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1562 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-25 00:29:58 +00:00
fiddlosopher
f8a257589b Updated test suite -- no italics for digits.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1133 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 08:35:24 +00:00
fiddlosopher
c15dfb2cf9 Updated HTML and S5 writer tests for new span tags in math.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1131 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 02:58:07 +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
ac133dcba0 Updated tests with new way of displaying math in HTML (with no enclosing $'s).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1126 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-01 03:11:59 +00:00
fiddlosopher
2ea3e94957 Added xmlns attribute to html element in html writer tests.
This attribute is added by more recent versions of the
xhtml library, including the one that comes with GHC 6.6.1.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1003 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-03 03:02:01 +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
497a1b7815 Changes to tests to accommodate r653.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@654 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 17:09:37 +00:00
fiddlosopher
766dbb9899 Updated tests to account for changes in HTML writer (identifiers).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@641 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:09:26 +00:00
fiddlosopher
463a0e5c3e Changes to test suite for new XHTML output.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@550 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-02-27 07:05:11 +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
030d94e1c3 Refactored SGML escaping functions and "in tag" functions to
Text/Shared/Pandoc.  (escapeSGML, stringToSGML, inTag,
inTagSimple, inTagIndented, selfClosingTag)  These can be
used by both the HTML and Docbook writers.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@417 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-04 22:52:16 +00:00
fiddlosopher
eea359203a Reversed changes from r246:
+ Removed invisible anchors in front of header tags in HTML output.
  Reason:  no way to prevent duplicate ID attributes (which is invalid
  HTML), since there might be duplicate header titles.  See 
  http://six.pairlist.net/pipermail/markdown-discuss/2005-January/000975.html.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@306 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-29 08:04:39 +00:00
fiddlosopher
5cf769b1cd Modified the HTML writer to add invisible anchors to each section
heading.  The anchors are derived form the text of the section
heading as described in README.  This makes it easy to insert
links that jump from one part of a document to another:
for example, '[back to the Introduction](#Introduction)'.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@246 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-20 00:25:54 +00:00
fiddlosopher
661c7e7b1d Merged changes to footnotes branch r219-r240.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@241 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-19 23:13:03 +00:00
fiddlosopher
fe66a90a2a Changed 'putStrLn' to 'putStr' in Main.hs, and modified some
of the readers to make spacing at end of output more consistent.
Modified tests accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@201 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-16 05:05:02 +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