Skip to content

Commit 892be12

Browse files
committed
Add citation linking options to reference / schema
Fixes #3197
1 parent 340e6ad commit 892be12

File tree

4 files changed

+120
-15
lines changed

4 files changed

+120
-15
lines changed

src/resources/editor/tools/vs-code.mjs

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15308,6 +15308,31 @@ var require_yaml_intelligence_resources = __commonJS({
1530815308
short: "JSON file containing abbreviations of journals that should be used in formatted bibliographies.",
1530915309
long: 'JSON file containing abbreviations of journals that should be\nused in formatted bibliographies when `form="short"` is\nspecified. The format of the file can be illustrated with an\nexample:\n\n```json\n{ "default": {\n "container-title": {\n "Lloyd\'s Law Reports": "Lloyd\'s Rep",\n "Estates Gazette": "EG",\n "Scots Law Times": "SLT"\n }\n }\n}\n```\n'
1531015310
}
15311+
},
15312+
{
15313+
name: "link-citations",
15314+
schema: "boolean",
15315+
tags: {
15316+
formats: [
15317+
"$pdf-all",
15318+
"docx"
15319+
]
15320+
},
15321+
description: "If true, citations will be hyperlinked to the corresponding bibliography entries (for author-date and numerical styles only). Defaults to false."
15322+
},
15323+
{
15324+
name: "link-bibliography",
15325+
schema: "boolean",
15326+
tags: {
15327+
formats: [
15328+
"$pdf-all",
15329+
"docx"
15330+
]
15331+
},
15332+
description: {
15333+
short: "If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be rendered as hyperlinks.",
15334+
long: "If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be rendered as hyperlinks. (If an entry contains a DOI, PMCID, PMID, or URL, but none of \nthese fields are rendered by the style, then the title, or in the absence of a title the whole entry, will be hyperlinked.) Defaults to true.\n"
15335+
}
1531115336
}
1531215337
],
1531315338
"schema/document-render.yml": [
@@ -19420,8 +19445,8 @@ var require_yaml_intelligence_resources = __commonJS({
1942019445
"Write standard visual editor markdown from source mode.",
1942119446
"Reference writing options for visual editor",
1942219447
"Location to write references (<code>block</code>,\n<code>section</code>, or <code>document</code>)",
19423-
"Unique prefix for references (<code>none</code> to prevent automatic\nprefixes)",
1942419448
"Write markdown links as references rather than inline.",
19449+
"Unique prefix for references (<code>none</code> to prevent automatic\nprefixes)",
1942519450
"The identifier for this publication.",
1942619451
"The identifier value.",
1942719452
"The identifier schema (e.g.&nbsp;<code>DOI</code>, <code>ISBN-A</code>,\netc.)",
@@ -20842,7 +20867,12 @@ var require_yaml_intelligence_resources = __commonJS({
2084220867
long: "Title of the volume of the item or container holding the item.\nAlso use for titles of periodical special issues, special sections,\nand the like."
2084320868
},
2084420869
"Disambiguating year suffix in author-date styles (e.g.&nbsp;\u201Ca\u201D in \u201CDoe,\n1999a\u201D).",
20845-
"internal-schema-hack"
20870+
"internal-schema-hack",
20871+
"If true, citations will be hyperlinked to the corresponding\nbibliography entries (for author-date and numerical styles only).\nDefaults to false.",
20872+
{
20873+
short: "If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be\nrendered as hyperlinks.",
20874+
long: "If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be\nrendered as hyperlinks. (If an entry contains a DOI, PMCID, PMID, or\nURL, but none of these fields are rendered by the style, then the title,\nor in the absence of a title the whole entry, will be hyperlinked.)\nDefaults to true."
20875+
}
2084620876
],
2084720877
"schema/external-schemas.yml": [
2084820878
{
@@ -21067,12 +21097,12 @@ var require_yaml_intelligence_resources = __commonJS({
2106721097
mermaid: "%%"
2106821098
},
2106921099
"handlers/mermaid/schema.yml": {
21070-
_internalId: 147223,
21100+
_internalId: 147227,
2107121101
type: "object",
2107221102
description: "be an object",
2107321103
properties: {
2107421104
"mermaid-format": {
21075-
_internalId: 147215,
21105+
_internalId: 147219,
2107621106
type: "enum",
2107721107
enum: [
2107821108
"png",
@@ -21088,7 +21118,7 @@ var require_yaml_intelligence_resources = __commonJS({
2108821118
exhaustiveCompletions: true
2108921119
},
2109021120
theme: {
21091-
_internalId: 147222,
21121+
_internalId: 147226,
2109221122
type: "anyOf",
2109321123
anyOf: [
2109421124
{

src/resources/editor/tools/yaml/web-worker.js

Lines changed: 35 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/resources/editor/tools/yaml/yaml-intelligence-resources.json

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8284,6 +8284,31 @@
82848284
"short": "JSON file containing abbreviations of journals that should be used in formatted bibliographies.",
82858285
"long": "JSON file containing abbreviations of journals that should be\nused in formatted bibliographies when `form=\"short\"` is\nspecified. The format of the file can be illustrated with an\nexample:\n\n```json\n{ \"default\": {\n \"container-title\": {\n \"Lloyd's Law Reports\": \"Lloyd's Rep\",\n \"Estates Gazette\": \"EG\",\n \"Scots Law Times\": \"SLT\"\n }\n }\n}\n```\n"
82868286
}
8287+
},
8288+
{
8289+
"name": "link-citations",
8290+
"schema": "boolean",
8291+
"tags": {
8292+
"formats": [
8293+
"$pdf-all",
8294+
"docx"
8295+
]
8296+
},
8297+
"description": "If true, citations will be hyperlinked to the corresponding bibliography entries (for author-date and numerical styles only). Defaults to false."
8298+
},
8299+
{
8300+
"name": "link-bibliography",
8301+
"schema": "boolean",
8302+
"tags": {
8303+
"formats": [
8304+
"$pdf-all",
8305+
"docx"
8306+
]
8307+
},
8308+
"description": {
8309+
"short": "If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be rendered as hyperlinks.",
8310+
"long": "If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be rendered as hyperlinks. (If an entry contains a DOI, PMCID, PMID, or URL, but none of \nthese fields are rendered by the style, then the title, or in the absence of a title the whole entry, will be hyperlinked.) Defaults to true.\n"
8311+
}
82878312
}
82888313
],
82898314
"schema/document-render.yml": [
@@ -12396,8 +12421,8 @@
1239612421
"Write standard visual editor markdown from source mode.",
1239712422
"Reference writing options for visual editor",
1239812423
"Location to write references (<code>block</code>,\n<code>section</code>, or <code>document</code>)",
12399-
"Unique prefix for references (<code>none</code> to prevent automatic\nprefixes)",
1240012424
"Write markdown links as references rather than inline.",
12425+
"Unique prefix for references (<code>none</code> to prevent automatic\nprefixes)",
1240112426
"The identifier for this publication.",
1240212427
"The identifier value.",
1240312428
"The identifier schema (e.g.&nbsp;<code>DOI</code>, <code>ISBN-A</code>,\netc.)",
@@ -13818,7 +13843,12 @@
1381813843
"long": "Title of the volume of the item or container holding the item.\nAlso use for titles of periodical special issues, special sections,\nand the like."
1381913844
},
1382013845
"Disambiguating year suffix in author-date styles (e.g.&nbsp;“a” in “Doe,\n1999a”).",
13821-
"internal-schema-hack"
13846+
"internal-schema-hack",
13847+
"If true, citations will be hyperlinked to the corresponding\nbibliography entries (for author-date and numerical styles only).\nDefaults to false.",
13848+
{
13849+
"short": "If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be\nrendered as hyperlinks.",
13850+
"long": "If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be\nrendered as hyperlinks. (If an entry contains a DOI, PMCID, PMID, or\nURL, but none of these fields are rendered by the style, then the title,\nor in the absence of a title the whole entry, will be hyperlinked.)\nDefaults to true."
13851+
}
1382213852
],
1382313853
"schema/external-schemas.yml": [
1382413854
{
@@ -14043,12 +14073,12 @@
1404314073
"mermaid": "%%"
1404414074
},
1404514075
"handlers/mermaid/schema.yml": {
14046-
"_internalId": 147223,
14076+
"_internalId": 147227,
1404714077
"type": "object",
1404814078
"description": "be an object",
1404914079
"properties": {
1405014080
"mermaid-format": {
14051-
"_internalId": 147215,
14081+
"_internalId": 147219,
1405214082
"type": "enum",
1405314083
"enum": [
1405414084
"png",
@@ -14064,7 +14094,7 @@
1406414094
"exhaustiveCompletions": true
1406514095
},
1406614096
"theme": {
14067-
"_internalId": 147222,
14097+
"_internalId": 147226,
1406814098
"type": "anyOf",
1406914099
"anyOf": [
1407014100
{

src/resources/schema/document-references.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,18 @@
9696
}
9797
}
9898
```
99+
- name: link-citations
100+
schema: boolean
101+
tags:
102+
formats: [$pdf-all, docx]
103+
description: If true, citations will be hyperlinked to the corresponding bibliography entries (for author-date and numerical styles only). Defaults to false.
104+
105+
- name: link-bibliography
106+
schema: boolean
107+
tags:
108+
formats: [$pdf-all, docx]
109+
description:
110+
short: If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be rendered as hyperlinks.
111+
long: |
112+
If true, DOIs, PMCIDs, PMID, and URLs in bibliographies will be rendered as hyperlinks. (If an entry contains a DOI, PMCID, PMID, or URL, but none of
113+
these fields are rendered by the style, then the title, or in the absence of a title the whole entry, will be hyperlinked.) Defaults to true.

0 commit comments

Comments
 (0)