Jump to content

Help:Syntax: Difference between revisions

From SeptemWiki
Line 130: Line 130:


<pre>[[File:filename.extension|options|caption]]</pre>
<pre>[[File:filename.extension|options|caption]]</pre>
There can be more than one option, separated by vertical bars.  If a caption is used, it's the last thing in the list.


Here's a demonstration of the most useful options:
Here's a demonstration of the most useful options:


{|class="wikitable"
{|class="wikitable"
!Description
!Description and Syntax
!Syntax
!Demo
!Demo
|-
|-
| Thumbnail with caption, width specified, floating off to the right of the text.
| Thumbnail with caption, width specified, floating off to the right of the text.
| <pre>[[File:Sideling_Hill_West.jpg|thumb|200px|Sideling Hill, 200 pixels wide]]
<pre>[[File:Sideling_Hill_West.jpg|thumb|200px|Sideling Hill, 200 pixels wide]]</pre>
Lorem ipsum dolor sit hic amet nonummy. </pre>
| [[File:Sideling_Hill_West.jpg|thumb|200px|Sideling Hill, 200 pixels wide]]
| [[File:Sideling_Hill_West.jpg|thumb|200px|Sideling Hill, 200 pixels wide]] Lorem ipsum dolor sit hic amet nonummy.  
|-
| As above, but with height specified. Note the '''x''' in front of pixel specifier.
<pre>[[File:Sideling_Hill_West.jpg|thumb|x50px|Sideling Hill, 50 pixels high]]</pre>
| [[File:Sideling_Hill_West.jpg|thumb|x50px|Sideling Hill, 50 pixels high]]
|-
| If you specify both height and width, the picture's aspect ratio is preserved even if you pick sizes of the wrong ratio.  The smaller dimension you picked "wins."
<pre>[[File:Sideling_Hill_West.jpg|thumb|1000x20px|Sideling Hill just 20 pixels tall]]</pre>
| [[File:Sideling_Hill_West.jpg|thumb|1000x20px|Sideling Hill just 20 pixels tall]]
|-
| Add the '''left''' option to float the image to the left of the page.
<pre>[[File:Sideling_Hill_West.jpg|thumb|left|1000x20px|Tiny on the left]]</pre>
| [[File:Sideling_Hill_West.jpg|thumb|left|1000x20px|Tiny on the left]]
|-
| You can use '''frame''' instead of '''thumb''' for bigger images, if you dare.  '''frame''' ignores any size specification you put into the syntax.  The picture may still be smaller than its actual uploaded size, but only if the user's preferences are set for a maximum size.
<pre>[[File:Sideling_Hill_West.jpg|frame|Sideling Hill]]</pre>
| We're not showing you what that actually looks like, because it's gigantic.  The tunnel isn't shown actual size, but it may as well be.
|-
| Without the '''frame''' or '''thumb''' options, the caption doesn't show up.  Also it's not floating to the right or left anymore, but is inline with text.
<pre>[[File:Sideling_Hill_West.jpg|100px|Sideling Hill, 100 pixels wide]] blah blah blah ...</pre>
| blah blah [[File:Sideling_Hill_West.jpg|100px|Sideling Hill, 100 pixels wide]] blah blah ...
|-
| But if you let the image be inline, you can use the '''baseline, sub, super, top, text-top, middle, bottom,''' or '''text-bottom''' options to change the vertical alignment of the image relative to the text it's in.
<pre>[[File:Sideling_Hill_West.jpg|100px|baseline]] blah blah blah ...</pre>
| blah blah [[File:Sideling_Hill_West.jpg|100px|baseline]] blah blah ...
|}
|}



Revision as of 18:08, 19 March 2016

This is a handy guide to the most common bits of Wiki syntax you may want to use.

Basic text formatting markup

Desired Result Description Example
Italic Text Two single quotes on each side
''Italic Text''
Bold Text Three single quotes on each side
'''Bold Text'''
Bold and Italic Five single quotes on each side
'''''Bold and Italic'''''
Strikethru The "strike" tag
<strike>Strikethru</strike>
Preformatted text
The "pre" tag
<pre>Preformatted text</pre>

Headlines and Table of Contents

Note: In order for headline syntax to be parsed, it must be placed at the beginning of a line, with no spaces before it.

To create a headline for a section, start and end the line with a number of equals signs. The number of signs determines the level of the headline.

Level 1 headlines are used for page titles themselves. Please do not use them in pages.

== Main page sections are Level 2 ==

=== Subsections are level 3 ===

==== You can go to level 6 but beyond 4 is pushing it ====

