Template:Varserif/doc: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
 
Line 23: Line 23:
{| class="wikitable" style="background-color: white;"
{| class="wikitable" style="background-color: white;"
|-
|-
! Case !! What you type !! What you see
! Case !! What you type !! What you see !! Comment
|-
|-
| Basic use || {{tlc|varserif|variable}} || {{varserif|variable}}
| Basic use || {{tlc|varserif|variable}} || {{varserif|variable}} ||
|-
|-
| In inline text || If {{tlc|varserif|E}} = {{tlc|varserif|m c{{sup|2}}}}, then what is F? || If {{varserif|E}} = {{varserif|m c{{sup|2}}}}, then what is F?
| In inline text || If {{tlc|varserif|E}} = {{tlc|varserif|m c{{sup|2}}}}, then what is F? || If {{varserif|E}} = {{varserif|m c{{sup|2}}}}, then what is F? ||
|-
| Wiki-formatting || {{tlc|varserif|<nowiki>You ''can'' '''use''' {{sup|wiki}} <big>markup</big></nowiki>}} || {{varserif|You ''can'' '''use''' {{sup|wiki}} <big>markup</big>}} || Italic is preset and <br>can't be inverted.
|}
|}



Latest revision as of 14:57, 4 January 2015

Edit-copy green.svg
This is a documentation subpage for Template:Varserif.
It contains usage information, categories and other content that is not part of the original template page.

Usage

{{varserif}} is a front-end for the HTML element <var>, which is used to denote a variable, and styles the input text in a serif font.

Parameters

There is only 1 parameter, which is unnamed and required.

Syntax

The template's syntax is

  • {{varserif|custom text}}

Required parameter

1

Custom text

The variable you wish to enclose in <var> tags and style.

Usage
  • {{varserif|1}}

Examples

Correct use

Case What you type What you see Comment
Basic use {{varserif|variable}} variable
In inline text If {{varserif|E}} = {{varserif|m c2}}, then what is F? If E = m c2, then what is F?
Wiki-formatting {{varserif|You ''can'' '''use''' {{sup|wiki}} <big>markup</big>}} You can use wiki markup Italic is preset and
can't be inverted.

See also

  • {{var}}: inserts <var> tags, without any additional styling.
  • {{abbr}}: inserts <abbr> tags to include a tooltip explanation of an abbreviation.
  • {{bdi}}: inserts <bdi> tags to allow for inline changes in text direction.
  • {{bdo}}: inserts <bdo> tags, forcing inline changes in text direction.
  • {{code}}: inserts <code> tags.
  • {{mark}}: inserts <mark> tags, highlighting the enclosed text.
  • {{samp}}: inserts <samp> tags.