Template:PDFCite: Difference between revisions
Created page with "<includeonly><span class="pdfcite">{{#widget: PDFCite |url={{{file}}} |search={{{citation}}} |page={{{page}}} |color={{{color|}}} |text={{{text|}}} }}</span></includeonly><noinclude> {{{{PAGENAME}}/doc}} </noinclude>" |
No edit summary |
||
Line 5: | Line 5: | ||
|color={{{color|}}} | |color={{{color|}}} | ||
|text={{{text|}}} | |text={{{text|}}} | ||
}}</span></includeonly><noinclude> | }}{{#cargo_attach: _table=PDFCite}}{{#cargo_store: | ||
_table=PDFCite | |||
|File={{{file}}} | |||
|Cite={{{citation}}} | |||
|Page={{{page}}} | |||
}} | |||
</span></includeonly><noinclude> | |||
{{{{PAGENAME}}/doc}} | {{{{PAGENAME}}/doc}} | ||
</noinclude> | </noinclude> |
Revision as of 08:25, 7 May 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
PDFThis template adds rows to the table "PDFCite", which is declared by the template PDFCite Table. View table.
- Quote mode
quoteThis template adds rows to the table "PDFCite", which is declared by the template PDFCite Table. View table.
- Inline usage
Table 1 describes school-level percent isolates ranged 0–6.45%This template adds rows to the table "PDFCite", which is declared by the template PDFCite Table. View table. across the 38 schools.
- Local PDF
If the URL belongs to the current wiki domain, the external icon will not be printed: quoteThis template adds rows to the table "PDFCite", which is declared by the template PDFCite Table. View table.
- Visual mode
If you use VisualEditor, you can insert the template interactively (Insert → Template → PDFCite) and fill parameters in a form.
- Error handling