aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/JATS.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-05-16JATS writer: properly handle footnotes.John MacFarlane1-7/+24
"Best Practice: When footnotes are grouped at the end of an article, wrap them in a `<fn-group>` and use an `<xref>` element in the text, as usual, to tie each footnote in the list to a particular location in the text." Closes #5511.
2019-05-04JATS writer: fix citations with PMID so they validate.John MacFarlane1-6/+10
Closes #5481. This includes an update to data/jats.csl.
2019-03-26JATS writer: Ensure that plain strings go inside `<pub-id>` tag.John MacFarlane1-1/+9
See #5397.
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-15Revert "JATS writer: Support citations."John MacFarlane1-4/+3
This reverts commit 39889c22df578a4310bcf549fcd507c08fbf1416.
2019-02-15JATS writer: Support citations.John MacFarlane1-3/+4
2019-02-10JATS writer: wrap figure caption in <p> to fix validation (#5292)Mauro Bieg1-1/+1
closes #5290
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-2/+2
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
2018-09-30Implement `--ascii` (`writerPreferAscii`) in writers, not App.John MacFarlane1-1/+2
Now the `write*` functions for Docbook, HTML, ICML, JATS, Man, Ms, OPML are sensitive to `writerPreferAscii`. Previously the to-ascii translation was done in Text.Pandoc.App, and thus not available to those using the writer functions directly. In addition, the LaTeX writer is now sensitive to `writerPreferAscii` and to `--ascii`. 100% ASCII output can't be guaranteed, but the writer will use commands like `\"{a}` and `\l` whenever possible, to avoid emiting a non-ASCII character. A new unexported module, Text.Pandoc.Groff, has been added to store functions used in the different groff-based writers.
2018-09-27JATS writer: remove 'role' attribute on 'bold' and 'sc' elements.John MacFarlane1-3/+2
The JATS spec does not allow these. Closes #4937.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-03-05Remove extraneous, significant whitespace in JATS writer output (#4335)Nokome Bentley1-6/+6
This patch fixes some cases where the JATS writer was introducing semantically significant whitespace by indenting and wrapping tags. Note that the JATS spec has a content model for `<p>` tags of `(#PCDATA | ...`. Any tag where `#PCDATA` children are possible should not have any indentation. The same is true for `<th>`, `<td>`, `<term>`, `<label>`.
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-12-21Merge pull request #4177 from stencila/jats-xml-readerJohn MacFarlane1-18/+29
Add Basic JATS reader based on DocBook reader
2017-12-21JATS writer: Make <p> optional in <td> and <th> (#4178)Hamish Mackenzie1-0/+3
If the contents are single `Plain` block then do not wrap them with a <p> element.
2017-12-21jats writer: Self closing tags for empty xref (#4187)Hamish Mackenzie1-2/+5
2017-12-22Improve support for code language in JATSHamish Mackenzie1-18/+29
2017-12-14Deduplicate JATS writer image mime type codeHamish Mackenzie1-15/+14
2017-12-13fig, table-wrap & caption Divs for JATS writerHamish Mackenzie1-6/+30
Support writing <fig> and <table-wrap> elements with <title> and <caption> inside them by using Divs with class set to on of fig, table-wrap or cation. The title is included as a Heading so the constraint on where Heading can occur is also relaxed. Also leaves out empty alt attributes on links.
2017-10-31Properly pass through author metadata in JATS writer.John MacFarlane1-41/+14
Closes #4020.
2017-10-29Source code reformatting.John MacFarlane1-3/+3
2017-10-29hlint suggestions.John MacFarlane1-19/+18
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane1-3/+3
2017-06-20Writers: adjusted for renderTemplate' changes.John MacFarlane1-3/+3
Now we raise a proper error on template failure.
2017-06-20Docbook, JATS, TEI writers: print INFO message when omitting interior header.John MacFarlane1-2/+4
This only applies to section headers inside list items, e.g., which were otherwise silently omitted. See #3750.
2017-06-11Switched Writer types to use Text.John MacFarlane1-5/+7
* XML.toEntities: changed type to Text -> Text. * Shared.tabFilter -- fixed so it strips out CRs as before. * Modified writers to take Text. * Updated tests, benchmarks, trypandoc. [API change] Closes #3731.
2017-05-13Update dates in copyright noticesAlbert Krewinkel1-1/+1
This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-03-31JATS writer: put references in `<back>`.John MacFarlane1-3/+10
Modified template to include a `<back>` and `<body>` section. This should give authors more flexibility, e.g. to put acknowledgements metadata in `<back>`. References are automatically extracted and put into `<back>`.
2017-03-30JATS writer: use both tex and mml alternatives for math when possible.John MacFarlane1-5/+7
2017-03-30JATS writer: Fixed bibliography handling.John MacFarlane1-5/+6
2017-03-30Added JATS writer.John MacFarlane1-0/+429
* New module Text.Pandoc.Writer.JATS exporting writeJATS. * New output format `jats`. * Added tests. * Revised manual.