Commit graph

79 commits

Author SHA1 Message Date
John MacFarlane
26d30d6d38 Use proportional font for email autolinks with obfuscation.
Closes #714.
2013-01-21 11:28:35 -08:00
John MacFarlane
8c48bd8feb Don't put the text of an autolink in Code font. 2013-01-06 20:51:51 -08:00
John MacFarlane
0f9e2c2320 Added css to preserve spaces in <code> tags.
Thanks to Dirk Laurie.
2013-01-04 23:02:22 -08:00
John MacFarlane
bad3c88cb6 HTML writer: Improve line breaks with <dd> tags.
We now put a newline between `</dd>` and `<dd>` when
there are multiple definitions.
2012-09-12 08:45:03 -07:00
John MacFarlane
3a0b3df007 Put date in YYYY-MM-DD format if possible for HTML, docx metadata.
Added normalizeDate to Text.Pandoc.Shared.
2012-01-28 15:54:34 -08:00
John MacFarlane
6c7bffb544 Updated tests for changes to HTML note back references. 2011-12-29 22:11:14 -08:00
John MacFarlane
70b4ec95e4 Updated tests. 2011-12-27 18:08:06 -08:00
John MacFarlane
bfa5ca01bc HTML writer: Use <del> for strikeout. 2011-12-18 11:08:04 -08:00
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
1da1d4ec24 Updated writer tests for new version of texmath. 2011-11-12 13:25:02 -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
3162adbd9b HTML writer: Removed English title on footnote back links.
This is incongruous in non-English documents.
2011-07-24 16:24:27 -07:00
John MacFarlane
12110f3282 HTML writer: Display author and date after title. 2011-07-23 11:26:11 -07:00
John MacFarlane
bdf23d3a5d Improved HTML table output (line breaks). 2011-02-04 23:35:10 -08: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
f8dca6ccbc Add support for attributes in inline Code.
Additional related changes:

* URLs in Code in autolinks now use class "url".
* Require highlighting-kate 0.2.8.2, which omits the final <br/> tag,
  essential for inline code.
2011-01-26 20:44:25 -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
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
57a91f3b6a Added --webtex option for HTML math.
+ Added --webtex command-line option, with optional parameter.
  (Defaults to using google charts API.)
+ Added WebTeX HTMLMathMethod.
+ Removed MimeTeX HTMLMathMethod.  (WebTeX is generic and subsumes it.)
+ Modified --mimetex option to use WebTeX.
+ Thanks to lpeterse for the idea and some of the code.
2010-07-15 19:01:00 -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
a9b0d876d9 HTML writer: Use a p rather than a div for image caption.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1900 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-18 02:39:06 +00:00
fiddlosopher
cb31c89eab HTML writer: implemented image-with-caption feature.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1891 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-03-16 04:06:25 +00:00
fiddlosopher
87c66d4623 Finished converting HTML writer to use unicode instead of entities.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1767 788f1e2b-df1e-0410-8736-df70ead52e1b
2010-01-01 04:11:48 +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
e620eab478 HTML footnotes: put anchor inside sup, instead of other way.
Resolves Issue #191.  Thanks to infinity0x for suggesting.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1743 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:47:08 +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
43d5e3d279 HTML writer changes for templates.
Note:  now a single meta tag is used for multiple authors.
Previously one tag per author was used.

Fixed title in HTML template to avoid excess blank space.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1703 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-12-31 01:13:26 +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
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
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
57df7f5eb6 HTML writer: override Text.XHtml's stringToHtml function,
so that characters below 0xff are not converted to numerical entity
references. Also convert '\160' to "&nbsp;". This should aid readability
and editability of the HTML source. It does presuppose that the HTML
will be served as UTF-8.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1338 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-27 03:54:07 +00:00
fiddlosopher
4725e7b1a7 HTML writer test: use UTF-8 characters rather than entities.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1333 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-23 23:09:47 +00:00
fiddlosopher
7c35c0bc25 Fixed bug in Markdown parser: regular $s triggering math mode.
For example:  "shoes ($20) and socks ($5)."

The fix consists in two new restrictions:
+ the $ that ends a math span may not be directly followed by a digit.
+ no blank lines may be included within a math span.

Thanks to Joseph Reagle for noticing the bug.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1326 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-07-15 20:41:27 +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
0fc174ac78 In HTML tests, use decimal entities for everything above 127.
This is how xhtml-3000.2.0.0 works.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1292 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-06-19 19:05:58 +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
839f77d81e Use style attributes rather than css classes for strikethrough and ordered list styles.
This works better when fragments, rather than standalone documents, are generated.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1245 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-24 18:15:36 +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
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
b008e5d347 Modified writer tests for new Math and TeX output.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1119 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29 08:09:37 +00:00
fiddlosopher
f8eac5b377 Markdown writer: Don't print title attribute if title is empty.
(This differs from the behavior of Markdown.pl, and agrees with PHP
Markdown.  But John Gruber has indicated that he prefers this behavior.)
Adjusted test suite accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1026 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-18 01:35:50 +00:00