@@ -7,266 +7,163 @@ also use 'cabal install' to get the latest version from HackageDB:
77 cabal update
88 cabal install pandoc
99
10−Here is a summary of the major changes in this version.
11−
12−New writers
13−-----------
14−
15−Two new output formats are supported: [EPUB] and [Slidy].
16−
17−EPUB is a standard ebook format, used in Apple's iBooks for the iPad
18−and iPhone, Barnes and Noble's nook reader, the Sony reader, and many
19−other devices, and by online ebook readers like [bookworm]. (Amazon's
20−Kindle uses a different format, MobiPocket, but EPUB books can easily be
21−converted to Kindle format.) Now you can write your book in markdown and
22−produce an ebook with a single command! I've put up a short
23−[tutorial here].
24−
25−Slidy, like S5, is a system for producing HTML+javascript slide shows.
26−
27−[EPUB]: http://en.wikipedia.org/wiki/EPUB
28−[Slidy]: http://www.w3.org/Talks/Tools/Slidy
29−[bookworm]: http://bookworm.oreilly.com/
30−[tutorial here]: http://johnmacfarlane.net/pandoc/epub.html
31−
32−New Command-line Options
33−------------------------
34−
35−For EPUB output:
36−
37− * `--epub-stylesheet` allows you to specify a CSS file that will
38− be used to style your ebook.
39−
40− * `--epub-metadata` allows you to specify a file containing metadata
41− besides the title and authors, which are automatically included.
42−
43−For Slidy and S5 output:
44−
45− * `--offline` causes the javascript and stylesheets needed for
46− S5 or Slidy slide shows to be included directly in the generated
47− HTML. (By default, only links are included.)
48−
49−Note that this option goes with a change in the default behavior of the
50−S5 writer, which used to include the javascript and stylesheets whenever
51−`--standalone` was specified. If you are relying on pandoc to produce a
52−self-contained slide show, you should specify `--offline`.
53−
54−For HTML output:
55−
56− * `--webtex` causes TeX math to be converted to images using the Google
57− Charts API (unless a different URL is specified). (Thanks to
58− lpeterse.)
59−
60− * Added `--section-divs` option. Causes div tags to be added around
61− each section in an HTML document.
62−
63−This last change requires a bit of explanation. Before version 1.2,
64−pandoc would put section identifiers directly on headers:
65−
66− <h1 id="my-section">My Section</h1>
67− ...blah blah...
68−
69−Someone wanted to be able to manipulate whole sections in javascript,
70−so, starting with 1.2, I changed pandoc to put sections inside divs,
71−with the identifiers on the divs:
72−
73− <div id="my-section">
74− <h1>My Section</h1>
75− ...blah blah...
76− </div>
77−
78−Recently several people have pointed out to me that the divs can
79−produce bad interaction effects when combined with raw HTML.
80−http://code.google.com/p/pandoc/issues/detail?id=230
81−
82−So in 1.6, I have reverted to the old behavior (no divs, identifiers
83−directly on section headers) as a default, adding a `--section-divs`
84−option that will select the 1.2-1.5 behavior, with divs around sections
85−and identifiers on the divs.
86−
87−Markdown extensions
88−-------------------
89−
90−You can now use "grid tables" in markdown. (Most of the code
91−is from Eric Kowey's grid tables patch to the RST reader, from
92−the last release.)
93−
94−Table captions need no longer begin with the English word
95−`Table:`, a bare colon is sufficient. Also, captions may appear
96−above a table instead of below it.
97−
98−A new type of list marker, `@`, has been added. A list with items
99−numbered `@` is sequentially numbered, like a list with items numbered
100−`#`. The difference is that with `@`, the number sequence continues
101−across a list boundary. `@` list items may also be labeled and referred
102−to elsewhere in the document. An example will illustrate their use:
103−
104− Here is my first list:
105−
106− (@) first example, numbered 1
107− (@) second example, numeber 2
108−
109− Some commentary here.
110−
111− (@) third example, numbered 3
112− (@special) fourth example, numbered 4
113− (@) fifth example, numbered 5
114−
115− Some commentary about (@special) (will appear as 4).
116−
117−This feature allows easy construction of a running list of
118−sequentially numbered examples. For documentation, see README under
119−"Numbered examples."
120−
121−API Changes
122−-----------
123−
124−There are quite a few API changes in this release. If you use pandoc
125−as a library, please review these carefully.
126−
127− * Text.Pandoc.Shared:
128− + HTMLMathMethod: Added WebTeX, removed MimeTeX. (WebTeX is
129− generic enough to subsume MimeTeX.)
130− + WriterOptions: Added writerUserDataDir, writerSourceDirectory,
131− writerEPUBMetadata fields. Removed unused fields
132− writerIncludeBefore, writerIncludeAfter.
133− + Moved all the parsing-related functions and definitions
134− to a new module, Text.Pandoc.Parsing.
135− + Moved headerShift from pandoc.hs.
136−
137− * New module, Text.Pandoc.Parsing, for shared parsing functions
138− and ParserState.
139− + Added HTMLSlideVariant.
140− + Made KeyTable a map instead of an association list.
141− This affects the RST and Markdown readers.
142− + The type for stateKeys in ParserState has changed.
143−
144− * Text.Pandoc.Definition:
145− + Pandoc, Meta, Inline, and Block have been given Ord instances.
146− + Reference keys now have a type of their own (Key), with its
147− own Ord instance for case-insensitive comparison.
148−
149− * New module, Text.Pandoc.Writers.EPUB.
150−
151− * New utility module, Text.Pandoc.UUID, for generating random UUIDs for
152− EPUBs.
153−
154− * Removed Text.Pandoc.ODT, added Text.Pandoc.Writers.ODT.
155− Instead of saveOpenDocumentAsODT, we now have writeODT, which takes
156− a Pandoc document and produces a bytestring. saveOpenDocumentAsODT
157− has been removed.
158−
159− * Added Text.Pandoc.Writers.Native. This contains the prettyprinting
160− code from Text.Pandoc.Shared. prettyPandoc has been removed;
161− use the new writeNative instead.
162−
163− * Added Text.Pandoc.UTF8 for portable UTF8 string IO.
164−
165− * Removed Text.Pandoc.Writers.S5 and writeS5 function.
166− Moved s5Includes to new module, Text.Pandoc.S5.
167− (Now S5 is handled in more or less the same way as slidy;
168− to write s5, you use writeHtml with writerSlideVariant set
169− to S5Slides or SlidySlides.)
170−
171−Template Changes
172−----------------
173−
174−There have been some changes to the default templates; please update
175−your templates.
176−
177− * HTML template: avoid empty meta tag if no date.
178−
179− * Added S5 and Slidy templates.
180−
181− * Added amssymb to the preamble in the default latex template.
182−
183− * Use default highlighting CSS rather than embedding CSS in templates.
184− Note: if you use an older template, you'll have the wrong CSS for
185− recent versions of highlighting-kate.
186−
187−Other Changes
188−-------------
189−
190− * All input is assumed to be UTF-8, and all output is UTF-8. Pandoc no
191− longer respects locale, even when compiled by GHC 6.12.
192−
193− * Made spacing at end of output more consistent. Previously some
194− of the writers added spurious whitespace. This has been removed.
195− Note: If your application combines pandoc's output with other
196− text, for example in a template, you may need to add spacing.
197− For example, a pandoc-generated markdown file will not have
198− a blank line after the final block element. If you are inserting
199− it into another markdown file, you will need to make sure there
200− is a blank line between it and the next block element.
201−
202− * In S5 (and Slidy), horizontal rules now cause a "slide break,"
203− so you are no longer limited to one slide per level-one
204− section.
205−
206− * Improved handling of code in man writer.
207− + Inline code is now in monoscpace, not bold.
208− + Code blocks now use .nf (no fill) and .IP (indented paragraph).
209−
210− * HTML reader: parse <tt> as Code.
211−
212− * HTML writer: Put insert-before text before the title h1 in HTML.
213− This is the documented behavior; the insert-before text
214− comes after the <body> tag.
215−
216− * Add bird tracks to lhs in HTML when compiled wo -fhighlighting.
217− Previously the bird tracks would be stripped off when pandoc was
218− not compiled with highlighting support, even if -t html+lhs was
219− specified. Thanks to Nicholas Wu for pointing out the problem.
220−
221− * Don't allow colon in autogenerated XML/HTML identifiers.
222− They have a special meaning in XML (e.g. in EPUB).
223−
224− * LaTeX reader:
225− + Made latex \section, \chapter parsers more forgiving of whitespace.
226− + Added stateHasChapters to ParserState.
227− + Parse \chapter{} in latex. If a \chapter command is encountered,
228− this is set to True and subsequent \section commands (etc.) will
229− be bumped up one level.
230− + Changed rawLaTeXInline to accept '\section', '\begin', etc.
231− + Use new rawLaTeXInline' in LaTeX reader, and export rawLaTeXInline
10+Thanks to everyone who contributed, either by filing bug reports or by
11+contributing patches. Here is a summary of the major changes in this
12+version:
13+
14++ New EPUB and HTML Slidy writers. (Issue #122)
15+
16+ - [EPUB] is a standard ebook format, used in Apple's iBooks for
17+ the iPad and iPhone, Barnes and Noble's nook reader, the Sony
18+ reader, and many other devices, and by online ebook readers like
19+ [bookworm]. (Amazon's Kindle uses a different format, MobiPocket,
20+ but EPUB books can easily be converted to Kindle format.) Now you
21+ can write your book in markdown and produce an ebook with a single
22+ command! I've put up a short [tutorial here].
23+ - [Slidy], like S5, is a system for producing HTML+javascript slide shows.
24+
25++ All input is assumed to be UTF-8, no matter what the locale and ghc
26+ version, and all output is UTF-8. This reverts to pre-1.5 behavior.
27+ Also, a BOM, if present, is stripped from the input.
28+
29++ Markdown now supports grid tables, whose cells can contain
30+ arbitrary block elements. (Issue #43)
31+
32++ Sequentially numbered example lists in markdown with `@` marker.
33+
34++ Markdown table captions can begin with a bare colon and no longer need
35+ to include the English word "table." Also, a caption can now occur
36+ either before or after the table. (Issue #227)
37+
38++ New command-line options:
39+
40+ - `--epub-stylesheet` allows you to specify a CSS file that will
41+ be used to style your ebook.
42+ - `--epub-metadata` allows you to specify metadata for the ebook.
43+ - `--offline` causes the generated HTML slideshow to include all
44+ needed scripts and stylesheets.
45+ - `--webtex` causes TeX math to be converted to images using the
46+ Google Charts API (unless a different URL is specified).
47+ - `--section-divs` causes div tags to be added around each section
48+ in an HTML document. (Issue #230, 239)
49+
50++ Default behavior of S5 writer in standalone mode has changed:
51+ previously, it would include all needed scripts and stylesheets
52+ in the generated HTML; now, only links are included unless
53+ the `--offline` option is used.
54+
55++ Default behavior of HTML writer has changed. Between 1.2 and 1.5,
56+ pandoc would enclose sections in div tags with identifiers on the
57+ div tags, so that the sections can be manipulated in javascript.
58+ This caused undesirable interactions with raw HTML div tags. So,
59+ starting with 1.6, the default is to put the identifiers directly
60+ on the header tags, and not to include the divs. The `--section-divs`
61+ option selects the 1.2-1.5 behavior.
62+
63++ API changes:
64+
65+ - `HTMLMathMethod`: Added `WebTeX`, removed `MimeTeX`.
66+ - `WriterOptions`: Added `writerUserDataDir`, `writerSourceDirectory`,
67+ `writerEPUBMetadata` fields. Removed `writerIncludeBefore`,
68+ `writerIncludeAfter`.
69+ - Added `headerShift` to `Text.Pandoc.Shared`.
70+ - Moved parsing code and `ParserState` from `Text.Pandoc.Shared`
71+ to a new module, `Text.Pandoc.Parsing`.
72+ - Added `stateHasChapters` to `ParserState`.
73+ - Added `HTMLSlideVariant`.
74+ - Made `KeyTable` a map instead of an association list.
75+ - Added accessors for `Meta` fields (`docTitle`, `docAuthors`, `docDate`).
76+ - `Pandoc`, `Meta`, `Inline`, and `Block` have been given `Ord` instances.
77+ - Reference keys now have a type of their own (`Key`), with its
78+ own `Ord` instance for case-insensitive comparison.
79+ - Added `Text.Pandoc.Writers.EPUB`.
80+ - Added `Text.Pandoc.UUID`.
81+ - Removed `Text.Pandoc.ODT`, added `Text.Pandoc.Writers.ODT`.
82+ Removed `saveOpenDocumentAsODT`, added `writeODT`.
83+ - Added `Text.Pandoc.Writers.Native` and `writeNative`.
84+ Removed `prettyPandoc`.
85+ - Added `Text.Pandoc.UTF8` for portable UTF8 string IO.
86+ - Removed `Text.Pandoc.Writers.S5` and the `writeS5` function.
87+ Moved `s5Includes` to a new module, `Text.Pandoc.S5`.
88+ To write S5, you now use `writeHtml` with `writerSlideVariant`
89+ set to `S5Slides` or `SlidySlides`.
90+
91++ Template changes. If you use custom templates, please update them,
92+ particularly if you use syntax highlighting with pandoc. The old HTML
93+ templates hardcoded highlighting CSS that will no longer work with
94+ the most recent version of highlighting-kate.
95+
96+ - HTML template: avoid empty meta tag if no date.
97+ - HTML template: Use default highlighting CSS from highlighting-kate
98+ instead of hard-coding the CSS into the template.
99+ - HTML template: insert-before text goes before the title, and
100+ immediately after the <body> tag, as documented. (Issue #241)
101+ - Added slidy and s5 templates.
102+ - Added amssymb to preamble of latex template. (github Issue 1)
103+
104++ Removed excess newlines at the end of output. Note: because output
105+ will not contain an extra newline, you may need to make adjustments
106+ if you are inserting pandoc's output into a template.
107+
108++ In S5 and slidy, horizontal rules now cause a new slide, so you
109+ are no longer limited to one slide per section.
110+
111++ Improved handling of code in man writer. Inline code is now monospace,
112+ not bold, and code blocks now use .nf (no fill) and .IP (indented para).
113+
114++ HTML reader parses `<tt>` as Code. (Issue #247)
115+
116++ html+lhs output now contains bird tracks, even when compiled without
117+ highlighting support. (Issue #242)
118+
119++ Colons are now no longer allowed in autogenerated XML/HTML identifiers,
120+ since they have a special meaning in XML.
121+
122++ Code improvements in ODT writer. Remote images are now replaced with
123+ their alt text rather than a broken link.
124+
125++ LaTeX reader improvements:
126+ - Made latex `\section`, `\chapter` parsers more forgiving of whitespace.
127+ - Parse `\chapter{}` in latex.
128+ - Changed `rawLaTeXInline` to accept `\section`, `\begin`, etc.
129+ - Use new `rawLaTeXInline'` in LaTeX reader, and export `rawLaTeXInline`
232130 for use in markdown reader.
233− + Fixes bug wherein '\section{foo}' was not recognized as raw TeX
131+ - Fixes bug wherein `\section{foo}` was not recognized as raw TeX
234132 in markdown document.
235133
236− * LaTeX writer: Give images a maximum width using the prelude only.
134++ LaTeX writer: images are automatically shrunk if they would extend
135+ beyond the page margin.
237136
238− * Plain, markdown, RST writers: Use unicode for smart punctuation.
137++ Plain, markdown, RST writers now use unicode for smart punctuation.
239138
240− * Man writer: convert math to unicode when possible, as in other
241− writers.
139++ Man writer converts math to unicode when possible, as in other writers.
242140
243− * Allow markdown2pdf to recognize citeproc options.
141++ `markdown2pdf` can now recognize citeproc options.
244142
245− * Convert command-line arguments to UTF8.
143++ Command-line arguments are converted to UTF-8. (Issue #234)
246144
247− * Use texmath's parser in TexMath module. This replaces a lot of
248− custom parser code, and expands the tex -> unicode conversion. The
249− behavior has also changed: if the whole formula can't be converted,
250− the whole formula is left in raw TeX. Previously, pandoc converted
251− parts of the formula to unicode and left other parts in raw TeX.
145++ `Text.Pandoc.TeXMath` has been rewritten to use texmath's parser.
146+ This allows it to handle a wider range of formulas. Also, if a formula
147+ cannot be converted, it is left in raw TeX; formulas are no longer
148+ partially converted.
252149
253− * In parsing smart quotes, leave unicode curly quotes alone.
150++ Unicode curly quotes are left alone when parsing smart quotes. (Issue #143)
254151
255− * Removed obsolete markdown2pdf script.
152++ Cabal file changes:
256153
257− * Removed parsec < 3 restriction.
154+ - Removed parsec < 3 restriction.
155+ - Added 'threaded' flag for architectures where GHC lacks a threaded
156+ runtime.
157+ - Use 'threaded' only for markdown2pdf; it is not needed for pandoc.
158+ - Require highlighting-kate 0.2.7.
258159
259− * ODT: Handle the case where the image is remote (or not found) by
260− converting the Image element into an Emph with the label.
160++ Use explicit imports from `Data.Generics`. Otherwise we have a
161+ conflict with the 'empty' symbol, introduced in syb >= 0.2. (Issue #237)
261162
262− * Added 'threaded' cabal flag.
263− + GHC lacks a threaded runtime on some architectures.
264− Provide a 'threaded' flag that can be disabled for compiling
265− on these architectures.
266− + Removed '-threaded' from pandoc's ghc-options. '-threaded'
267− is only needed for markdown2pdf, due to its use of readProcess.
163++ New data files: slidy/slidy.min.js, slidy/slidy.min.css, epub.css.
268164
269− * Modified readFile and getContents to strip BOM if present.
270−
271− * Updated pandoc to use highlighting-kate 0.2.7.
165+[EPUB]: http://en.wikipedia.org/wiki/EPUB
166+[Slidy]: http://www.w3.org/Talks/Tools/Slidy
167+[bookworm]: http://bookworm.oreilly.com/
168+[tutorial here]: http://johnmacfarlane.net/pandoc/epub.html
272169