summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Markdown.hs
Commit message (Collapse)AuthorAge
...
* Created Text.Pandoc.Writers.Shared, improved metaToJSON.John MacFarlane2013-07-01
| | | | | | | * Text.Pandoc.Writers.Shared contains shared functions used only in writers. * metaToJSON now takes a WriterOptions parameter, and will return an empty object if standalone is not specified.
* Improvements to yaml title block writer.John MacFarlane2013-07-01
|
* Revert "Markdown writer: Don't include variables in metadata."John MacFarlane2013-07-01
| | | | This reverts commit 0ec8573347d53e0cba70552a50dba697f39216b6.
* Markdown writer: Don't include variables in metadata.John MacFarlane2013-07-01
|
* Markdown writer: Support yaml title block.John MacFarlane2013-06-30
|
* Metadata changes: Variables now completely shadow metadata.John MacFarlane2013-06-29
| | | | | | | | | Previously if you set a value both in metadata and with a variable, they'd be combined into a list. Now the variable replaces the value in document metadata. If many variables with the same name are set, a list is created. Shared: metaToJSON now has an argument for a variable list.
* Writers: Use defField for defaults.John MacFarlane2013-06-27
| | | | | | | This way explicitly specified fields not overridden. Fixes a problem e.g. with specifying a documentclass via the command line using -V.
* Use new flexible metadata type.John MacFarlane2013-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | * Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
* Markdown writer: Don't wrap attributes in fenced code blocks.John MacFarlane2013-06-11
|
* Markdown/RST writers: Only autolink absolute URIs.John MacFarlane2013-04-14
| | | | | | | This fixes a regression and closes #830. $ echo '<a href="x">x</a>' | pandoc -f html -t markdown <x>
* Markdown writer: Put multiple authors on separate lines in titleblock.John MacFarlane2013-04-08
| | | | | Also, don't wrap long author entries, as new lines get treated as new authors.
* Allow simple tables to be printed as grid tables.John MacFarlane2013-03-28
| | | | | | | | | | if other table options are disabled. This means you can do pandoc -t markdown-pipe_tables-simple_tables-multiline_tables and all tables will render as grid tables.
* Markdown writer: New approach for citations.John MacFarlane2013-03-17
| | | | | | | | | | | | | | | | | | | * 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.
* Markdown writer: Omit bibliography when `citations` enabled.John MacFarlane2013-03-17
| | | | | | | | | 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.
* Revert "LaTeX reader: citation handling changes."John MacFarlane2013-03-17
| | | | This reverts commit f7229b147314042f946dfded3b441ab0fae260a0.
* Fixed spacing bugs involving code block attributes.John MacFarlane2013-03-11
| | | | Closes #763.
* LaTeX reader: citation handling changes.John MacFarlane2013-03-09
| | | | | | | | | | | | | | 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.
* Markdown writer: Render citations as pandoc-markdown citations.John MacFarlane2013-03-07
| | | | | | | | | 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`.
* Markdown writer: Use grid tables when needed, and if enabled.John MacFarlane2013-02-28
| | | | Closes #740.
* Revert "Citation changes."John MacFarlane2013-02-06
| | | | This reverts commit d46f434d4b8906ae3b983e568549213de94fd1a2.
* Citation changes.John MacFarlane2013-02-03
| | | | | | | | | | * Citations will work in markdown even if `--biblio` isn't specified. Note: this may cause unexpected behavior for people who use strings of the form `@foo` that are not citations! * If `--biblio` isn't used, the markdown writer will write markdown citations rather than CSL-rendered citations. * This means, for example, that you can do `pandoc -f latex -t markdown` and convert biblatex or natbib citations into pandoc citations.
* Markdown writer: Set title, author, date variables as before.John MacFarlane2013-01-28
| | | | | These are no longer used in the default template, since we use titleblock, but we set them anyway for nondefault template users.
* Markdown writer: Use autolink when link text matches url.John MacFarlane2013-01-26
| | | | | | | | Previously we also checked for a null title, but this test fails for links produced by citeproc-hs in bibliographies. So, if the link has a title, it will be lost on conversion to an autolink, but that seems okay.
* Implemented Ext_mmd_header_identifiers in markdown writer.John MacFarlane2013-01-16
|
* Use 'fig:' instead of '\SOH' in title to indicate figure.John MacFarlane2013-01-15
| | | | Revises 1a4b47e93368bfbd31daccdfedbd9527ee740201
* Implemented Ext_implicit_figures.John MacFarlane2013-01-14
| | | | | | | | | | | | * In markdown reader, add a '\1' character to the beginning of the title of an image that is alone in its paragraph, if implicit_figures extension is selected. * In writers, check for Para [Image alt (src,'\1':tit)] and treat it as a figure if possible. * Updated tests. This is a bit of a hack, but it allows us to make implicit_figures an extension of the markdown reader, rather than the writers.
* Markdown writer: Support Ext_auto_identifiers and Ext_header_attributes.John MacFarlane2013-01-12
|
* Added Attr field to Header.John MacFarlane2013-01-09
| | | | | | | | | | Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
* Don't put the text of an autolink in Code font.John MacFarlane2013-01-06
|
* Implemented --toc-depth for markdown writer.John MacFarlane2013-01-05
|
* Make --id-prefix affect footnote IDs in markdown writer.John MacFarlane2012-09-25
| | | | Closes #614.
* Markdown writer: Made sensitive to Ext_hard_line_breaks.John MacFarlane2012-09-15
|
* Implemented Ext_backtick_code_blocks.John MacFarlane2012-08-21
| | | | This is the variant github prefers.
* Added Ext_fenced_code_attributes.John MacFarlane2012-08-21
|
* Changed nomenclature, delimited -> fenced code blocks.John MacFarlane2012-08-21
|
* Implemented Ext_mmd_title_block in markdown reader & writer.John MacFarlane2012-08-12
|
* Implemented tex_math extensions in markdown writer.John MacFarlane2012-08-11
|
* Implemented Ext_markdown_attribute in markdown writer.John MacFarlane2012-08-11
|
* Changes to literate haskell options.John MacFarlane2012-08-08
| | | | | | | | | | | - Removed writerLiterateHaskell from WriterOptions. - Removed readerLiterateHaskell from ReaderOptions. - Added Ext_literate_haskell to Extensions. Test for this instead of the above. - Removed failUnlessLHS from Shared. Note: At this point, +lhs and .lhs extension no longer has any effect. Need to fix.
* Markdown writer: Tables now sensitive to table extension options.John MacFarlane2012-08-05
| | | | | | | | | Ext_simple_table, Ext_multiline_tables, Ext_pipe_tables. Simple tables are preferred over pipe tables when both are enabled. If no appropriate table style is available, a raw HTML table is used. So far there is no option for output of grid tables.
* Started making markdown table writer sensitive to options.John MacFarlane2012-08-05
| | | | So far incomplete.
* Don't use escaped line breaks in plain output.John MacFarlane2012-08-02
|
* Made markdown writer sensitive to Ext_subscript/superscript/strikeout.John MacFarlane2012-08-02
| | | | HTML is used if these are disabled.
* Made markdown writer sensitive to Ext_definition_lists.John MacFarlane2012-08-02
| | | | | IF not set, definition lists will be rendered as regular paragraphs, with the term set off by a line break.
* Made markdown writer sensitive to Ext_startnum, Ext_fancy_lists.John MacFarlane2012-08-02
|
* Made markdown reader sensitive to Ext_raw_tex.John MacFarlane2012-08-02
|
* Made markdown writer sensitive to Ext_table_captions.John MacFarlane2012-08-02
|
* Made markdown writer sensitive to Ext_pandoc_title_blocks.John MacFarlane2012-08-02
|
* Made markdown writer sensitive to Ext_footnotes.John MacFarlane2012-08-02
| | | | | If footnotes not enabled, footnotes are formatted like normal markdown paragraphs, with a marker like [3].
* Replaced writerStrict with writerExtensions in WriterOptions.John MacFarlane2012-07-27
| | | | | Still have not implemented individual tests for all the extensions in the markdown writer.