summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-10-12Typst writer: don't allow long heading to wrap.John MacFarlane
Closes #9132.
2023-10-08Fix incorrect abbreviation for astronomical unit (#9125)Michael McClurg
2023-10-05Man writer: Fix some spacing issues around links.John MacFarlane
See #9120. We need to use `\c` before a `.UR` or `.MT`, to avoid an extra space, and also after. To ensure that a space at the beginning of the following line doesn't get swallowed up, we escape it with `\`.
2023-10-05T.P.Shared.splitSentences: don't split after initials.John MacFarlane
This improves the man and ms writer output, preventing sentence breaks after initials.
2023-10-04Man writer: use UR, MT macros for URLs, emails.John MacFarlane
Closes #9120.
2023-10-03Markdown reader: Don't apply `--default-image-extension` to data URIs.John MacFarlane
Closes #9118.
2023-09-29Check if supplied FORMAT matches with an HTML slide deck value. Return True ↵James J Balamuta
for isRawHtml.
2023-09-21JATS writer: fix 3.1.4 regression in handling block-level metadata.John MacFarlane
Closes #9092.
2023-09-20T.P.Shared: add addPandocAttributes function.John MacFarlane
[API change] This is meant to simplify addition of attributes to Pandoc elements; for elements that don't have a slot for attributes, an enclosing Div or Span is added to hold the attributes. Ideally this would live in pandoc-types, but for now we reuse some code from commonmark-pandoc.
2023-09-18Fix uneven indents in LaTeX line block output.John MacFarlane
Closes #9088.
2023-09-16HTML reader: parse task lists using input elements (#9066)Seth Speaks
Allow the HTML reader to parse task lists of the sort produced by pandoc. Closes #9047
2023-09-14Markdown reader: More accurate check that a normalCite...John MacFarlane
...is not a link, bracketed span, or reference. See #9080.
2023-09-14Ms writer: improvements in image handling.John MacFarlane
See #4475. + PDFPIC is now used for PDF images in figures. + Inline images that are postscript or PDF are rendered using PSPIC or PDFPIC. This isn't ideal, because they will still be rendered as if in a separate paragraph, but it's probably better than just printing the image name. + Units are included in height. For further improvement, we might consider in Text.Pandoc.PDF using something like `convertImages` (which we currently use for converting to PDF via LaTeX) to convert SVG (and other?) images to PDF so they can be rendered in this way.
2023-09-07HTML writer: Fix CSL entry-spacing default.John MacFarlane
See #9058.
2023-09-07Fix default citeproc entry-spacing.John MacFarlane
According to the CSL manual, the default entry spacing is 1. We were treating it as 0. T.P.Citeproc: always include an entry-spacing attribute in the Div if the bibliography element contains an entry-spacing attribute (previously we omitted it when it was 0). LaTeX writer: use entry spacing 1 if no entry-spacing attribute is present. Update tests. See #9058.
2023-09-06Org reader: factor out orgAnchor -> Org.Parsing.John MacFarlane
A purely internal change. We will use this both in inline and block parsing.
2023-09-05Rewrite CSLReferences environment...John MacFarlane
...to avoid depending on enumitem, which plays badly with beamer. Instead we use a regular list environment. Thanks to @jpcirrus for the concept. We also restore the pre-3.1.7 format of the CSLReferences environment, which again has two parameters. The first determines whether a hanging indent is used (1 = yes, 0 = no), and the second is the entry line spacing (0 = none). Closes #9053.
2023-09-04JATS reader: fix conversion of date to ISO 8601 format.John MacFarlane
See #8865.
2023-09-04JATS reader: Ignore `<processing-meta>` element (#9057)Julia Diaz
2023-09-01LaTeX writer: Fix regression.John MacFarlane
In 3.1.7, pandoc added two labels to LaTeX figure environments, one with a phantomsection. Closes #9045.
2023-09-01HTML writer: use the ID prefix in the ID for the footnotes section.Benjamin Esham
In general, the ID prefix makes it possible to combine multiple pieces of Pandoc-generated HTML with no possibility that IDs will conflict. One exception to this was that the footnotes were always put into an element like <aside id="foonotes" ...> This commit applies the ID prefix to this ID as well.
2023-08-31Fix spacing errors.John MacFarlane
2023-08-31LaTeX writer: fix regression in escaping URLs.John MacFarlane
In 3.1.6.1 the `~` was handled properly (either literally or with `%E7`). This broke in 3.1.6.2, which used URI encoding in both cases and didn't escape the `\` before `%E7`. This patch restores the former behavior: `~` isn't escaped if it isn't escaped in the original URL, and if it is, a backslash is added before `%`. Closes #9043.
2023-08-30Fix compiler warning by removing redundant definition.John MacFarlane
2023-08-30Org reader: don't parse alphabetical lists...John MacFarlane
...unless the `fancy_lists` extension is enabled. Closes #9042.
2023-08-30JATS reader: Multilevel support for `<permissions>` metadata (#9037)Julia Diaz
This revises the earlier support for `<permissions>`: now metadata objects with multiple fields are created, matching the structure in JATS.
2023-08-29Support images with wikilink syntax.John MacFarlane
E.g. `![[foo|bar]]`. (This requires enabling one of the `wikilinks` extensions.) Closes #8853.
2023-08-29Markdown: Allow a citation or reference link to be parsed after a `!`.John MacFarlane
Closes #8254.
2023-08-29Markdown reader: fix dropped `!` before nonexistent reference.John MacFarlane
In e.g. `![foo]` the `!` would be silently dropped if `[foo]` wasn't a reference link label. Closes #9038.
2023-08-29Use `\cite` and `\bibitem` to link up citations, even with citeproc.John MacFarlane
See #9031 and discussion in #9020. This will give us better accessibility; when tagging is enabled, the citation can be linked to the bibliography entry. This changes some of the details of the layout and the default template. We now make CSLReferences a special enumitem list that will contain `\bibitem`s. Internal links inside citations to ids beginning in `ref-` are put inside a `\cite` instead of `\hyperref`. Closes #9031.
2023-08-28Add support for <permissions> metadataJulia Diaz
2023-08-26Org reader: allow escaping commas in macro argumentsAmneesh Singh
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-08-26LaTeX writer link/target improvements.John MacFarlane
+ Use `\phantomsection` and `\label` instead of `\hypertarget`. + Use `\hyperref` for LaTeX internal links, `\hyperlink` for beamer (since `\hyperref` doesn't seem to work). Closes #9022.
2023-08-26Correct name of JATS element attribJulia Diaz
2023-08-25Man writer: avoid a .PP right after a section heading.John MacFarlane
This is at best a no-op (in groff man and mandoc) and at worst (in some formatters) may create extra whitespace. See #9020.
2023-08-25Man writer: improvements to code and code blocks.John MacFarlane
The aim here (see #9020) is to produce more standard and more portable man pages. To that end: - We revert the fanciness introduced in #7506, which employs a custom font name V and a macro that makes this act like boldface in a terminal and monospace in other formats. Unfortunately, this code uses a mechanism that is not portable (and does not work in mandoc). - Instead of using V for inline code, we simply use CR. Note that `\f[CR]` is emitted instead of plain `\f[C]`, because there is no C font in man. (This produces warnings in recent versions of groff.) - For code blocks, we now use the `.EX` and `.EE` macros, together with `.IP` for spacing and indentation. This gives more standard code that can be better interpreted e.g. by mandoc.
2023-08-24Man writer: don't emit `.hy`...John MacFarlane
regardless of setting of `hyphenate` variable. See #9020.
2023-08-23JATS writer: fix placement of ref-list...John MacFarlane
...when no title is specified for the reference section. (In this case we place it in `back` with an empty title.) Closes #9017.
2023-08-23Also escape % in URLs.John MacFarlane
This improves the fix to #9017 in commit 7c4354646b57aa0d505dc955f856b8c3443c8db4 An alternative would be to avoid backslash escaping `#` and `%` in URLs, and instead always add `fragile` to the slide environment.
2023-08-23LaTeX writer: backslash-escape # in URLs. Closes #9014.John MacFarlane
2023-08-22Fix spacing errors.John MacFarlane
2023-08-21Typst writer: use `~` for nonbreaking space.John MacFarlane
And escape literal `~`. Closes #9010.
2023-08-19LaTeX writer: improve internal links and targets.John MacFarlane
We no longer wrap section headings in a `\hypertarget`. This is unnecessary (hyperref creates an anchor based on the label) and it interferes with tagging. In addition, we now use `\hyperref` rather than `\hyperlink` for internal links. Currently `\hypertarget` is still being used for link anchors not on headings. Closes #8744. Thanks to @u-fischer.
2023-08-18Docx reader: omit "Table NN" from caption.John MacFarlane
Closes #9002.
2023-08-18Org reader: allow example lines to end immediately after the colonBrian Leung
See the regexp at https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/lisp/org-element.el?h=d1e4b9351941aa9241ab3aa0a34256376b7eca94#n2420.
2023-08-14Docx reader: Avoid spurious block quotes in list items.John MacFarlane
The docx reader was overzealous in detecting indented paragraphs as block quotes, leading to list items sometimes being put in block quotes (especially in docx created by Google Docs). Closes #8836.
2023-08-10Fix display of block elements in JATS reader (PR #8971)Julia Diaz
A number of block elements, like disp-quote, list, and disp-formula, were always treated as inlines if appearing inside paragraphs, even if their usage granted a separate block. The function isElementBlock has been refined to prevent this, and a number of specific parse cases have been added to parseBlock. Also, some minimal cleanup of the test file, in order for it to pass XML validation against the JATS DTD 1.3 (it was not compliant with the current or any previous versions of JATS). Closes #8889.
2023-08-09LaTeX writer: Improve escaping of URIs in href, url.John MacFarlane
Closes #8992.
2023-08-09Typst writer: put the label in right place for Div, use `#block`.John MacFarlane
Closes #8991. Previously we were putting the label at the beginning of the Div's contents, but according to the documentation such a label gets attached to the *preceding* element. We now use an explicit `#block` and add the label at the end.
2023-08-09HTML reader: avoid duplicate id on header and div.John MacFarlane
Closes #8991.