Difference between revisions of "Help:ABC extensions syntax"

From "A B C"
Jump to navigation Jump to search
Line 59: Line 59:
 
 
 
 
  
 +
;Collapsible elements
 +
 +
<nowiki>
 +
<div class="mw-collapsible mw-collapsed" data-expandtext="Expand for poem" data-collapsetext="Collapse" style="width:40%; border:solid 1px; background-color:#F6FFE6; padding:10px;">
 +
'''The Road Not Taken'''&nbsp;&nbsp;&nbsp;&nbsp;<small>''Robert Frost''</small> 
 +
<div class="mw-collapsible-content">
 +
Two roads diverged in a yellow wood,<br />And sorry I could not travel both<br />
 +
    [...]
 +
I took the one less traveled by,<br />And that has made all the difference.
 +
</div>
 +
</div></nowiki>
 +
 +
<div class="mw-collapsible mw-collapsed" data-expandtext="Expand for poem" data-collapsetext="Collapse" style="width:40%; border:solid 1px; background-color:#F6FFE6; padding:10px;">'''The Road Not Taken'''&nbsp;&nbsp;&nbsp;&nbsp;<small>''Robert Frost''</small> 
 +
<div class="mw-collapsible-content">
 +
Two roads diverged in a yellow wood,<br />And sorry I could not travel both<br />And be one traveler, long I stood<br />And looked down one as far as I could<br />To where it bent in the undergrowth;<br />&nbsp;<br />Then took the other, as just as fair,<br />And having perhaps the better claim<br />Because it was grassy and wanted wear,<br />Though as for that the passing there<br />Had worn them really about the same,<br />&nbsp;<br />And both that morning equally lay<br />In leaves no step had trodden black.<br />Oh, I marked the first for another day!<br />Yet knowing how way leads on to way<br />I doubted if I should ever come back.<br />&nbsp;<br />I shall be telling this with a sigh<br />Somewhere ages and ages hence:<br />Two roads diverged in a wood, and I,<br />I took the one less traveled by,<br />And that has made all the difference.
 +
</div>
 
</div>
 
</div>

Revision as of 02:11, 21 September 2012

Extension Syntax

Several extension use special syntax. This is a synopsis.



LST

LST (Labeling a section for transclusion)
<section begin=exercises />
...
<section end=exercises />


LST (Transcluding a labeled section)
{{#lst:Transcriptome|exercises}}
Common sections are: reading and exercises.


Syntax Highlight

'GeSHI

<source lang="R"> yadda <- "yadda" #yadda</source>
 yadda <- as.character("yadda") #yadda
  • lang="??"
  • line="GESHI_NORMAL_LINE_NUMBERS|GESHI_FANCY_LINE_NUMBERS"
  • line start="??"
  • highlight="??"
  • enclose="pre|div|none" ... (div induces wrapping))


Pubmedparser

{{#pmid:12345678}}
This inserts the article information in a <div>, formatted by Template:Pubmed.
{{#pmid: 15289071 |Steipe2004}}
This formats the output for the Cite extension; A footnote mark will be inserted at the edit location and the actual reference will appear beneath the <references /> section of the page.

Cite

Inserting a footnote
<ref>A note in ref tags will insert a footnote mark,
 linked to the text in the <references /> section of the page.</ref>

Misc.

Inserting a Web-site box
{{WWW|WWW_UniProt}} 


Inserting a Web-link box
<div class="reference-box">[http://www.ncbi.nlm.nih.gov]</div>


A link to Wikipedia

Mutual Information

 {{WP|Mutual information|'''Mutual Information'''}}

 

Collapsible elements
 <div class="mw-collapsible mw-collapsed" data-expandtext="Expand for poem" data-collapsetext="Collapse" style="width:40%; border:solid 1px; background-color:#F6FFE6; padding:10px;">
 '''The Road Not Taken'''    <small>''Robert Frost''</small>  
 <div class="mw-collapsible-content">
 Two roads diverged in a yellow wood,<br />And sorry I could not travel both<br />
     [...]
 I took the one less traveled by,<br />And that has made all the difference. 
 </div>
 </div>
The Road Not Taken    Robert Frost

Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;
 
Then took the other, as just as fair,
And having perhaps the better claim
Because it was grassy and wanted wear,
Though as for that the passing there
Had worn them really about the same,
 
And both that morning equally lay
In leaves no step had trodden black.
Oh, I marked the first for another day!
Yet knowing how way leads on to way
I doubted if I should ever come back.
 
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I,
I took the one less traveled by,
And that has made all the difference.