summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-12-04Typst writer: put inline image dimensions on enclosing box, not image.John MacFarlane
Closes #9104.
2023-11-29LaTeX reader: handle otherlanguage environment...John MacFarlane
...and language-name environments like `\begin{french}...\end{french}`. Closes #9202.
2023-11-29Docx reader: unwrap content of shaped textboxes...Stephan Meijer
* #9214 text in shape format test document * #9214 support Text in Shape Format * #9214 remove irrelevant code
2023-11-28Docx reader: Improve handling of w:sym.John MacFarlane
Add T.P.Readers.Docx.Symbols. This gives us a table to use to resolve characters included in docx via w:sym element. Use this table to resolve characters when symbol fonts are specified. Closes #9220.
2023-11-28Correct comment.John MacFarlane
2023-11-25SelfContained: improve treatment of embedded SVGs.John MacFarlane
- Ensure unique ids for elements by prefixing SVG id. - Ensure SVG `id` attribute except when `use` element is used. - Remove `width`, `height` attributes from svg element when `use` element is used. Instead, add `width` and `height` 100% to the `use` element. This seems to get the sizing right. Closes #9206. Ref: #8948.
2023-11-25Shared.renderTags': use minimized tag for rect.John MacFarlane
2023-11-25Shared.renderTags': allow svg path element to be minimized.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-17Ensure we use .svg not .svgz as extension for image/svg+xml mime type.John MacFarlane
See #9195.
2023-11-17T.P.Class.IO.openURL improvements for data uris.John MacFarlane
- Only treat as base64 if ';base64' is present. - Otherwise treat as UTF-8 (not 100% reliable but should cover most other cases). - Strip off ';base64' (or ';charset=...' or whatever) from mime type. This last change addresses #9195 (problems with data URIs in conversion to docx).
2023-11-15Typst writer: better handling of tables with captions.John MacFarlane
We now put these in a figure with a caption argument. Closes #9194.
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-14Update typst writer to typst 0.9 citation format.John MacFarlane
Closes #9188.
2023-11-13MediaWiki reader: allow attribute keys with hyphens.John MacFarlane
Closes #9178.
2023-11-06ODT reader: Support attr `text:continue-numbering` (#8998)Stephan Meijer
Closes #8979.
2023-11-05Markdown reader: make attributes work with reference links.John MacFarlane
Closes #9171.
2023-11-05T.P.Shared: export `combineAttr`.John MacFarlane
[API change]
2023-11-04JATS writer: handle case where there is material after refs div.John MacFarlane
Previously in such cases the references were not being moved to back matter. Closes #9166.
2023-11-03LaTeX template: include bookmark package unconditionally.John MacFarlane
This package produces better PDF bookmarks than hyperref and does it on the first pass. As a consequence, we now default to running LaTeX only once in producing a PDF (instead of twice). If a table of contents is present, we still have to run three times to get the page numbers.
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-11-02Ms writer: don't do normal escapes in filename arguments...John MacFarlane
for PSPIC etc. Note: I haven't been able to figure out how to make it work if the filename contains a `"` character.
2023-11-02Citeproc: don't link citations if `suppress-bibliography` specified.John MacFarlane
For there will be nothing to link to. Closes #9163.
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-27Fix spacing.John MacFarlane
2023-10-26Make `reference-section-title` work with `jats+element_citations`.John MacFarlane
Closes #9021.
2023-10-26Add `bits` as synonym of `jats` as input format.John MacFarlane
Document in MANUAL.txt.
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-24ICML writer: prevent doubled attributes.John MacFarlane
Closes #9158.
2023-10-23CommonMark reader: handle `Ext_tex_math_gfm`.John MacFarlane
Parse GFM-specific math constructions when `tex_math_gfm` enabled. See <https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions>. Closes #9121.
2023-10-23Extensions: Add `Ext_tex_math_gfm` constructor to Extension.John MacFarlane
[API change] This handles two GitHub-specific syntaxes for math. And document in MANUAL.txt. This is now default for `gfm`, in addition to `tex_math_dollars`. See #9121.
2023-10-23Add helpful message on some metadata YAML errors.John MacFarlane
Closes #9155.
2023-10-22DokuWiki reader: allow autolinks to be avoided...John MacFarlane
using e.g. `https:%%//%%...`. Closes #9153. This is not a fully general fix but it should be enough if there's a convention of defeating autolinks by putting the slashes in `%%..%%`.
2023-10-22DokuWiki reader: parse `<code>` and `<file>` as block-level code.John MacFarlane
Previously we treated them as inline code in some contexts, but that is not how DokuWiki works. Closes #9154.
2023-10-21LaTeX reader: better handle spacing commands...John MacFarlane
hfill, vfill, hskip, vskip, etc. Closes #9150.
2023-10-20Typst writer: add `#box` around image to make it inline. (#9149)John MacFarlane
An `#image` by itself in typst is a block-level element. To force images to be inline (as they are in pandoc), we need to add a box with an explicit width. When a width is not given in image attributes, we compute one from the image itself, when possible. Closes #9104, supersedes #9105.
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-18Powerpoint writer: fix a corruption error...John MacFarlane
caused when the document used both a regular png and a png in a data URI. (Similarly for any other image format.) The problem was that duplicate entries in `[Content Types].xml` were being created, one for the mime type `image/png`, one for `image/png;base64`. Closes #9113.
2023-10-17LaTeX writer: fix rowspans in tables...John MacFarlane
...so they use the width of the column (`=` as the width parameter). Closes #9140.
2023-10-17LaTeX writer: don't treat table as "simple" if they have col widths.John MacFarlane
This should help fix a problem wherein some grid tables with colspans were overly wide. See #9140. The example given there still produces suboptimal output (overlapping text), so not closing yet.
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-16Typst writer: escape `(`.John MacFarlane
If it occurs in certain contexts, it can be parsed as function application. Simplest thing to do is to escape it always. Closes #9137.
2023-10-16remove duplicates for Ext_raw_html and Ext_pipe_tablesTim Stewart
2023-10-16Handle empty cells correctly in creole reader. Fixes #9141Sascha Wilde