Template:PDFCite/doc: Difference between revisions
Created page with " <templatedata> { "params": { "file": { "label": "URL to the PDF file", "description": "A fully qualified URL to the PDF file.", "example": "https://domain.tld/filename.pdf", "type": "url", "required": true }, "citation": { "label": "Text of citation", "description": "The cited passage in plain text.", "type": "string", "required": true }, "page": { "label": "Page number", "description": "A number of page in the PDF file that c..." |
No edit summary |
||
(25 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<templatedata> | <templatedata> | ||
{ | { | ||
Line 32: | Line 31: | ||
"type": "unbalanced-wikitext", | "type": "unbalanced-wikitext", | ||
"default": "PDF", | "default": "PDF", | ||
"required": | "required": false, | ||
"description": "It will become a clickable text or html element. If you want to display the citation text on the wiki page, type 'quote' here (without quotes)." | |||
}, | |||
"tooltip": { | |||
"label": "Tooltip text", | |||
"description": "Text shown on hovering over the link. If not provided, the URL of the PDF file will be shown.", | |||
"type": "string" | |||
} | } | ||
}, | }, | ||
Line 38: | Line 43: | ||
} | } | ||
</templatedata> | </templatedata> | ||
;Code | |||
<pre> | |||
{{PDFCite | |||
|file= | |||
|citation= | |||
|page= | |||
|text= | |||
|color= | |||
}} | |||
</pre> | |||
;Example | |||
<pre> | |||
{{PDFCite | |||
|file=https://wikivisor.com/w/images/3/34/Peer_adult_network_structure_and_suicide_attempts_in_38_high_schools.pdf | |||
|citation=(b) Mean number of friends named, and (c) Mean coreness. Table 1 describes school-level variables and each school’s network structure relative to all others (e.g., percent isolates ranged 0–6.45% across the 38 schools) | |||
|page=3 | |||
|color=33eeff | |||
}} | |||
</pre> | |||
;Result | |||
{{PDFCite | |||
|file=https://wikivisor.com/w/images/3/34/Peer_adult_network_structure_and_suicide_attempts_in_38_high_schools.pdf | |||
|citation=(b) Mean number of friends named, and (c) Mean coreness. Table 1 describes school-level variables and each school’s network structure relative to all others (e.g., percent isolates ranged 0–6.45% across the 38 schools) | |||
|page=3 | |||
|color=33eeff | |||
}} | |||
;Quote mode | |||
{{PDFCite | |||
|file=https://wikivisor.com/w/images/3/34/Peer_adult_network_structure_and_suicide_attempts_in_38_high_schools.pdf | |||
|citation=(b) Mean number of friends named, and (c) Mean coreness. Table 1 describes school-level variables and each school’s network structure relative to all others (e.g., percent isolates ranged 0–6.45% across the 38 schools) | |||
|page=3 | |||
|color=33eeff | |||
|text=quote | |||
}} | |||
;Inline usage | |||
Table 1 describes school-level percent isolates ranged {{PDFCite | |||
|file=https://wikivisor.com/w/images/3/34/Peer_adult_network_structure_and_suicide_attempts_in_38_high_schools.pdf | |||
|citation=(b) Mean number of friends named, and (c) Mean coreness. Table 1 describes school-level variables and each school’s network structure relative to all others (e.g., percent isolates ranged 0–6.45% across the 38 schools) | |||
|page=3 | |||
|color=33eeff | |||
|text=0–6.45% | |||
}} across the 38 schools. | |||
;Local PDF | |||
If the URL belongs to the current wiki domain, the external icon will not be printed: | |||
{{PDFCite | |||
|file={{filepath:CyberTroops-Report19.pdf}} | |||
|citation=In 44 countries, we found evidence of a government agency using computational propaganda to shape public attitudes. | |||
|page=11 | |||
|color=fbab56 | |||
|text=quote | |||
}} | |||
;Visual mode | |||
If you use VisualEditor, you can insert the template interactively (''Insert'' → ''Template'' → ''PDFCite'') and fill parameters in a form. | |||
;Error handling | |||
[https://toolkit.socialnetwork.health/pdfcite/?url=https://toolkit.socialnetwork.health/w/images/8/86/Developmental_Approach_to_Prevent.pdf&page=4&color=33eeff&search=To%20that%20end,%20tools%20should%20be%20developed%20and%20researchers%20should%20be%20encouragedto%20include%20valid%20and%20reliable%20measures%20of%20suicidal%20behavior%20in%20follow-up%20evaluations%20of%20prevention%20programs)#page=4 PDF] |
Latest revision as of 11:01, 3 November 2024
Inserts a link to the PDF file and ensures the highlighting of the provided citation on the given page.
Parameter | Description | Type | Status | |
---|---|---|---|---|
URL to the PDF file | file | A fully qualified URL to the PDF file.
| URL | required |
Text of citation | citation | The cited passage in plain text. | String | required |
Page number | page | A number of page in the PDF file that contains the cited passage. | Number | required |
Highlight color | color | The hex color code without a leading hash.
| String | optional |
Link text | text | It will become a clickable text or html element. If you want to display the citation text on the wiki page, type 'quote' here (without quotes).
| Unbalanced wikitext | optional |
Tooltip text | tooltip | Text shown on hovering over the link. If not provided, the URL of the PDF file will be shown. | String | optional |
- Code
{{PDFCite |file= |citation= |page= |text= |color= }}
- Example
{{PDFCite |file=https://wikivisor.com/w/images/3/34/Peer_adult_network_structure_and_suicide_attempts_in_38_high_schools.pdf |citation=(b) Mean number of friends named, and (c) Mean coreness. Table 1 describes school-level variables and each school’s network structure relative to all others (e.g., percent isolates ranged 0–6.45% across the 38 schools) |page=3 |color=33eeff }}
- Result
- Quote mode
(b) Mean number of friends named, and (c) Mean coreness. Table 1 describes school-level variables and each school’s network structure relative to all others (e.g., percent isolates ranged 0–6.45% across the 38 schools)
- Inline usage
Table 1 describes school-level percent isolates ranged 0–6.45% across the 38 schools.
- Local PDF
If the URL belongs to the current wiki domain, the external icon will not be printed:
In 44 countries, we found evidence of a government agency using computational propaganda to shape public attitudes.
- Visual mode
If you use VisualEditor, you can insert the template interactively (Insert → Template → PDFCite) and fill parameters in a form.
- Error handling