Help:ABC extensions syntax
Extension Syntax
This is a synopsis of special extensions and template syntax on this Wiki.
LST
Using this markup, you can arbitrarily label sections from other pages and transclude them into the current page. This is not just convenient, it is essential to avoid duplicating text that will not get consistently updated if it exists multiple times on the Wiki.
- LST (Labeling a section for transclusion)
<section begin=section-name /> ... <section end=section-name />
- LST (Transcluding a labeled section)
{{#lst:Page-name|section-name}}
- Example
Entia non sunt ponenda praeter necessitatem. (Occam)
Entia non sunt ponenda praeter necessitatem. (Occam)
Syntax Highlight
<source lang="R">y <- as.character("yadda"); 2* y #yadda yadda</source>
y <- as.character("yadda"); 2* y #yadda yadda
- lang="??"
- line="GESHI_NORMAL_LINE_NUMBERS|GESHI_FANCY_LINE_NUMBERS"
- line start="??"
- highlight="??"
- enclose="pre|div|none" ... (div induces wrapping))
Pubmedparser
{{#pmid:15289071}}
- This inserts the article information in a
<div>
, formatted by Template:Pubmed.
Steipe (2004) Consensus-based engineering of protein stability: from intrabodies to thermostable enzymes. Meth Enzymol 388:176-86. (pmid: 15289071) |
{{#pmid: 15289071 |Steipe2004}}
- This formats the pubmed parser output for the Cite extension; A footnote mark will be inserted here[1] and the actual reference will appear beneath the
<references />
section of the page. Multiple citations of the same reference can use the same template, or equivalently use<ref name="Steipe2004" />
.
Non-Pubmed pdf
If the article is not on PubMed use Template:PDF. Upload the article to the repository, enter bibliographic details and make sure file
the filename is unique with full extension.
{{PDF |authors= |year= |title= |journal= |volume= |pages= |URL= |doi= |file= |abstract= }}
Ambrish, R. & Zhang, Y. (2012) Protein Structure Prediction. Encyclopedia of Life Sciences |
(pmid: None) [ Source URL ] Abstract |
Non-Pubmed DOI
If the article is copyrighted, don't post the PDF but use Template:DOI. Enter bibliographic details in particular DOI
and/or URL
.
{{DOI |authors= |year= |title= |journal= |volume= |pages= |url= |doi= |abstract= }}
Duncan J Murdoch, Yu-Ling Tsai & James Adcock (2008) P-Values are Random Variables. The American Statistician 62:3:242-245. (pmid: None) |
[ DOI ] Abstract |
Cite
- Inserting a footnote
- A note in :<ref>:</ref> tags will insert a footnote mark, linked to the text in the <references /> section of the page.
This is the text<ref>And this is the footnote:</ref>.
This is the text[2].
Use <ref name="some-name">Text ...</ref>
for the first of multiple citations of the same reference; then use <ref name="some-name" /ref>
for subsequent citations.
For more options, see here.
Misc.
raw HTML
Once $wgRawHtml = true;
has been set, raw HTML can be used in <html>...</html>
tags (https://www.mediawiki.org/wiki/Manual:$wgRawHtml).
This allows to put Google Docs in iFrames (https://wcmshelp.ucsc.edu/advanced/embedding-google/index.html):
CC-BY
{{CC-BY}}
This copyrighted material is licensed under a Creative Commons Attribution 4.0 International License. Follow the link to learn more.
PDFInclude
<pdf>http://steipe.biochemistry.utoronto.ca/abc/CourseMaterials/BCH441/02-SequenceData_2014.pdf</pdf> <pdf width="300px" height="400px">http://steipe.biochemistry.utoronto.ca/abc/CourseMaterials/BCH441/02-SequenceData_2014.pdf</pdf>
Math markup
<math>H = - \sum_{i=0}^n p_i \log_{2} p_i</math>
Inserting a Web-site box
Boxes for Web site summaries, image and abstract
{{WWW|WWW_UniProt}}
UniProt [ link ] [ page ] Expand... | ![]() |
Inserting an emphasis box
<div class="emphasis-box">Getting the data model right is the key to eternal bliss.</div>
Inserting a Web-link box
<div class="reference-box">[http://www.ncbi.nlm.nih.gov '''The NCBI''']</div>
Linking text to R documentation
Code |
Result | |||
---|---|---|---|---|
base function only: | {{R|mean()}} |
mean() |
||
base function with different linked text: | {{R|mean()|the '''mean()''' function}} |
the mean() function |
||
package (note: no parentheses ): | {{R|knitr}} |
knitr |
||
function in non-base package: | {{R|graphics|par()}} |
par() |
||
function with different text: | {{R|grDevices|colorRamp()|colorRampPalette()}} |
colorRampPalette() |
Create link to online R documentation. If a name is followed by ()
it's a function, otherwise a package. If a package is given alone, link to the package documentation, otherwise to the package/function page. The base package is default, other packages can be chosen with the template's second parameter. If a third parameter is present, that will be the linked text. All documentation is pulled from rdocumentation.org and this should include CRAN as well as bioconductor packages.
Linking text to Wikipedia
{{WP|Mutual information|'''Mutual Information'''}}
Collapsible elements
See: Manual: Collapsible elements
<div class="mw-collapsible mw-collapsed" data-expandtext="Expand" data-collapsetext="Collapse" style="width:50%; "> * Visible text <div class="mw-collapsible-content" style="padding:10px;"> * Collapsed text 1 * Collapsed text 2 * Collapsed text 3 </div> </div>