summaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)Author
2024-01-23add testcaseGokul Rajiv
2024-01-22Org writer: escape special lines in code blocksAlbert Krewinkel
Fixes: #9218
2024-01-20LaTeX writer: create valid table even when table is empty.John MacFarlane
Closes #9350.
2024-01-18Markdown writer: fix output for pipe tables...John MacFarlane
...with a huge number of columns. Previously we got invalid pipe tables when the number of table columns exceeded the setting of `--columns`. Closes #9346.
2023-12-30Add command test for #9293.John MacFarlane
2023-12-26ODT/opendocument writers: properly handle highlighting styles.John MacFarlane
These styles were going into an office:styles element in content.xml, but this is invalid. Instead they must go in styles.xml. See #9287. The variable `highlighting-styles` no longer has any effect on the default opendocument template, and highlighting styles are not included in opendocument output.
2023-12-22Markdown writer: add table identifier at end of caption if present.John MacFarlane
Suggested at #9279.
2023-12-20Org reader: parse caption and label for grid tables.John MacFarlane
Closes #9279.
2023-12-18LaTeX writer: omit superfluous page locator label...John MacFarlane
when used with `--natbib` or `--biblatex`. These will treat a bare number as a page locator, and they will be able to localize it. We borrow the code for stripping the locator label from the suffix from Citeproc code. Note that the recognition of the locator label is locale-sensitive; if `lang` is `de`, then `S. 33` is a page reference, and `p. 33` is not! Closes #9275.
2023-12-05Add tests for alerts gfm <-> docbook.John MacFarlane
2023-12-05Fine-tuning on alerts.John MacFarlane
Added a test to show that we can convert smoothly between gfm, rst, and asciidoc alerts.
2023-12-04HTML5 writer footnote changes (aria-role, element type).John MacFarlane
* To conform to validator's expectations, `doc-footnote` role is used with `aside` and `doc-endnotes` with `section`. * `aside` is used only for notes at ends of sections or blocks; if all the notes come at the end of the document, `section` is used so we can have the `doc-endnotes` role.
2023-11-29LaTeX reader: handle otherlanguage environment...John MacFarlane
...and language-name environments like `\begin{french}...\end{french}`. Closes #9202.
2023-11-25Update command test for SVG embedding changes.John MacFarlane
2023-11-22LaTeX writer: handle identifiers inside heading contents.John MacFarlane
`\phantomsection` can't be used in this case, so we need `\hypertarget`. Closes #9209.
2023-11-19Man reader: properly handle `.sp` macro inside lists and block quotes.John MacFarlane
Closes #9201.
2023-11-17LaTeX reader: fix theorem label parsing (#9198)Hikaru Ibayashi
Closes #8872. In the current implementation , theorem labels in `theoremEnvironment` are determined by the `LastLabel` in the current state. This approach works well when the `\label{label_name}` is placed at the end of the theorem body. However, when a label is placed at the beginning of the theorem (another common practice) and additional labels follow in the theorem body, `theoremEnvironment` incorrectly picks the last label (e.g., `\label{item2}` in #8872). This patch addresses the issue by extracting the label extraction independently of the `LastLabel` state.
2023-11-15HTML reader: Fix handling of invalidly nested sublists.John MacFarlane
This revises the fix to #8150 (and the test case) and closes #9187. HTML in the (invalid) form: <ul> <li>L1</li> <ul> <li>L1.1</li> </ul> </ul> is treated by browsers like <ul> <li>L1 <ul> <li>L1.1</li> </ul> </li> </ul> not <ul> <li>L1 <li><ul> <li>L1.1</li> </ul> </li> </ul> as pandoc previously assumed. This change will give a similar treatment to <ul> <li>L1</li> <p>foobar</p> </ul> which also seems to match browser behavior.
2023-11-15Markdown reader: don't change newlines to spaces in math.John MacFarlane
Preserve them: otherwise we can get unwanted results if there's a `%` comment. Closes #9193.
2023-11-05Markdown reader: make attributes work with reference links.John MacFarlane
Closes #9171.
2023-11-02T.P.RoffChar: escape `-` as `\-`.John MacFarlane
The groff_man (7)` man page indicates that `-` characters will be treated as typographic hyphens and are not appropriate for cases where the output should be copy-pasteable as an ASCII hyphen-minus character. (E.g. in command line options.) However, until a recent update groff man did not actually do this; it treated `-` and `\-` the same. With the new update (1.23.0) the two are distinguished (see https://lwn.net/Articles/947941/ for background), so now it is important that pandoc escape `-`. This reverts ee60ba5252360d2efbf9cf30197236a21a15a924. That change was motivated by a problem with backslash-escaping `-` in a filename for .PSPIC. That's simply a separate issue; we shouldn't do the normal escapes in such a context. It has been addressed in the previous commit.
2023-10-28Shared: improve isTightList...John MacFarlane
so that it recognizes an item containing only a list which is itself tight as potentially an item in a tight list. Closes #9161.
2023-10-26Make `reference-section-title` work with `jats+element_citations`.John MacFarlane
Closes #9021.
2023-10-26Modify JATS reader to handle BITS too (#9138)Julia Diaz
Add provision for title-group, book, book-part-wrapper, book-meta, book-part-meta, book-title, book-title-group, index, toc, legend, title, collection-meta
2023-10-26Org writer: escape literal `*`, `|`, `#` at beginning of line with ZWS.John MacFarlane
Closes #9159.
2023-10-21LaTeX reader: better handle spacing commands...John MacFarlane
hfill, vfill, hskip, vskip, etc. Closes #9150.
2023-10-20Markdown reader: fix blindspot with superscript in links.John MacFarlane
Previously `[^super^](#ref)` wasn't parsed as a link, due to code that was meant to prevent footnote markers from being recognized as reference links. This commit tightens up that code to avoid this bad effect. We have also added a new restriction on footnote labels: they cannot contain the characters `^`, `[`, or `]`. Though this is technically a breaking change, we suspect that the impact will be minimal, as it's very unlikely people would be using these characters in their note labels. Closes #8981.
2023-10-19HTML reader: allow th to close td and vice versa.John MacFarlane
Closes #9090.
2023-10-17JATS reader: fix handling of alt-text (#9134)Julia Diaz
Previously we were looking for an attribute that doesn't exist in JATS; alt-text is provided by a child element. Closes #9130.
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-04Man writer: use UR, MT macros for URLs, emails.John MacFarlane
Closes #9120.
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-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-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-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-30Org reader: don't parse alphabetical lists...John MacFarlane
...unless the `fancy_lists` extension is enabled. Closes #9042.
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-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-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-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-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-09LaTeX writer: Improve escaping of URIs in href, url.John MacFarlane
Closes #8992.