aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-10-13Moved bibliography processing into readers.John MacFarlane4-33/+43
Previously this was done in src/pandoc.hs, which made it difficult for library users. * Removed readerCitations in ReaderOptions. * Added readerReferences and readerCitationStyle to ReaderOptions. * Moved use of processBiblio from main program to the markdown and LaTeX readers.
2012-10-13Biblio: Make processBiblio take a Maybe Style parameter.John MacFarlane1-3/+4
If Nothing, then nothing is done.
2012-10-13Textile reader: Fixed bug with list items containing line breaks.John MacFarlane1-9/+15
Now pandoc correctly handles hard line breaks inside list items. Previously they broke list parsing. Thanks to Pablo Rodríguez for pointing out the problem.
2012-10-11LaTeX reader: Made rawLaTeXInline more flexible.John MacFarlane1-4/+2
Now it will also try to parse block commands. This is usually what we want, given how rawLaTeXInline is used in the markdown and textile readers. If a block-level LaTeX command is used in the middle of a paragraph (e.g. `\subtitle` inside a title), we can treat it as raw inline LaTeX.
2012-10-11LaTeX reader: Make `\noindent` inline rather than block.John MacFarlane1-2/+1
2012-10-11Added MIME types for .wof and .eot.John MacFarlane1-0/+2
Closes #640. i#
2012-10-11EPUB writer improvements.John MacFarlane1-27/+54
* We now convert to XHTML before cutting into chapter-sized chunks. This fixes a number of problems. * `--number-sections` now works properly. * A proper three-level table of contents is now used in `toc.ncx`. There is no longer a subsidiary table of contents at the beginning of each chapter. * New epub-page template without the `$title$` variable. Titles are left in the chapter bodies as an initial h1. * Closes #539.
2012-10-10LaTeX reader: Better support for citation commands.John MacFarlane1-7/+11
* Make `\cite` etc. an AuthorInText. * Make `\footcite` etc. into citations in notes.
2012-10-06RST reader: Don't create empty definition list for metadata field lists.John MacFarlane1-3/+3
Previously a field list consisting only of metadata fields (author, title, date) would be parsed as an empty DefinitionList, which is not legal in LaTeX and not needed in any format. This patch fixes the problem, which I learned of from http://stackoverflow.com/questions/12762767/modify-variable-in-rst-with-pandoc.
2012-10-06Biblio: Changed type of processBiblio.John MacFarlane2-26/+24
* It is no longer in the IO monad. * setHash uses state rather than Data.Unique. * It takes a Style argument rather than parameters for CSL and abbrev filenames. * pandoc.hs now calls the functions to parse the style file and add abbrevs.
2012-10-05Revert "Added stateWarnings to ParserState, added warning function."John MacFarlane1-8/+0
This reverts commit 5419b504cef0cc6e1a0f3e321b2fc0a66e12db3c.
2012-10-05Added stateWarnings to ParserState, added warning function.John MacFarlane1-0/+8
This will be used to provide warnings for things like duplicate footnote refs and link refs.
2012-10-05Textile reader: Implemented comment blocks.John MacFarlane1-0/+7
2012-10-04Remove newline after <br/> in translation of LineBreakBrent Yorgey1-1/+1
There's no particular need for a newline (other than making the generated MediaWiki source look nice to a human), and in fact sometimes it is incorrect: in particular, inside an enumeration, list items cannot have embedded newline characters.
2012-10-02Docx writer: Added nsid to abstractNum elements.John MacFarlane1-11/+16
This helps when merging word documents with numbered or bulleted lists. Closes #627.
2012-10-02Use integer ids for bookmarks.John MacFarlane1-6/+8
Closes #626.
2012-09-30RST reader: Removed 'plain' in blocks, since 'para' includes it.John MacFarlane1-1/+0
2012-09-30RST reader: Consolidate super/subscript, math into interpretedRole.John MacFarlane1-35/+26
2012-09-30RST reader: Renamed 'image' to 'subst', since it now handles more.John MacFarlane1-4/+3
2012-09-30Ignore unknown interpreted roles.John MacFarlane1-3/+12
The contents are treated as rst, not literal, which will sometimes be wrong.
2012-09-30RST reader: Removed requirement that directives begin at left margin.John MacFarlane1-3/+0
This was (correctly) not in earlier releases; docutils doesn't make the requirement.
2012-09-30RST reader: Require whitespace after field list field names.John MacFarlane1-1/+1
2012-09-30RST reader: Consolidated rawBlock into directive.John MacFarlane1-15/+1
2012-09-30RST reader: Handle replace:: and unicode:: substitutions.John MacFarlane1-8/+77
2012-09-29RST reader: Make directive labels case-insensitive.John MacFarlane1-1/+3
2012-09-29RST reader: Folded figureBlock into directive.John MacFarlane1-14/+10
2012-09-29RST reader: Made comments a separate parser.John MacFarlane1-6/+17
2012-09-29RST reader: Folded image block handling into directive.John MacFarlane1-41/+36
2012-09-29RST reader: Folded code block parsers into directive.John MacFarlane1-18/+15
2012-09-29RST reader: Folded default-role parser into directive.John MacFarlane1-21/+8
2012-09-29Renamed removedLeadingTrailingSpace to trim.John MacFarlane8-41/+36
Also removeLeadingSpace to triml, removeTrailingSpace to trimr.
2012-09-29RST reader: Consolidated math block parsers into directive.John MacFarlane1-29/+9
2012-09-29RST reader: Refactored directive parser.John MacFarlane1-83/+105
We now also hander container, compound, epigraph, rubric, highligts, pull-quote.
2012-09-29Adjusted pandoc.hs for changes in Biblio module.John MacFarlane1-17/+17
2012-09-29Biblio: csl parameter now a string rather than a filepath.John MacFarlane1-3/+3
API change.
2012-09-29Markdown reader: Worked around some sepBy's.John MacFarlane1-8/+11
2012-09-29UTF8: Removed unneeded imports.John MacFarlane1-5/+0
2012-09-28Textile reader: Avoid parsing dashes as strikeout.John MacFarlane1-1/+1
Previously the input text-- text-- text-- text-- would be parsed with strikeouts rather than dashes. This fixes the problem by requiring that a strikeout delimiting - not be followed by a -. Closes #631.
2012-09-28Textile reader: Fixed bug affected words ending in hyphen.John MacFarlane1-2/+5
Note: sepBy1 doesn't work quite as I expected. It gives odd results if sep succeeds but not p.
2012-09-28Textile: Improvements to surround and symbol.John MacFarlane1-2/+2
2012-09-28RST reader: Support ".. code::".John MacFarlane1-1/+5
2012-09-28RST reader: Combine para/plain.John MacFarlane1-9/+10
2012-09-28HTML writer: Use toHtml instead of pre-escaping.John MacFarlane1-4/+7
We work around the problem that blaze-html unnecessarily escapes `'` by pre-escaping just the `'` characters, instead of the whole string. If blaze-html later stops escaping `'` characters, we can simplify strToHtml to toHtml. Note that this change yields a significant speed boost (111ms to 94ms on one benchmark). Closes #629.
2012-09-28RST reader: Made para parser slightly more efficient.John MacFarlane1-12/+19
2012-09-27RST reader: Use Text.Pandoc.Builder.John MacFarlane1-174/+180
This will give us more flexibility in the future. It also gives built-in normalization. Performance slightly better.
2012-09-27Shared: Export compactify', formerly in Markdown reader.John MacFarlane2-21/+25
2012-09-27Parsing: Changed type of stateSubstitutions to use Inlines.John MacFarlane1-2/+2
2012-09-27Removed nullBlock.John MacFarlane2-7/+1
Don't use nullBlock in Textile reader. Better to know about parsing problems than to skip stuff when we get stuck.
2012-09-27RST reader: Support :target: on image substitutions.John MacFarlane1-26/+26
2012-09-27Added stateSubstitutions to ParserState, use for RST substitutions.John MacFarlane2-12/+23