pandoc/test/command/citeproc-87.md
John MacFarlane 82638ad53b Convert Quoted in bib entries to special Spans...
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.
2021-08-13 19:25:29 -07:00

58 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

```
% pandoc --citeproc -Mlang=it-IT -t markdown-citations
Foo [@a 50: «Disse: "bar"»]. «Disse: "baz"»
---
suppress-bibliography: true
references:
- id: a
author:
- literal: Aristotele
title: Metafisica
type: book
...
^D
Foo (Aristotele, s.d., 50: «Disse: "bar"»). «Disse: "baz"»
```
For en, the localized quotes match what Quoted would produce,
so the Quoted is passed to citeproc as a Span ("",["csl-quoted"],[])
and flipflopping and localization occur.
```
% pandoc -C -t plain -Mlang=en
---
references:
- id: a
author:
- literal: Aristotele
title: Metafisica et "Physica"
type: article-journal
...
Foo [@a 50].
^D
Foo (Aristotele, n.d., 50).
Aristotele. n.d. “Metafisica Et Physica.”
```
For cs, there is no such match, so the Quoted is left alone
and has the same effect it would have elsewhere in a pandoc document.
```
% pandoc -C -t plain -Mlang=it
---
references:
- id: a
author:
- literal: Aristotele
title: Metafisica et "Physica"
type: article-journal
...
Foo [@a 50].
^D
Foo (Aristotele, s.d., 50).
Aristotele. s.d. «Metafisica et “Physica”».
```