aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)Author
2013-03-17Markdown writer: New approach for citations.John MacFarlane
* Reverts 1.11 change that caused citations to be rendered as markdown citations, even if `--biblio` was specified, unless `citation` extension is disabled. Now, formatted citations are always printed if `--biblio` was specified. If you want to reformat markdown keeping pandoc markdown citations intact, just don't specify `--biblio`. * Reverted now unnecessary changes to Text.Pandoc.Biblio adding the raw block to mark the bibliography, and to Text.Pandoc.Writers.Markdown to remove the bibliography if `citations` not specified. * If the content of a `Cite` inline is a `RawInline "latex"`, which means that a LaTeX citation command was parsed and `--biblio` wasn't specified, then render it as a pandoc markdown citation. This means that `pandoc -f latex -t markdown`, without `--biblio`, will convert LaTeX citation commands to pandoc markdown citations.
2013-03-17Markdown writer: Omit bibliography when `citations` enabled.John MacFarlane
In 1.11, citations would be rendered as pandoc markdown citations, but the bibliography would still be printed. We avoid that by adding a `RawBlock "pandoc" "references"` before the references. This allows the markdown writer to find the references and strip them off when `citations` is enabled.
2013-03-17Revert "LaTeX reader: citation handling changes."John MacFarlane
This reverts commit f7229b147314042f946dfded3b441ab0fae260a0.
2013-03-16Fixed numbering mismatch between TOC and sections in HTML.John MacFarlane
Also made `--number-offset` affect TOC numbering as well as section numbering, as it should have all along. Closes #789.
2013-03-15Fixed regression in ODT writer.John MacFarlane
This was due to a change in the Show instance for Text.Pandoc.Pretty.Doc, which led 1.11 to produce corrupt ODTs. Closes #780.
2013-03-13Markdown reader: don't lose parentheses in URLs.John MacFarlane
Added tests. This fixes a regression from 1.10.x. Closes #786.
2013-03-12Markdown reader: Handle unmatched double quotes in dialogues.John MacFarlane
They do not generate a Quoted element; instead, the double quote is just turned into a Str with a curly left quote. This should satisfy the fiction writers. Closes #99 (again).
2013-03-11Fixed spacing bugs involving code block attributes.John MacFarlane
Closes #763.
2013-03-09LaTeX reader: citation handling changes.John MacFarlane
Previously, a LaTeX citation would always be parsed as a Citation element, with the raw LaTeX in the [Inline] part. Now, the LaTeX citation is parsed as a Citation element only if `--biblio` was specified (i.e. only if there is a nonempty set of references in readerReferences). Otherwise it is parsed as raw LaTeX. This will make it possible to simplify some things in the markdown writer. It also makes the LaTeX reader behave more like the Markdown reader.
2013-03-07Markdown writer: Render citations as pandoc-markdown citations.John MacFarlane
Previously citations were rendered as citeproc-formatted citations by default. Now we render them as pandoc citations, e.g. `[@item1]`, unless the `citations` extension is disabled. If you still want formatted citations in your markdown output, use `pandoc -t markdown-citations`.
2013-03-06Support :number-lines: in RST code output.John MacFarlane
2013-03-06LaTeX reader: Better support for Verbatim and minted environments.John MacFarlane
Closes #763.
2013-03-05LaTeX reader: Handle language attribute for lstlistings.John MacFarlane
Convert it to a highlighting-kate language name.
2013-03-05Hide Text.Pandoc.Highlighting.John MacFarlane
* Moved code for translating listings language names to highlighting-kate names and back from LaTeX reader to Highlighting. * Text.Pandoc.Highlighting no longer exposed (API change) * Text.Pandoc.Highlighting exports toListingsLang, fromListingsLang
2013-03-04LaTeX reader: Read optional attributes in lstlisting environment.John MacFarlane
We convert these to pandoc standard names, e.g. "numberLines" for "numbers=left", "startFrom=100" from "firstnumber=100". Still need to add code to convert the language names.
2013-03-04LaTeX writer: Support line numbering with `--listings`.John MacFarlane
If "numberLines" class is present, we add "numbers=left"; if "startFrom" is present, we add "firstnumber=". Partially addresses #763.
2013-03-03EPUB writer: Include html TOC even in epub2.John MacFarlane
* The TOC is included in `<spine>`, but `linear` is set to `no` unless the `--toc` option is specified. * Include `<guide>` element in OPF. * This should allow the TOC to be useable in Kindles when converted with kindlegen. * Results validate with epubcheck 3.0 for both epub and epub3 output. * Closes #773.
2013-03-02Markdown reader: attribute parsing improvements.John MacFarlane
* Cleaned up parsing code. * '-' in an attribute context = '.unnumbered'. The point of this is to provide a way to specify unnumbered headers in non-English documents.
2013-03-02Check for tables before line blocks.John MacFarlane
Otherwise some pipe tables get treated as line blocks.
2013-03-02Markdown reader: Allow spaces around borders in pipe tables.John MacFarlane
Closes #772.
2013-03-01LaTeX reader: Add "fig:" as title for images with captions.John MacFarlane
This is needed for them to be rendered as figures. Closes #766.
2013-03-01Textile writer: Removed an unused assignment.John MacFarlane
2013-02-28Markdown: allow ---- in angle-bracket autolinks.John MacFarlane
The uri parser is designed for bare URIs. In angle-bracket contexts, we can be sure that we don't have trailing punctuation. So `<http://openclipart.org/detail/22566/lego-smiley----happy-by-pitr>` should work now. Closes #768.
2013-02-28Markdown writer: Use grid tables when needed, and if enabled.John MacFarlane
Closes #740.
2013-02-28Pretty: Fixed chomp so it works inside Prefixed elements.John MacFarlane
2013-02-28Pretty: Better Show instance for debugging purposes.John MacFarlane
2013-02-28Textile writer: Support header attributes.John MacFarlane
2013-02-26Docx writer: Better treatment of display math.John MacFarlane
Display math inside a paragraph is now put in a separate paragraph, so it will render properly (centered and without extra blank lines around it). Partially addresses #742.
2013-02-26LaTeX reader: Handle \caption for images in figures.John MacFarlane
Closes #766.
2013-02-26Changed style names in reference docx.John MacFarlane
FootnoteReference -> FootnoteRef. Hyperlink -> Link. Why? Because the old names got changed by Word when the reference.docx was edited. I don't understand why, but this fixes things. Closes #414.
2013-02-26Docx writer: Create content types and document rels from scratch.John MacFarlane
This fixes problems that arise when you edit the reference.docx with Word. Word tends to remove things from the `[Content_Types].xml` and `word/_rels/document.xml.rels` files that are needed (e.g. references to the `footnotes.xml` file and image default mime types). So we regenerate these completely rather than taking them from the `reference.docx`. We also now encode mime types for each individual image rather than using defaults. This should allow us to handle a wider range of image types. This mostly addresses #414. The only remaining issue I can see is the issue of style IDs, which Word inexplicably changes in some cases when the reference.docx is saved. E.g. `FootnoteReference` becomes `FootnoteReference1`.
2013-02-25Refactoring in Docx writer.John MacFarlane
2013-02-23Docx writer: Handle PDF images.John MacFarlane
2013-02-23ImageSize: Added Pdf to ImageType.John MacFarlane
So far we have no function to determine PDF's size.
2013-02-23EPUB writer: Improved behavior with `--number-sections`.John MacFarlane
* Headers with "unnumbered" attribute are not numbered. (Nor do they cause an increment in running numbering.) * Section numbers now work properly, even when there is material before the first numbered section.
2013-02-23EPUB writer: more transition.John MacFarlane
Changed toChunks to toChapters.
2013-02-23EPUB writer: Temporary step towards a better system for numbering.John MacFarlane
With this change, `--number-sections` won't work. This will be fixed later.
2013-02-23HTML writer: fix case when writerNumberOffet is empty or short.John MacFarlane
We add 0s to the end of the list if it's shorter than needed.
2013-02-23`--number-from` -> `--number-offset`John MacFarlane
Also `writerNumberFrom` -> `writeNumberOffset`. The offset is a list of numbers (0 by default). These are added to the section, subsection, etc. numbers that would have been generated automatically.
2013-02-22EPUB writer: Minor section numbering tweaks.John MacFarlane
* If we need to add an initial section, make it unnumbered. * Don't add extra space before unnumbered section titles in TOC.
2013-02-22EPUB writer: Use writerNumberFrom instead of ugly hack.John MacFarlane
2013-02-22Made HTML writer sensitive to `writerNumberFrom`.John MacFarlane
2013-02-21Added `--number-from` option and `writerNumberFrom`.John MacFarlane
These still aren't hooked up to anything in the writers.
2013-02-21Make `implicit_header_references` work with explicit header ids.John MacFarlane
(Markdown reader.)
2013-02-20LaTeX reader: Don't emit empty paragraph.John MacFarlane
See #761.
2013-02-20LaTeX reader: Parse `\section*`, etc. as unnumbered sections.John MacFarlane
2013-02-18ConTeXt writer: now sensitive to 'unnumbered' class in headers.John MacFarlane
In this case \title, \subject are used instead of \chapter, \section.
2013-02-16Textile reader: Handle attributes on headers.John MacFarlane
Includes `[lang]`, `(class #id)`, `{color:red}` styles.
2013-02-16LaTeX writer: Omit lists with no items.John MacFarlane
Otherwise we get LaTeX errors.
2013-02-16EPUB writer: Fix section numbering.John MacFarlane
Previously the numbering restarted from 1 in each chapter (with `--number-sections`), though the numbers in the table of contents were correct. Note that this fix is a bit hackish and possibly fragile: if the rendering of section numbers in HTML changes in the future, it may break. But it works, without needing changes in other modules.