aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Writers/JATS.hs
AgeCommit message (Collapse)AuthorFilesLines
2021-04-28JATS writer: use either styled-content or named-content for spans.Albert Krewinkel1-5/+9
If the element has a content-type attribute, or at least one class, then that value is used as `content-type` and the span is put inside a `<named-content>` element. Otherwise a `<styled-content>` element is used instead. Closes: #7211
2021-04-10JATS writer: convert spans to <named-content> elementsAlbert Krewinkel1-0/+15
Spans with attributes are converted to `<named-content>` elements instead of being wrapped with `<milestone-start/>` and `<milestone-end>` elements. Milestone elements are not allowed in documents using the articleauthoring tag set, so this change ensures the creation of valid documents. Closes: #7211
2021-04-05JATS writer: escape disallows chars in identifiersAlbert Krewinkel1-90/+115
XML identifiers must start with an underscore or letter, and can contain only a limited set of punctuation characters. Any IDs not adhering to these rules are rewritten by writing the offending characters as Uxxxx, where `xxxx` is the character's hex code.
2021-02-07Avoid unnecessary use of NoImplicitPrelude pragma (#7089)Albert Krewinkel1-2/+0
2020-02-12Introduce new format variants for JATS (#6067)Albert Krewinkel1-1/+15
New formats: - `jats_archiving` for the "Archiving and Interchange Tag Set", - `jats_publishing` for the "Journal Publishing Tag Set", and - `jats_articleauthoring` for the "Article Authoring Tag Set." The "jats" output format is now an alias for "jats_archiving". Closes: #6014
2019-05-16JATS writer: properly handle footnotes.John MacFarlane1-3/+1
"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.
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-26/+12
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-19hlint code improvements.John MacFarlane1-2/+0
2017-12-22Improve support for code language in JATSHamish Mackenzie1-1/+6
2017-12-13fig, table-wrap & caption Divs for JATS writerHamish Mackenzie1-0/+119
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.