Template:Ic: Difference between revisions

From Bibliotheca Anonoma
No edit summary
m (Protected "Template:Ic" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
{{Note|By default, PHP highlighting is used, though it's pretty neutral.}}
{{Note|By default, PHP highlighting is used, though it's pretty neutral.}}


<pre><nowiki>{{Ic|hello moto}}</nowiki></pre>
<pre><nowiki>{{Ic|hello world}}</nowiki></pre>


{{Ic|hello moto}}
{{Ic|hello world}}


=== Syntax Highlighting ===
=== Syntax Highlighting ===
Line 18: Line 18:
By specifying the language to use, you can get syntax highlighting as well. Here's a [[mw:Extension:SyntaxHighlight#Supported_languages|long list of supported languages.]]
By specifying the language to use, you can get syntax highlighting as well. Here's a [[mw:Extension:SyntaxHighlight#Supported_languages|long list of supported languages.]]


<pre><nowiki>{{Ic|print "hello moto"|lang=python}}</nowiki></pre>
<pre><nowiki>{{Ic|print "hello world"|lang=python}}</nowiki></pre>


{{Sandbox|print "hello moto"|lang=python}}
{{Sandbox|print "hello world"|lang=python}}


{{Tip|When representing keyboard keys, you can use [[Wikipedia:List of XML and HTML character entity references|HTML entities]] {{ic|&amp;uarr;}}, {{ic|&amp;rarr;}}, {{ic|&amp;darr;}} and {{ic|&amp;larr;}} to depict arrow keys: {{ic|&uarr;}}, {{ic|&rarr;}}, {{ic|&darr;}}, {{ic|&larr;}}}}
{{Tip|When representing keyboard keys, you can use [[Wikipedia:List of XML and HTML character entity references|HTML entities]] {{ic|&amp;uarr;}}, {{ic|&amp;rarr;}}, {{ic|&amp;darr;}} and {{ic|&amp;larr;}} to depict arrow keys: {{ic|&uarr;}}, {{ic|&rarr;}}, {{ic|&darr;}}, {{ic|&larr;}}}}

Latest revision as of 12:33, 5 March 2017

This page is a template. It contains no Bibliotheca Anonoma-related information, but should be used as part of other articles. For more information, read Help:Template.

Please do not experiment with this template; you could ruin all pages using this template. If you want to edit this template, copy the text to Template:Sandbox, edit and test it there, and copy it back when it works.

Feel free to voice your opinion regarding this template.

Inline code.

Usage

Note: By default, PHP highlighting is used, though it's pretty neutral.
{{Ic|hello world}}

hello world

Syntax Highlighting

By specifying the language to use, you can get syntax highlighting as well. Here's a long list of supported languages.

{{Ic|print "hello world"|lang=python}}

print "hello world"

Tip: When representing keyboard keys, you can use HTML entities &amp;uarr;, &amp;rarr;, &amp;darr; and &amp;larr; to depict arrow keys: &uarr;, &rarr;, &darr;, &larr;

Example

code