Age | Commit message (Collapse) | Author | Files | Lines |
|
Linkification of URLs in the bibliography is now done in
the citeproc library, depending on the setting of an option.
We set that option depending on the value of the metadata
field `link-bibliography` (defaulting to true, for consistency
with earlier behavior, though the new behavior includes the
CSL draft recommendation of hyperlinking the title or the whole
entry if a DOI, PMID, PMCID, or URL field is present but not
explicitly rendered).
These changes implement the following recommendations from the
draft CSL v1.0.2 spec (Appendix VI):
> The CSL syntax does not have support for configuration of links.
> However, processors should include links on bibliographic references,
> using the following rules:
> If the bibliography entry for an item renders any of the following
> identifiers, the identifier should be anchored as a link, with the
> target of the link as follows:
> - url: output as is
> - doi: prepend with "`https://doi.org/`"
> - pmid: prepend with "`https://www.ncbi.nlm.nih.gov/pubmed/`"
> - pmcid: prepend with "`https://www.ncbi.nlm.nih.gov/pmc/articles/`"
> If the identifier is rendered as a URI, include rendered URI components
> (e.g. "`https://doi.org/`") in the link anchor. Do not include any other
> affix text in the link anchor (e.g. "Available from: ", "doi: ", "PMID: ").
> If the bibliography entry for an item does not render any of
> the above identifiers, then set the anchor of the link as the item
> title. If title is not rendered, then set the anchor of the link as the
> full bibliography entry for the item. Set the target of the link as one
> of the following, in order of priority:
>
> - doi: prepend with "`https://doi.org/`"
> - pmcid: prepend with "`https://www.ncbi.nlm.nih.gov/pmc/articles/`"
> - pmid: prepend with "`https://www.ncbi.nlm.nih.gov/pubmed/`"
> - url: output as is
>
> If the item data does not include any of the above identifiers, do not
> include a link.
>
> Citation processors should include an option flag for calling
> applications to disable bibliography linking behavior.
Thanks to Benjamin Bray for getting this all working.
|
|
before passing them off to citeproc.
This ensures that we get proper localization and flipflopping
if, e.g., quotes are used in titles.
Closes jgm/citeproc#87.
|
|
citeproc changes allow us to ignore Quoted elements;
citeproc now uses its own method for represented quoted
things, and only localizes and flipflops quotes it adds itself.
See #87.
The one thing left to do is to convert Quoted elements in
bibliography databases (esp. titles) to `Span ("",["csl-quoted"],[])`
before passing them to citeproc, IF the localized quotes
for the quote type match the standard inverted commas.
|
|
This is now done in citeproc itself.
|
|
And fix a small bug in handling of citations in notes, which
led to commas at the end of sentences in some cases.
|
|
|
|
Use latest citeproc, which uses a Span with a class rather
than a Note for notes. This helps us distinguish between
user notes and citation notes.
Don't put citations at the beginning of a note in parentheses.
(Closes #7394.)
|
|
Previously, using `--citeproc` could cause punctuation to move in
quotes even when there aer no citations. This has been changed;
now, punctuation moving is limited to citations.
In addition, we only move footnotes around punctuation if the
style is a note style, even if `notes-after-punctuation` is `true`.
|
|
If inline references are used (in the metadata `references` field),
we should still only include in the bibliography items that are
actually cited -- unless `nocite` is used.
Closes #7376.
|
|
|
|
...to a Div with id 'refs'. Previously we just left the
attributes of such a Div alone, which meant that style
options like entry-spacing had no effect there.
|
|
even if it differs from localeLanguage. (It is designed
to be possible to override the locale language, and this
is especially useful when one wants to use the unicode
extension syntx, e.g. fr-u-kb.)
|
|
[API change]
Use Lang from UnicodeCollation.Lang instead.
This is a richer implementation of BCP 47.
|
|
This is code that incorporates a prefix like `https://doi.org/`
into a following link when appropriate. But it didn't work because
we were walking with a `[Inline] -> [Inline]` function on an `Inlines`.
Changed the point of application of `fixLink` to resolve the issue.
Closes #7130.
|
|
|
|
This allows to import the module in writers without causing a circular
dependency.
|
|
|
|
|
|
See #7016.
|
|
The `linkifyVariables` function was changing these to links
which then got treated as non-empty by citeproc, leading
to wrong results (e.g. ignoring nonempty URL when empty DOI is present).
Addresses part 2 of jgm/citeproc#41.
|
|
- Use dev version of citeproc, which handles duplicate
ids better, preferring the last one in the list
and discarding the rest.
- Ensure that inline citations take priority over external
ones.
See jgm/citeproc#36.
This restores the behavior of pandoc-citeproc.
|
|
This means that:
- a URL may be provided, and pandoc will fetch the resource.
- Pandoc will search the resource path for the bibliography
if it is not found relative to the working directory.
Closes #6940.
|
|
with `--citeproc`. This fixes a regression, since pandoc-citeproc
allowed these to be combined.
Closes #6951.
|
|
We ignore the variants and just use the base lang code
and country code when passing off to citeproc.
|
|
This affected author-in-text citations in footnotes.
It didn't cause problems for the printed output, but for
filters that expected the citation id and other information.
Closes #6890.
|
|
in note citation styles. See #6835.
|
|
* Remove unused LANGUAGE pragmata
* Apply HLint suggestions
* Configure HLint to ignore some warnings
* Lint code when committing to master
|
|
Previously in-text note citations inside a footnote
would sometimes have the final period stripped, even
if it was needed (e.g. on the end of 'ibid').
See #6813.
|
|
|
|
When an author-in-text citation like `@foo` occurs in a footnote,
we now render it with: `AUTHOR NAME + COMMA + SPACE + REST`.
Previously we rendered: `AUTHOR NAME + SPACE + "(" + REST + ")"`.
This gives better results. Note that normal citations are still
rendered in parentheses.
|
|
|
|
|
|
|
|
This is used with the JATS writer, so this fixes a regression
in pandoc 2.11 with JATS output and citeproc.
Closes #6783.
|
|
This ensures that bibliography parsing errors generate messages
that include the bibliography file name -- otherwise it can be
quite mysterious where it is coming from.
[API change] New PandocBibliographyError constructor on
PandocError type.
|
|
...in citations inside notes in note-based styles.
These citations are put in parentheses, but the final
period must be removed.
See jgm/citeproc#20
|
|
Typos reported by
https://fossies.org/linux/test/pandoc-master.tar.gz/codespell.html
See: #6738
|
|
look locally, and only do an HTTP request if it's not
found locally.
|
|
Closes #6730.
Previously the command would succeed, returning empty metadata,
with no errors or warnings.
API changes:
- Remove now unused CouldNotParseYamlMetadata constructor for
LogMessage (T.P.Logging).
- Add 'Maybe FilePath' parameter to yamlToMeta in T.P.Readers.Markdown.
|
|
|
|
Update chicago-fullnote-bibliography.csl and adjust tests.
Closes #6723.
|
|
...into linked DOI, and similarly for other URLs linked in the
bibliography. We want to avoid having a URL in which only the latter
part is linked. Closes #6723.
|
|
Short DOIs begin 10/abcd and should be links to
`https://doi.org/abcd` (omitting the `10/`).
|
|
Parsing of YAML bibliographies was broken; this fixes it.
|
|
This isn't really necessary; we do filtering at other points now.
|
|
T.P.Readers.Markdown now exports yamlToRefs. [API change]
T.P.Readers.Metadata exports yamlBsToRefs. [API change]
These allow specifying an id filter so we parse only references
that are used in the document. Improves timing with a 3M
yaml references file from 36s to 17s.
|
|
...and CSL abbreviation files. Use resource path to search
in both USERDATADIR/csl and USERDATADIR/csl/dependent.
Also, add .csl or .json extension as needed, so you can just
do --csl zoology.
|
|
This speeds up parsing of external yaml bibliographies considerably
(in one test 36s -> 17s).
|
|
|
|
We now add a space only if there isn't already one.
(Some styles add a space at the end of the left-margin
div.)
|