Ohje:Muotoilu
| Huomautus: Muokkaamalla tätä sivua hyväksyt, että tuottamasi sisältö julkaistaan CC0 -lisenssillä. Katso lisätietoja Public Domain -ohjesivulta. |
Tekstin muotoilu on mahdollista käyttämällä wikimerkintäkieltä, jossa esimerkiksi asteriskeilla, heittomerkeillä ja yhtäsuuruusmerkeillä on erityisiä omimaisuuksia. Esimerkiksi kursivoidaksesi sanan lisää sen alkuun ja loppuun kaksi heittomerkkiä seuraavanlaisesti: ''sana''.
Tekstin muotoilun merkintäkieli
| Kuvaus | Mitä kirjoitat | Mitä saat |
|---|---|---|
| Tekstin muotoilu – toimii kaikkialla | ||
| Kursivointi | ''kursivoitu''
|
kursivoitu |
| Lihavointi | '''lihavoitu'''
|
lihavoitu |
| Lihavoitu kursiivi | '''''lihavoitu kursiivi'''''
|
lihavoitu kursiivi |
| Ohita wikimerkintäkielen muotoilut | <nowiki>ei [[wiki]]merkintäkielen ''muotoilua''</nowiki>
|
ei [[wiki]]merkintäkielen ''muotoilua'' |
| Section formatting – toimii vain rivin alussa | ||
| Eritasoisia otsikkoja | == Taso 2 ==
=== Taso 3 ===
==== Taso 4 ====
===== Taso 5 =====
====== Taso 6 ======
|
Taso 2Taso 3Taso 4Taso 5Taso 6 |
| Vaakaviiva | Teksti ensin
----
Teksti jälkeen
|
Teksti ensin Teksti jälkeen |
| Luettelo luettelomerkein |
* Aloita jokainen rivi
* [[Wikipedia:asterisk|asteriskimerkillä]] (*).
** Asteriskeja lisäämällä luettelo syvenee
*** ja syvenee
* Rivinvaihdot<br />eivät riko luettelon etenemistä
*** Mutta jonkin tietyn asteriskimäärän ohittaminen järjestyksessä rikkoo.
Mikä tahansa muunlainen teksti päättää luettelon.
* combine bullet list
** with definition
:: - definition
** creates empty space
* combine bullet list
** with definition
*: - definition
** without empty spaces
* bullet list
: - definition
:* sublist that doesn't create empty
:* spaces after definition
|
Mikä tahansa muunlainen teksti päättää luettelon.
|
| Numeroitu lista |
# Aloita jokainen rivi
# [[w:fi:Ristikkomerkki|ristikkomerkillä]] (#).
## Ristikkomerkkejä lisäämällä luettelo syvenee
### ja syvenee
# Rivinvaihdot<br />eivät riko luettelon etenemistä
### Mutta jonkin tietyn ristikkomäärän ohittaminen järjestyksessä rikkoo.
# Tyhjä rivi
# lopettaa luettelon etenemisen ja aloittaa uuden.
Myös mikä tahansa muunlainen teksti päättää luettelon.
<nowiki>#</nowiki> use "nowiki" tags to display a literal (#) at the beginning of a line without interpreting it as a numbered list.
|
Myös mikä tahansa muunlainen teksti päättää luettelon. # use "nowiki" tags to display a literal (#) at the beginning of a line without interpreting it as a numbered list. |
| Määritelmälista | ;kohde 1
: määritelmä 1
;kohde 2
: määritelmä 2-1
: määritelmä 2-2
At the end of the line, if the line begins with a semicolon (;), any inserted colon (:) will not be displayed. If you want for the colon to be displayed, escape it by writing
:. |
|
| Description details without description terms | : Description details
:: Nested description details
::::: Deeply nested description details
This is often used as a workaround for indenting the line, but it will harm accessibility and produce invalid HTML output. Using CSS for visual indentation is a far more preferable approach (e.g. {{Indent}}).
|
|
| Useiden eri luettelotyyppien sekoitus | # yks
# kaks
#* kaks alakohta yks
#* kaks alakohta kaks
# kolme
#; kolme kohta yks
#: kolme määr yks
# neljä
#: neljä määr yks
#: this looks like a continuation
#: and is often used
#: instead <br> of <br>
# viis
## viis luettelon alakohta 1
### viis luettelon alakohdan 1 alakohta 1
## viis luettelon alakohta 2
The usage of
#: and *: for breaking a line is as problematic as the usage of single :. |
|
| Esimuotoiltu teksti | Aloita jokainen rivi yhdellä ylimääräisellä välilyönnillä.
Teksti on '''esimuotoiltua''' ja
'''merkintäkielen muotoilut''' '''''toimivat'''''.
This way of preformatting only applies to section formatting. Character formatting markups are still effective.
|
Aloita jokainen rivi yhdellä ylimääräisellä välilyönnillä. Teksti on esimuotoiltua ja merkintäkielen muotoilut toimivat. |
| Preformatted text blocks | <nowiki>Start with a space in the first column,
(before the <nowiki>).
Then your block format will be
maintained.
This is good for copying in code blocks:
def function():
"""documentation string"""
if True:
print True
else:
print False</nowiki>
|
Start with a space in the first column,
(before the <nowiki>).
Then your block format will be
maintained.
This is good for copying in code blocks:
def function():
"""documentation string"""
if True:
print True
else:
print False
|
Kappaleet
MediaWiki ei hyväksy yksittäisiä rivinvaihtoja uuden kappaleen aloittamiseksi. Aloittaaksesi uuden kappaleen jätä yksi kokonaan tyhjä rivi. Voit pakottaa rivinvaihdon kappaleen sisällä HTML-tagilla <br />.
HTML-tagit
Osa HTML-tägeistä toimii myös MediaWikissä. Niitä ovat muuan muassa <code>, <div> sekä <span>. Ne toimivat kaikkialla minne niitä lisäätkin.
| Kuvaus | Mitä kirjoitat | Mitä saat |
|---|---|---|
| Inserted (Näkyy useimmissa selaimissa alleviivauksena) |
<ins>Lisätty</ins>
tai
<u>Alleviivattu</u>
|
Lisätty tai Alleviivattu |
| Poistettu (Näkyy useimmissa selaimissa yliviivauksena) |
<s>Yliviivattu</s>
tai
<del>Poistettu</del>
|
tai
|
| Teksti kiinteällä leveydellä | <code>Lähdekoodi</code>
|
Lähdekoodi
|
| Lohkolainaukset | Teksti ensin
<blockquote>Lohkolainaus</blockquote>
Teksti jälkeen
If the quote contains multiple paragraphs the tags need to be on separate lines to display properly, i.e.:
<blockquote>
Ensimmäinen kappale.
Toinen kappale.
</blockquote>
|
Teksti ensin
Teksti jälkeen |
| Sitaatit | <q>Tämä on sitaatti</q>
Q-elementtiä ei saa käyttää lainausmerkkien tilalla, jos kyseessä ei ole lainaus. Esimerkiksi on asiatonta käyttää q-elementtiä sarkastisisten ilmaisujen merkitsemiseen. [1]
|
Tämä on sitaatti |
| Kommentti | Kommentit näkyvät vain muokkauskentässä.
|
Kommentit näkyvät vain muokkauskentässä. |
| Täysin esimuotoiltu teksti | <pre>
Teksti on '''esimuotoiltu''' ja
''merkintäkielen muotoilut'' '''''eivät toimi'''''
</pre>
For marking up of preformatted text, check the "Preformatted text" entry at the end of the previous table.
|
Teksti on '''esimuotoiltu''' ja ''merkintäkielen muotoilut'' '''''eivät toimi''''' |
| Paranneltu esimuotoiltu teksti | <pre style="color: red">
Teksti on '''esimuotoiltu'''
tyylimäärittelyllä ja
''merkintäkielen muotoilut'' '''''eivät toimi'''''
</pre>
CSS-tyyli voidaan nimetä
style-attribuutilla. |
Teksti on '''esimuotoiltu''' tyylimäärittelyllä ja ''merkintäkielen muotoilut'' '''''eivät toimi''''' |
jatkuu:
| Kuvaus | Mitä kirjoitat | Mitä saat |
|---|---|---|
Default preformatted text has a CSS attribute (white-space: pre-wrap;) to wrap the text according to available width
|
<pre>
Tämä pitkä lause on tarkoitettu tekstin rivityksen havainnollistamiseksi. Tämä ylimääräinen lause tekee tekstistä vielä pidemmän. Tämä ylimääräinen lause tekee tekstistä vielä pidemmän.
</pre>
|
Tämä pitkä lause on tarkoitettu tekstin rivityksen havainnollistamiseksi. Tämä ylimääräinen lause tekee tekstistä vielä pidemmän. Tämä ylimääräinen lause tekee tekstistä vielä pidemmän. |
| Customized preformatted text with disabled text wrapping | <pre style="white-space: pre;">
Tämä pitkä lause on tarkoitettu tekstin rivityksen havainnollistamiseksi. Tämä ylimääräinen lause tekee tekstistä vielä pidemmän. Tämä ylimääräinen lause tekee tekstistä vielä pidemmän.
</pre>
|
Tämä pitkä lause on tarkoitettu tekstin rivityksen havainnollistamiseksi. Tämä ylimääräinen lause tekee tekstistä vielä pidemmän. Tämä ylimääräinen lause tekee tekstistä vielä pidemmän. |
The full list of recognized tags is given on Help:HTML in wikitext.
Symbolien lisääminen
Symbols and other special characters not available on your keyboard can be inserted in a multitude of ways. Many operating systems and browsers allow to insert special characters through a menu option or operating system panel. Additionally, you can use the WikiEditor or VisualEditor to insert them into the edit screen.
As a last resort, you can use a special sequence of characters. Those sequences are called HTML character references. For example:
- the rightwards arrow symbol (
→) can be displayed using the→sequence - an em dash (
—) can be displayed using—.
| Á | á | Â | â | ´ | Æ | æ | À | à | ℵ | Α | α | & | ∧ | ∠ | Å | å | ≈ | Ã | ã | Ä | ä | „ | Β | β | ¦ | • | ∩ | Ç | ç | ¸ | ¢ |
| Χ | χ | ˆ | ♣ | ≅ | © | ↵ | ∪ | ¤ | † | ‡ | ↓ | ⇓ | ° | Δ | δ | ♦ | ÷ | É | é | Ê | ê | È | è | ∅ | Ε | ε | ≡ | Η | η | ||
| Ð | ð | Ë | ë | € | ∃ | ƒ | ∀ | ½ | ¼ | ¾ | ⁄ | Γ | γ | ≥ | > | ↔ | ⇔ | ♥ | … | Í | í | Î | î | ¡ | Ì | ì | ℑ | ∞ | ∫ | Ι | ι |
| ¿ | ∈ | Ï | ï | Κ | κ | Λ | λ | ⟨ | « | ← | ⇐ | ⌈ | “ | ≤ | ⌊ | ∗ | ◊ | | ‹ | ‘ | < | ¯ | — | µ | · | − | Μ | μ | ∇ | – | |
| ≠ | ∋ | ¬ | ∉ | ⊄ | Ñ | ñ | Ν | ν | Ó | ó | Ô | ô | Œ | œ | Ò | ò | ‾ | Ω | ω | Ο | ο | ⊕ | ∨ | ª | º | Ø | ø | Õ | õ | ⊗ | Ö |
| ö | ¶ | ∂ | ‰ | ⊥ | Φ | φ | Π | π | ϖ | ± | £ | ′ | ″ | ∏ | ∝ | Ψ | ψ | " | √ | ⟩ | » | → | ⇒ | ⌉ | ” | ℜ | ® | ⌋ | Ρ | ρ | |
| › | ’ | ‚ | Š | š | ⋅ | § | | Σ | σ | ς | ∼ | ♠ | ⊂ | ⊆ | ∑ | ⊃ | ¹ | ² | ³ | ⊇ | ß | Τ | τ | ∴ | Θ | θ | ϑ | Þ | þ | ˜ | |
| × | ™ | Ú | ú | ↑ | ⇑ | Û | û | Ù | ù | ¨ | ϒ | Υ | υ | Ü | ü | ℘ | Ξ | ξ | Ý | ý | ¥ | ÿ | Ÿ | Ζ | ζ | | |
| Kuvaus | Mitä kirjoitat | Mitä saat |
|---|---|---|
| Tekijänoikeusmerkki | © |
|
| Kreikkalainen delta-kirjain | δ |
|
| Euron valuuttasymboli | € |
|
See the list of all HTML entities on the Wikipedia article List of HTML entities. Additionally, MediaWiki supports two non-standard entity reference sequences: &רלמ; and &رلم; which are both considered equivalent to ‏ which is a right-to-left mark. (Used when combining right to left languages with left to right languages in the same page.)
HTML tags and symbol entities displayed themselves (with and without interpreting them)
&euro;→ €<span style="color: red; text-decoration: line-through;">Kirjoitusvirhe korjattava</span>→ Kirjoitusvirhe korjattava<span style="color: red; text-decoration: line-through;">Kirjoitusvirhe korjattava</span>→ <span style="color: red; text-decoration: line-through;">Kirjoitusvirhe korjattava</span>
Nowiki for HTML
<nowiki /> can prohibit (HTML) tags:
- <<nowiki/>pre> → <pre>
But not & symbol escapes:
- &<nowiki/>amp; → &
To print & symbol escapes as text, use "&" to replace the "&" character (eg. type "&nbsp;", which results in " ").
Muunlaisia muotoiluja
Beyond the text formatting markup shown hereinbefore, here are some other formatting references:
- Language converter markup – see Writing systems/Syntax
- References – see Extension:Cite
- Taulukot
- Manual:Collapsible_elements
You can find more references at Ohje:Sisällys.