Template:PDFCite: Difference between revisions

From Toolkit.Socialnetwork.Health
No edit summary
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span class="pdfcite">{{#widget: PDFCite
<includeonly>{{#ifeq:{{{text|}}}
|url={{{file}}}
    |quote
|search={{{citation}}}
    |
|page={{{page}}}
<div class="pdfquote">
|color={{{color|}}}
  <div class="cite pdfcite">{{#widget: PDFCite
|text={{{text|}}}
    |url={{{file}}}
}}<!--
    |search={{{citation}}}
    |page={{{page}}}
    |color={{{color|}}}
    |text={{int:pdfcite-prompt}}
    |tooltip={{{tooltip|{{{file}}}}}}
    |class={{#ifeq: {{#explode:{{{file}}}|/|2}}|{{#explode:{{SERVER}}|/|2}}|plainlinks|external}}
  }}
  </div>
  <blockquote>
{{{citation}}}
  </blockquote>
</div>
    |<span class="cite pdfcite">{{#widget: PDFCite
        |url={{{file}}}
        |search={{{citation}}}
        |page={{{page}}}
        |color={{{color|}}}
        |text={{{text|{{int:pdfcite-prompt}}}}}
        |tooltip={{{tooltip|{{{file}}}}}}
        |class={{#ifeq: {{#explode:{{{file}}}|/|2}}|{{#explode:{{SERVER}}|/|2}}|plainlinks|external}}
      }}</span>
  }}<!--


-->{{#cargo_store:_table=PDFCite
-->{{#cargo_store:_table=PDFCite
Line 11: Line 32:
     |Cite={{{citation}}}
     |Cite={{{citation}}}
     |Page={{{page}}}
     |Page={{{page}}}
   }}</span></includeonly><noinclude>
   }}</includeonly><noinclude>
{{#cargo_attach:_table=PDFCite}}
{{#cargo_attach:_table=PDFCite}}
{{{{PAGENAME}}/doc}}
{{{{PAGENAME}}/doc}}
</div>
</div>
</noinclude>
</noinclude>

Latest revision as of 19:19, 7 May 2024

This template adds rows to the table "PDFCite", which is declared by the template PDFCite Table. View table.

Inserts a link to the PDF file and ensures the highlighting of the provided citation on the given page.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
URL to the PDF filefile

A fully qualified URL to the PDF file.

Example
https://domain.tld/filename.pdf
URLrequired
Text of citationcitation

The cited passage in plain text.

Stringrequired
Page numberpage

A number of page in the PDF file that contains the cited passage.

Numberrequired
Highlight colorcolor

The hex color code without a leading hash.

Example
FFEEDD
Stringoptional
Link texttext

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).

Default
PDF
Unbalanced wikitextoptional
Tooltip texttooltip

Text shown on hovering over the link. If not provided, the URL of the PDF file will be shown.

Stringoptional
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

PDF

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 (InsertTemplatePDFCite) and fill parameters in a form.

Error handling

PDF