Difference between revisions of "Template:Double underline/doc"

From blackwiki
Jump to navigation Jump to search
imported>DVdm
m (Reverted edits by Costalfy (talk) unexplained removal of content (HG))
imported>Frietjes
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->
  
 
=== Usage ===
 
=== Usage ===
Line 7: Line 7:
  
 
A second parameter can be added to specify the color (in name or in hex code, defaults to <code>#000</code>), for example,  
 
A second parameter can be added to specify the color (in name or in hex code, defaults to <code>#000</code>), for example,  
  &lt;span style="color:red;"&gt;Hello {<nowiki />{du|world}}!&lt;/span&gt;
+
  &lt;span style="color:red;"&gt;Hello {<nowiki />{double underline|world}}!&lt;/span&gt;
yields <blockquote><span style="color:red;">Hello {{du|world}}!</span></blockquote>whereas
+
yields <blockquote><span style="color:red;">Hello {{double underline|world}}!</span></blockquote>whereas
  &lt;span style="color:red;"&gt;Hello {<nowiki />{du|world|red}}!&lt;/span&gt;
+
  &lt;span style="color:red;"&gt;Hello {<nowiki />{double underline|world|red}}!&lt;/span&gt;
yields the better-looking <blockquote><span style="color:red;">Hello {{du|world|red}}!</span></blockquote>
+
yields the better-looking <blockquote><span style="color:red;">Hello {{double underline|world|red}}!</span></blockquote>
  
 
For strings within certain {{tl|lang}} templates (such as zh), strings within <code>&lt;big&gt;</code> tags or <code>&lt;code&gt;</code> tags, and some others, this may show up as a thick underline instead of a double underline (depending on your browser settings):
 
For strings within certain {{tl|lang}} templates (such as zh), strings within <code>&lt;big&gt;</code> tags or <code>&lt;code&gt;</code> tags, and some others, this may show up as a thick underline instead of a double underline (depending on your browser settings):
  {<nowiki />{lang|zh|好好儿学习,{<nowiki />{du|天天}}向上!}}
+
  {<nowiki />{lang|zh|好好儿学习,{<nowiki />{double underline|天天}}向上!}}
yields <blockquote>{{lang|zh|好好儿学习,{{du|天天}}向上!}}</blockquote>
+
yields <blockquote>{{lang|zh|好好儿学习,{{double underline|天天}}向上!}}</blockquote>
  &lt;big&gt;Hello {<nowiki />{du|world}}!&lt;/big&gt;
+
  &lt;big&gt;Hello {<nowiki />{double underline|world}}!&lt;/big&gt;
yields <blockquote><big>Hello {{du|world}}!</big></blockquote>
+
yields <blockquote><big>Hello {{double underline|world}}!</big></blockquote>
  
 
=== See also ===
 
=== See also ===
  
 
<includeonly>
 
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
<!-- CATEGORIES HERE, THANKS -->
 
[[Category:Wikipedia formatting and function templates]]
 
[[Category:Wikipedia formatting and function templates]]
 
</includeonly>
 
</includeonly>

Revision as of 21:40, 14 October 2013

Usage

Template:Shortcuts First suggested by User:Kwamikagami [1], this template creates a double underline/underscore beneath a string, instead of a single one. It may be used in cases where a single underline is confusing, such as when underlining CJK characters.

A second parameter can be added to specify the color (in name or in hex code, defaults to #000), for example,

<span style="color:red;">Hello {{double underline|world}}!</span>

yields

Hello world!

whereas

<span style="color:red;">Hello {{double underline|world|red}}!</span>

yields the better-looking

Hello world!

For strings within certain {{lang}} templates (such as zh), strings within <big> tags or <code> tags, and some others, this may show up as a thick underline instead of a double underline (depending on your browser settings):

{{lang|zh|好好儿学习,{{double underline|天天}}向上!}}

yields

好好儿学习,天天向上!

<big>Hello {{double underline|world}}!</big>

yields

Hello world!

See also