aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-02-01Docx reader: parse EN.CITE and EN.REFLIST fields.endnoteJohn MacFarlane
2022-02-01T.P.Readers.EndNote: export readEndNoteXMLReferences.John MacFarlane
[API change]
2022-02-01Add endnote XML reader.John MacFarlane
New input format: endnotexml New reader module: Text.Pandoc.Readers.EndNote, exporting readEndNoteXML. [API change] This reader is still a bit rudimentary, but it should get be good enough to be helpful.
2022-01-29LaTeX reader: ensure that `\raggedright` doesn't gobble an argument.John MacFarlane
See #7757.
2022-01-29Use `[x]` not `[X]` for asciidoctor checklists.John MacFarlane
See #7798.
2022-01-29Custom writer: preserve order of element attributesAlbert Krewinkel
Attribute key-value pairs are marshaled as AttributeList, i.e., as a userdata type that behaves both like a list and a map. This allows to preserve the order of key-value pairs. Closes: #7489
2022-01-29Switch to hslua-2.1Albert Krewinkel
This allows for some code simplification and improves stability.
2022-01-28HTML writer: avoid duplicate "style" attributes on table cellsAlbert Krewinkel
Fixes: #7871
2022-01-28Don't read files outside of user data directoryEven Brenden
If a file path does not exist relative to the working directory, but it does exist relative to the user data directory, and it exists outside of the user data directory, do not read it. This applies to readDataFile and readMetadataFile in PandocMonad and, by extension, any module that uses these by passing them relative paths.
2022-01-28Handle consecutive ".."s in makeCanonicalEven Brenden
As an example, prior to this commit, "../../file" would evaluate to "file", when it should be unchanged.
2022-01-27LaTeX writer: allow arbitrary frameoptions to be passed...John MacFarlane
to a beamer frame, using the frameoptions attribute. Updated manual. See #7869.
2022-01-27LaTeX writer: add s and squeeze to recognized beamer frameoptions.John MacFarlane
Closes #7869.
2022-01-25LaTeX reader: improve descItem.John MacFarlane
For some reason we were skipping arbitrary blocks before `\item`. This is now changed to "skip whitespace and comments."
2022-01-23CommonMark reader: fix source position after YAML metadata.John MacFarlane
Closes #7863.
2022-01-22LaTeX reader: improve handling of newif.John MacFarlane
Adding a pair of braces around the second argument of `\def` prevents LaTeX from an emergency stop with: Closes #6096. ``` pandoc -f markdown -o test.pdf \newif\ifepub \epubtrue \ifepub hi \fi ^D ```
2022-01-21Search for metadata files in $DATADIR/metadata (#7851)Even Brenden
If files specified with `--metadata-file` are not found in the working directory, look in `$DATADIR/metadata`. Expose new `readMetadataFile` function from Text.Pandoc.Class [API change]. Expose new `PandocCouldNotFindMetadataFileError` constructor for `PandocError` from Text.Pandoc.Error [API change]. Closes #5876.
2022-01-21Remove retokenizing in rawLaTeXParser.John MacFarlane
This was causing serious problems with `newif` commands. See #6096. And it didn't seem to make any difference for the tests; I assume that, unless there's some untested behavior, this is something that has now become unnecessary.
2022-01-20Avoid putting a frame around speaker notes in beamer.John MacFarlane
If speaker notes (a Div with class 'notes') occur right after a section heading, but above slide level, the resulting `\note{..}` caommand should not be wrapped in a frame, as that will cause a spurious blank slide. Closes #7857.
2022-01-20HTML writer: don't break lines inside code elements.John MacFarlane
With the new (default) line wrapping of HTML, in conjunction with the default CSS which includes `code { whitespace: pre-wrap; }`, spurious line breaks could be introduced into inline code. Closes #7858.
2022-01-19Modify stringify so it ignores `[Citation]` inside `Cite`.John MacFarlane
Otherwise we'll sometimes get two copies of things, one from the `citationPrefix` or `citationSuffix` and another from the embedded fallback text. When there is no fallback text, we'll get no content. However, it really isn't an alternative to just rely on the result of running `query` on the embedded `Citation`s; this will result in a jumble of text rather than anything structured. Closes #7855.
2022-01-19Docx reader: parse both zotero citation and bibliography...John MacFarlane
as FieldInfo.
2022-01-19Docx reader: add skeleton for parsing zotero ADDINs.John MacFarlane
So far this just adds a constructor for FieldInfo; we'll need to adjust the rest of the reader code to parse the JSON and do something with it. See #7840.
2022-01-19Markdown writer: handle explicit column widths with pipe tables.John MacFarlane
If a table has explicit column width information *and* the content extends beyond the `--columns` width, we need to adjust the widths of the pipe separators to encode this width information. Closes #7847.
2022-01-18Docx writer: Separate tables even with RawBlocks between (#7844)Michael Hoffmann
Adjacent docx tables need to be separated by an empty paragraph. If there's a RawBlock between tables which renders to nothing, be sure to still insert the empty paragraph so that they will not collapse together. Fixes #7724
2022-01-17Fix some haddock errors.John MacFarlane
2022-01-17T.P.App.Opt: fix logic bug in fullDefaultsPath.John MacFarlane
Previously we would (also) search the default user data directory for a defaults file, even if a different user data directory was specified using `--data-dir`. This was a mistake; if `--data-dir` is used, the default user data directory should not be searched.
2022-01-17T.P.Shared.defaultUserDataDir: behavior change.John MacFarlane
If the XDG data directory is not defined (e.g. because it's not supported in the OS or HOME isn't defined), we return the empty string instead of raising an exception. Closes #7842.
2022-01-17PDF: support pagedjs-cli as pdf engine (#7838)Albert Krewinkel
PagedJS is a polyfill and supports the Paged Media standards by the W3C. <https://www.pagedjs.org/>
2022-01-16Support checklists in asciidoctor writer (#7832)Nikolai Korobeinikov
The checklist syntax (similar to `task_list` in markdown) seems to be an asciidoctor-only addition. Co-authored-by: ricnorr <[email protected]>
2022-01-15Man writer: use custom font V for inline code.John MacFarlane
The V font is defined conditionally, so that it renders like CB in output formats that support that, and like B in those that don't (e.g. the terminal). We could just redefine C, but this would affect code blocks, too, and putting them all in boldface looks ugly, I think. Possible drawback: fragments created by pandoc's man writer will presuppose a nonstandard V font. Closes #7506. Supersedes 253467a549dcc22384be96041fd6f886c4a7a935.
2022-01-15Man writer: Use boldface for inline code.John MacFarlane
Closes #7506. This also allows us to get rid of some special casing on definition lists that ensured that options in code spans would be boldface. (If this change is ever reverted, we'll need that again.)
2022-01-14T.P.Readers.LaTeX.Parsing: don't export totoks.John MacFarlane
Make the first param of `tokenize` a SourcePos instead of SourceName, and use it instead of `totoks`.
2022-01-13When reading defaults file, stop at a line `...`.John MacFarlane
This line signals the end of a YAML document. This restores the behavior we got with HsYaml. yaml complains about content past this line. See https://github.com/jgm/pandoc/issues/4627#issuecomment-1012438765
2022-01-12Citeproc: allow `notes-after-punctuation` to work...John MacFarlane
with numerical styles that use superscripts (e.g. american-medical-association.csl), as well as with note styles. The default setting of `notes-after-punctuation` is true for note styles and false otherwise. This restores a behavior of pandoc-citeproc that wasn't properly carried over to Citeproc. Closes #7826. See also jgm/pandoc-citeproc#384.
2022-01-11Docx writer: Handle bullets correctly in lists by not reusing numIds (#7822)Michael Hoffmann
Make sure that we only create one bullet per list item in docx. In particular, when a div is a list item, its contained paragraphs will now no longer wrongly get individual bullets. This is accomplished by making sure that for each list, we only use the associated numId once. Any repeated use would add incorrect bullets to the document. Closes #7689
2022-01-10DocBook reader: Collapse internal spaces in literal...John MacFarlane
and other similar tags. This seems to accord with what the docbook toolchain does. Closes #7821.
2022-01-10HTML writer: don't break attributes values when wrapping.John MacFarlane
2022-01-10Fix regression: allow blank lines in HTML attributes.John MacFarlane
The commit 7a9832166e36f77402d5e0259647e9f5c7ba4e58 had the effect that blank lines would be collapsed in HTML attributes. We also roll back a change that collapsed multiple spaces into one.
2022-01-09Improve abstract in HTML template.John MacFarlane
* Add localized title "abstract", unless `abstract-title` variable is set. * Add `abstract-title` div to abstract CSS. * Move abstract CSS out of CSL conditional. * Ensure that abstract is aligned left but indented on all sides. * Use smaller font for abstract. Improves #7588.
2022-01-09Org reader: support alphabetical (fancy) listsLucas Viana
This adds support for alphabetical lists in org by enabling the extension Ext_fancy_lists, mimicking the behaviour of Org Mode when org-list-allow-alphabetical is enabled. Enabling Ext_fancy_lists will also make Pandoc differentiate between the delimiters of ordered lists (periods or closing parentheses). Org does this differentiation by default when exporting to some formats (e.g. plain text) but does not in others (e.g. html and latex), so I decided to copy Pandoc's markdown reader behaviour.
2022-01-08Org writer: fix list items starting with a code block...John MacFarlane
or other non-paragraph content. Closes #7810.
2022-01-08Avoid blank lines after tight sublists in org, haddock.John MacFarlane
T.P.Writers.Shared `endsWithPlain` now returns True if the list ends with a list which ends with a Plain. See #7810.
2022-01-08RST writer: avoid extra blank line after empty list item.John MacFarlane
See #7810 (2).
2022-01-08Org writer: fix extra blank line inserted after empty list item.John MacFarlane
Addresses issue 2 from #7810.
2022-01-08Org writer: don't add blank line before lists.John MacFarlane
The code to do this was apparently copied over from the RST writer, but these blank lines aren't necessary or desirable in org. See #7810 comment 3.
2022-01-08writeMedia: unescape percent-encoding in creating file path.John MacFarlane
Closes #7819 (problem with spaces in image filenames when creating PDFs).
2022-01-08toLocatorMap: store keys as lowercase.John MacFarlane
We want to do a case-insensitive comparison when parsing locators, so that e.g. both `Chap.` and `chap.` work. Previously we lowercase terms when doing the lookup, but they weren't lowercased in the map itself, which led to locator-detection breaking for German (where the terms have uppercase letters). See https://groups.google.com/d/msgid/pandoc-discuss/1dd44886-7b79-4e5f-97ec-57b91113df36n%40googlegroups.com
2022-01-07T.P.Readers.LaTeX.SIunitx: explicit imports.John MacFarlane
2022-01-07Fix parsing of footnotes in `--metadata-file`.John MacFarlane
Closes #7813.
2022-01-07Org writer: support starting number cookiesLucas Viana
This complements #7806 by supporting writing Org ordered lists that start at a specific number.