When a page contains four or more headlines, a Table of Contents is automatically generated for it. If you wish to suppress this, put the magic word __NOTOC__ somewhere in the page. (That's two underscores on either side of the letters.)

Lists

Like headlines, the special characters for lists must occur at the beginning of a line, with no spaces. The characters are asterisks for bullets and number/hash/pound signs for numbering. A simple and more complex example are shown below.

  • Bulleted list item
    • Sub-item
  • Item
  • Item
    • Sub-item
      • Sub-sub-item
  • Item
* Bulleted list item
** Sub-item
* Item
* Item
** Sub-item
*** Sub-sub-item
* Item
  1. Numbered list item
    • Bulleted Sub-item
    • Bulleted Sub-item
  2. Numbered Item
    • Bulleted Sub-item
      1. Numbered Sub-sub-item
      2. Numbered Sub-sub-item
  3. Item
# Numbered list item
#* Bulleted Sub-item
#* Bulleted Sub-item
# Numbered Item
#* Bulleted Sub-item
#*# Numbered Sub-sub-item
#*# Numbered Sub-sub-item
# Item

Links

Type of Link Description Example Syntax
A page inside this wiki, with the link text the same as the page title Enclose the article title in a double pair of square brackets ... visit Sideling Hill Tunnel for ...
... visit [[Sideling Hill Tunnel]] for ...
A page inside this wiki, with the link text different than the page title Same as above, but after the article title, put a vertical bar followed by the link text ... at the tunnel, we found ...
... at [[Sideling Hill Tunnel|the tunnel]], we found ...
A page outside this wiki, with an automatically generated numbered link The full URL in a single pair of square brackets ... site is [1], and it ...
... site is [http://www.google.com/], and it ...
A page outside this wiki, with some desired link text The full URL in a single pair of square brackets, followed by a space, and then the link text ... site is the well-known search engine, and it ...
... site is [http://www.google.com/ the well-known search engine], and it ...
An external link with the little "external link" icon suppressed Enclose the external link in
<span class="plainlinks">...</span>
... site is the well-known search engine, and it ...
... site is <span class="plainlinks">[http://www.google.com/ the well-known search engine]</span>, and it ...

Images

The syntax for an image is:

[[File:filename.extension|options|caption]]

There can be more than one option, separated by vertical bars. If a caption is used, it's the last thing in the list.

Here's a demonstration of the most useful options:

Description and Syntax Demo
Thumbnail with caption, width specified, floating off to the right of the text.
[[File:Sideling_Hill_West.jpg|thumb|200px|Sideling Hill, 200 pixels wide]]
Sideling Hill, 200 pixels wide
As above, but with height specified. Note the x in front of pixel specifier.
[[File:Sideling_Hill_West.jpg|thumb|x50px|Sideling Hill, 50 pixels high]]
Sideling Hill, 50 pixels high
If you specify both height and width, the picture's aspect ratio is preserved even if you pick sizes of the wrong ratio. The smaller dimension you picked "wins."
[[File:Sideling_Hill_West.jpg|thumb|1000x20px|Sideling Hill just 20 pixels tall]]
Sideling Hill just 20 pixels tall
Add the left option to float the image to the left of the page.
[[File:Sideling_Hill_West.jpg|thumb|left|1000x20px|Tiny on the left]]
Tiny on the left
You can use frame instead of thumb for bigger images, if you dare. frame ignores any size specification you put into the syntax. The picture may still be smaller than its actual uploaded size, but only if the user's preferences are set for a maximum size.
[[File:Sideling_Hill_West.jpg|frame|Sideling Hill]]
We're not showing you what that actually looks like, because it's gigantic. The tunnel isn't shown actual size, but it may as well be.
Without the frame or thumb options, the caption doesn't show up. Also it's not floating to the right or left anymore, but is inline with text.
[[File:Sideling_Hill_West.jpg|100px|Sideling Hill, 100 pixels wide]] blah blah blah ...
blah blah Sideling Hill, 100 pixels wide blah blah ...
But if you let the image be inline, you can use the baseline, sub, super, top, text-top, middle, bottom, or text-bottom options to change the vertical alignment of the image relative to the text it's in.
[[File:Sideling_Hill_West.jpg|100px|baseline]] blah blah blah ...
blah blah blah blah ...

The <nowiki> tag

If you want to ''demonstrate '''bits''' of wiki syntax '''without''' it actually being processed'', as we just did there, enclose your example in the <nowiki>...</nowiki> tag:

<nowiki>''Demonstrate '''bits''' of wiki syntax '''without''' it actually being processed''</nowiki>