summaryrefslogtreecommitdiff
path: root/src/Text
Commit message (Collapse)AuthorAge
...
* Docx writer: Combine reference.docx numbering with pandoc's.John MacFarlane2014-06-03
| | | | | | | This should have fixed #1305, allowing the reference.docx to define section numbering, but it doesn't. Now the headings appear with proper indentation, but the numbers don't appear. Unclear why. styles.xml and numbering.xml basically match the docx which has the expected result.
* Docx writer: pandoc uses only numIds >= 1000 for lists.John MacFarlane2014-06-03
| | | | | | This opens up the possiblity (with further code changes) of preserving some numbering from the reference.docx (e.g. header numbering.) See #1305.
* Docx writer: Changed abstractNumId numbering scheme.John MacFarlane2014-06-03
| | | | | | | Now the minimum id used by pandoc is 990. All ids start with "99". This gives some room for a reference.docx to define numbering styles. Note: this is not yet possible, since pandoc generates numbering.xml entirely on its own.
* Docx writer: Simplified abstractNumId numbering.John MacFarlane2014-06-03
| | | | | | Instead of sequential numbering, we assign numbers based on the list marker styles. This simplifies some of the code and should make it easier to modify numbering in the future.
* Templates: use ordNum instead of ord.John MacFarlane2014-06-03
| | | | Closes #1022.
* Shared: Added ordNub.John MacFarlane2014-06-03
| | | | API change (adds export).
* Docx writer: Create overrides per-image for media/ in ref docx.John MacFarlane2014-06-02
| | | | | This should be somewhat more robust and cover more types of images.
* Docx writer: Improved entryFromArchive to avoid parse.John MacFarlane2014-06-02
| | | | | No need to parse the XML if we're just going to render it right away!
* Docx writer: Make images work in reference.docx headers/footers.John MacFarlane2014-06-02
| | | | | | | * All media from reference.docx are copied into result. * Added defaults for common image types to [Content Types]. * Avoided redundant XML parse + write for entries taken over from reference.docx, for better performance.
* Templates: Fail informatively on template syntax errors.John MacFarlane2014-06-01
| | | | | | | With the move from parsec to attoparsec, we lost good error reporting. In fact, since we weren't testing for end of input, malformed templates would fail silently. Here we revert back to Parsec for better error messages.
* Docx writer: Improved handling of headers/footers.John MacFarlane2014-06-01
|
* Docx writer: Header and footer are now carried over from reference.docx.John MacFarlane2014-06-01
|
* Minor code reformat.John MacFarlane2014-06-01
|
* Docx writer: Take over document formatting from reference.docx.John MacFarlane2014-05-31
| | | | This includes margins, page size, page orientation.
* PDF writer: Fixed treatment of data uris for images.John MacFarlane2014-05-28
| | | | Closes #1062.
* Merge pull request #1302 from tarleb/inline-latexJohn MacFarlane2014-05-28
|\ | | | | Org reader: support for inline LaTeX
| * Org reader: support for inline LaTeXAlbert Krewinkel2014-05-20
| | | | | | | | | | | | Inline LaTeX is now accepted and parsed by the org-mode reader. Both, math symbols (like \tau) and LaTeX commands (like \cite{Coffee}), can be used without any further escaping.
* | Markdown reader: Handle `c++` and `objective-c` as language identifiersJohn MacFarlane2014-05-27
| | | | | | | | | | | | | | in github-style fenced blocks. Closes #1318. Note: This is special-case handling of these two cases. It would be good to do something more systematic.
* | Markdown reader: inline math must have nonspace before final `$`.John MacFarlane2014-05-27
| | | | | | | | Closes #1313.
* | EPUB writer: Handle multiple dates with OPF `event` attributes.John MacFarlane2014-05-19
| | | | | | | | | | Note: in EPUB3 we can have only one dc:date, so only the first one is used.
* | Avoid `import Prelude hiding (catch)`.John MacFarlane2014-05-19
| | | | | | | | See #1309.
* | Removed dependency on conduit.John MacFarlane2014-05-18
|/ | | | | * http-conduit flag is now https. * Instead of http-conduit, we depend on http-client and http-client-tls.
* EPUB writer: Fixed regression on cover image.John MacFarlane2014-05-15
| | | | | | | | | | In 1.12.4 and 1.12.4.2, the cover image would not appear properly, because the metadata id was not correct. This was introduced by the fix to #1254. Now we derive the id from the actual cover image filename, which we preserve rather than using "cover-image."
* Merge pull request #1293 from tarleb/typoJohn MacFarlane2014-05-14
|\ | | | | Process: Fix minor typo in pipeProcess' docs
| * Process: Fix minor typo in pipeProcess' docsAlbert Krewinkel2014-05-11
| | | | | | | | Replace fullstop with comma, adjust capitalisation.
* | Merge pull request #1297 from tarleb/citationsJohn MacFarlane2014-05-14
|\ \ | | | | | | Org reader: support Pandocs citation extension
| * | Org reader: support Pandocs citation extensionAlbert Krewinkel2014-05-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Citations are defined via the "normal citation" syntax used in markdown, with the sole difference that newlines are not allowed between "[...]". This is for consistency, as org-mode generally disallows newlines between square brackets. The extension is turned on by default and can be turned off via the default syntax-extension mechanism, i.e. by specifying "org-citation" as the input format. Move `citeKey` from Readers.Markdown into Parsing The function can be used by other readers, so it is made accessible for all parsers.
| * | Move `citeKey` from Readers.Markdown to ParsingAlbert Krewinkel2014-05-14
| | | | | | | | | | | | | | | The function can be used by other readers, so it is made accessible for all parsers.
| * | Introduce class HasLastStrPosition, generalize functionsAlbert Krewinkel2014-05-14
| | | | | | | | | | | | | | | | | | | | | | | | Both `ParserState` and `OrgParserState` keep track of the parser position at which the last string ended. This patch introduces a new class `HasLastStrPosition` and makes the above types instances of that class. This enables the generalization of functions updating the state or checking if one is right after a string.
* | | LaTeX reader: Support `\addbibresource`.John MacFarlane2014-05-12
| | |
* | | Shared addMetaField: if old and new values both lists, concatenate.John MacFarlane2014-05-12
|/ /
* / LaTeX reader: set `bibliography` in metadata from `\bibliography` cmd.John MacFarlane2014-05-11
|/
* LaTeX reader: Don't error on "%foo" with no newline.John MacFarlane2014-05-10
|
* Org reader: Fix block parameter reader, relax constraintsAlbert Krewinkel2014-05-10
| | | | | | | | | The reader produced wrong results for block containing non-letter chars in their parameter arguments. This patch relaxes constraints in that it allows block header arguments to contain any non-space character (except for ']' for inline blocks). Thanks to Xiao Hanyu for noticing this.
* Merge pull request #1288 from tarleb/update-copyrightJohn MacFarlane2014-05-09
|\ | | | | Update copyright notices for 2014, add missing notices
| * Update copyright notices for 2014, add missing noticesAlbert Krewinkel2014-05-09
| |
* | Org reader: Fix parsing of blank lines within blocksAlbert Krewinkel2014-05-09
| | | | | | | | | | Blank lines were parsed as two newlines instead of just one. Thanks to Xiao Hanyu (@xiaohanyu) for pointing this out.
* | Org reader: Support arguments for code blocksAlbert Krewinkel2014-05-09
| | | | | | | | | | | | | | | | | | | | The general form of source block headers (`#+BEGIN_SRC <language> <switches> <header arguments>`) was not recognized by the reader. This patch adds support for the above form, adds header arguments to the block's key-value pairs and marks the block as a rundoc block if header arguments are present. This closes #1286.
* | Org reader: refactor #+BEGIN..#+END block parsing codeAlbert Krewinkel2014-05-09
|/
* Small improvement to textile reader fix. Removed 'try'.mpickering2014-05-07
|
* Fix textile reader hanging.mpickering2014-05-07
| | | | | | | | Textile reader hung on pandoc -f textile http://johnmacfarlane.net/pandoc/demo/example25.textile The reader no longer hangs.
* Textile reader: Rearranged inline parsers for performance.John MacFarlane2014-05-06
| | | | | This is possible because of the rewrite of simpleInline. Also removed a redundant parser for grouped inlines.
* Textile reader: Rewrote simpleInline for clarity and efficiency.John MacFarlane2014-05-06
| | | | This way we only look once for the opening `[`.
* Textile reader: Disallow blank lines in inline contexts.John MacFarlane2014-05-06
| | | | | | | | @hi there@ should not be a single code span.
* Make `--trace` work with textile reader.John MacFarlane2014-05-06
|
* Textile reader: Rewrote some inline parsing code for clarity.John MacFarlane2014-05-06
| | | | | | (It seems clearer to put the whitespace parsing in the grouped parser. This also uses stateLastStrPos to determine when the border is adjacent to an alphanumeric.)
* Org reader: Read inline code blocksAlbert Krewinkel2014-05-06
| | | | | | | | | | | Org's inline code blocks take forms like `src_haskell(print "hi")` and are frequently used to include results from computations called from within the document. The blocks are read as inline code and marked with the special class `rundoc-block`. Proper handling and execution of these blocks is the subject of a separate library, rundoc, which is work in progress. This closes #1278.
* Fixed the fix to #1154.John MacFarlane2014-05-04
| | | | We need to strip off up to 4 spaces, not up to 3.
* LaTeX writer: Fixed inconsistencies with reference escaping.John MacFarlane2014-05-04
| | | | | - toLabel is now monadic, and it does the needed string escaping. - Closes #1130.
* Docx writer: Fall back on distribution reference.docx.John MacFarlane2014-05-04
| | | | | | | | * Undid changes to parseXml in last commit. * Instead of a string fallback, we have parseXml fall back on the reference.docx that comes with pandoc if the user's reference.docx does not contain a needed file. * Closes #1185.