Help:Примеры вики-текста
| Примечание: Редактируя эту страницу, вы соглашаетесь на передачу своего вклада по лицензии CC0. Подробнее — в проекте Помощь с общественным достоянием. |
Форматирование вики-текста
| Rendering | Wikitext |
|---|---|
| Emphasize (italics), strongly (bold), very strongly (bold italics).
(These are double and triple apostrophes, not double quotes.) Note: this can also be applied to links (e.g., Wikipedia). |
''Emphasize'', '''strongly''',
'''''very strongly'''''.
''[[Wikipedia]]''
|
The use of italic and bold fonts is beneficial in mathematical calculations where specific font styles are needed instead of emphasis.
(Most people disregard the fact that these two approaches differ in a way that is not particularly significant for graphical browsers.) However, it can have a significant impact on those who are blind. |
The use of <i>italic</i> and <b>bold</b> fonts is beneficial in mathematical calculations where specific font styles are needed instead of emphasis.
: <b>F</b> = <i>m</i><b>a</b>
|
| You can write in small caps | You can write <span style="font-variant:small-caps">in small caps</span>
|
The typewriter font that is occasionally used for technical terms and computer code.
|
The typewriter font that is occasionally used for <kbd>technical terms</kbd> and <code>computer code</code>.
|
| For captions, you can use small text. | For captions, you can use <small>small text</small>.
|
| Deleted material can be You can also denote
|
Deleted material can be <s>struck out</s> and new material can be <u>underlined</u>.
You can also denote <del>deleted material</del> and <ins>inserted material</ins> with the respective tags, preserving their semantic meaning, rather than relying solely on visual cues like strikethrough and underline.
|
| Subscript: m2 Superscript: m2 or m² Many browsers find it simpler to format lines containing the HTML entity ² (²) rather than using the 2 HTML tag for representing superscripted text. |
Subscript: m<sub>2</sub><br />
Superscript: m<sup>2</sup> or m²
ε<sub>0</sub> =
8.85 × 10<sup>−12</sup>
C² / J m.
<br /><br />
1 [[hectare]] = [[1 E4 m²]]
|
Организация работы
| Rendering | Wikitext |
|---|---|
Drafting sections and subsectionsBegin a section with a header line
|
== A section ==
=== A sub-section ===
==== Another sub-subsection ====
|
|
This is a line.
This is still part of the same paragraph.
This is a paragraph.<p>This is a continuation of the paragraph. But it appears after an empty line due to the <p> and </p> tags.</p>
This is a line.<div>This is another line appearing as a second new paragraph instead of a third paragraph due to the <div> and </div> tags.</div>
|
|
Lines can be broken <br/> without beginning another paragraph.
|
A line starting without a star marks the end of the list.
Now you are ready to create well-structured unordered lists. |
* Start a line with asterisks (<code>*</code>) to create the first item in an unordered list.
** Use two asterisks for a sub-item.
*** Increase the number of asterisks for deeper levels.
* Each line break signifies a new item in the list.
A line starting without a star marks the end of the list.
* You can start over with a new list
Now you are ready to create well-structured unordered lists.
|
A line starting without a hashtag marks the end of the list.
|
# Use a hashtag (<code>#</code>) at the beginning of each line to signify the order.
## Use two hashtags (<code>##</code>) for a sub-item.
## Continue numbering to maintain the sequence and logical flow of information.
# Add a new line between each item for improved readability.
A line starting without a hashtag marks the end of the list.
# An ordered list starts with 1.
# Then 2, etc.
|
|
* This mixed list begins with an unordered list (<code>*</code>).
*# To create a subitem of an ordered list under an unordered list use an asterisk and a hashtag (<code>*#</code>).
*#* To create a deeper sub-item of an unordered list within an ordered list, add another asterisk (<code>*#*</code>).
*#* You can also break <br/> lines in a list.
|
|
A definition list consists of a series of term-definition pairs.
Signifying one item per line is most suitable, rather than adding a new line before the colon ( |
; Wiki
: A wiki (/ˈwɪki/ ⓘ WI-kee) is a form of online hypertext publication that is collaboratively edited and managed by its own audience directly through a web browser. See [[w:Wiki]].
; Web Browser
: A web browser is an application for accessing websites. See [[w:Web browser]]
|
IndentationA paragraph is indented when a colon (
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}}).
|
: An indented line.
A new line starts a new non-indented paragraph.
|
A blockquoteA blockquote style is used to highlight a specific section of text from an external source or to distinguish it from the surrounding content.
|
<blockquote>
This is a blockquote. It is used to highlight quoted text or separate specific content.
</blockquote>
|
Horizontal dividing lineThe horizontal dividing line on a wiki page is represented by four or more consecutive hyphens (
|
Text above dividing line
----
Text below dividing line
|
Создание ссылок
Часто вам понадобится добавлять кликабельные ссылки на другие страницы.
| Rendering | Wikitext |
|---|---|
BasicsYou are reading the documentation. |
You are reading the [[documentation]].
|
Basics + Text formattingLinks can be italicized e.g.: |
''[[MediaWiki]]''
|
Interwiki linksThese link to another wiki that covers related or similar topics.
|
This interwiki link points to [[w:Documentation]] on Wikipedia.
Its Esperanto word equivalent is [[:eo:Dokumentaro]].
|
Links to sectionsYou can link to a specific section of an existing page by adding a pound ( If no such section exists then the link points to the beginning of the page. If a page has multiple sections with the same name, specifying the rank of the section with a number at the end. (e.g., if there are three sections titled "Section title" and you want to link to the third, use [[#Section title 3]]). See Help:Editing FAQ. |
[[Help:Special pages#Editing Special namespace pages|Help:Special pages]]
|
|
Create a link label using a pipe symbol ( The above produces About links, linked to the article Help:Link. |
* [[Help:Link|About links]]
|
Blank link labelUsing a blank link label will automatically fill in an appropriate link label. I.e. |
* Parentheses: [[kingdom (biology)|]].
* Colon: [[Help:Pipe|]].
|
Links to pages that don't exist
To create the page, you can click on the link. See Справка:Создание новой страницы (and the naming conventions of your project, if there are). |
A link to a page which does not exist (like [[Foo|this one]]) is colored in red.
|
RedirectsYou can create a redirect by adding the wikitext at the beginning of the page. See Справка:Перенаправления. #REDIRECT [[United States of America]]
|
#REDIRECT [[United States of America]]
|
Magic linksMagic links enable users to generate links automatically by typing specific keywords.
These are deprecated and generally should not be used. |
* ISBN 0131103629 * RFC 234 |
|
[[media:Test.ogg|Audio]]
|
Category linksCategory links direct users to a specific category page (without categorizing the page into that category). To achieve this, a syntax similar to that of links is used, but with a colon ( |
[[:Category:Documentation]] |
Special pagesSpecial pages are created by the wiki software. They are accessed through the Special namespace. You can create links to special pages like "What links here" using the following format: See Справка:Служебные страницы for other special pages. |
[[Special:Whatlinkshere/Help:Editing]] |
Links to previous revisions of a page, differences (diffs), and particular history pagesTo link to an old revision, diff, or particular history pages, avoid using the standard wiki-link syntax like Linking to previous revisions of a pageTo share an old page version of a wiki, copy the URL from the page's history and paste it where you want to share it.
You can also use Special:PermaLink to do this, i.e Special:PermaLink/6364084 Linking to diffs:To link to page differences between two revisions, copy and paste the specific URL of the page containing the diff of the compared pages.
You can also use Special:Diff to do this, i.e Special:Diff/6364333/6364084 Linking to a specific page from edit historyNavigate to the edit history and select the |
https://www.mediawiki.org/w/index.php?title=Help:Cite&oldid=6364084 https://www.mediawiki.org/w/index.php?title=Help%3ACite&diff=6364333&oldid=6364084 https://www.mediawiki.org/w/index.php?title=Help:Cite&action=history&offset=20170210105218%7C2391706&limit=100 |
Точное отображение текста
Несколько способов форматирования помогут вики отобразить текст в точности так, как вы его набрали.
| Отобразит | Вики-текст |
|---|---|
| The nowiki tag prevents [[Wiki]] ''markup'' from rendering. It adjusts text by eliminating newlines and multiple spaces. It still processes special characters: → | <nowiki>
The nowiki tag prevents
[[Wiki]] ''markup'' from rendering.
It adjusts text by
eliminating
newlines and multiple
spaces.
It still processes special
characters: →
</nowiki>
|
The pre tag bypasses [[Wiki]] ''markup''. It also maintains text format. It still recognizes special characters: → |
<pre>
The pre tag bypasses [[Wiki]]
''markup''.
It also maintains text
format.
It still recognizes special
characters: →
</pre>
|
|
Leading spaces offer another method to keep formatting. Inserting a space at the start of each line keeps the text as is. It still processes Wiki markup and special characters: → |
Leading spaces offer another method to keep formatting.
Inserting a space at the
start of each
line keeps the text
as is. It still
processes [[Wiki]]
''markup'' and special
characters: →
|
Отображение кода
С доступным расширением выделения синтаксиса можно вывести исходный код - как и через HTML-тег <pre>, но с лучшим, редактороподобным выделением.
См. список поддерживаемых языков:
http://pygments.org/languages/
Пример вывода кода на C#:
<syntaxhighlight lang="csharp">
// «Привет, Мир!» на Microsoft C# ("C-Sharp").
using System;
class HelloWorld
{
public static int Main(String[] args)
{
Console.WriteLine("Привет, Мир!");
return 0;
}
}
</syntaxhighlight>
Выглядит так:
// «Привет, Мир!» на Microsoft C# ("C-Sharp").
using System;
class HelloWorld
{
public static int Main(String[] args)
{
Console.WriteLine("Привет, Мир!");
return 0;
}
}
Использование изображений, таблиц, видео и аудио
Подробнее см.
- Справка:Изображения - файлы и изображения
- Справка:Таблицы - таблицы
После загрузки файла введите его название, выделите его и нажмите «встроенное изображение» на панели редактирования. Таким будет синтаксис вставки:
[[Image:filename.png]]
| Результат: | Вики-текст: | ||||
|---|---|---|---|---|---|
| Изображение с альтернативным текстом:
Изображение в рамке с подписью: |
Изображение с альтернативным текстом:
[[Image:Wiki.png|Логотип этой вики]]
Изображение в рамке с подписью:
[[Image:Wiki.png|frame|Логотип этой вики]]
| ||||
| Ссылка на галерею MediaWiki:
Прямая ссылка на изображение: Media:Wiki.png |
Ссылка на галерею MediaWiki:
[[:Image:Wiki.png]]
Прямая ссылка на изображение:
[[Media:Wiki.png]]
| ||||
| Через тег media: можно вставить аудио- или видеофайлы напрямую: | Через тег '''media:''' можно вставить аудио- или видеофайлы напрямую:
[[media:Classical guitar scale.ogg|Аудио]]
| ||||
| Включить в шаблон озвученную версию текста (через {{Listen}}): | Включить в шаблон озвученную текста (напрямую):
{{listen
|title = Flow, my tears
|filename = Flow, my tears.ogg
|filesize = 1.41 MB
}}
| ||||
|<center><span style="border:5px double black">'''Текст в рамке'''</span></center>
|
| |||||
|
{| style="margin: auto; border: 10px solid black; border-spacing: 5px;"
|-
! style="padding: 10px;" | This
! style="padding: 10px;" | is
|-
| style="padding: 10px;" | a
| style="padding: 10px;" | table
|}
|
Галереи
Изображения можно собирать в галереи через тег <gallery>. К примеру:
-
Подпись
-
Подпись может содержать ссылку.
Математические формулы
Для отображения математических формул можно воспользоваться TeX-разметкой.
| Отобразит | Вики-текст |
|---|---|
<math>\sum_{n=0}^\infty \frac{x^n}{n!}</math>
|
Шаблоны
Шаблоны — это фрагменты вики-разметки, которые можно автоматически скопировать («включить») на страницу. Добавить их можно, прописав название шаблона в {{двойных фигурных скобках}}. Чтобы включить страницы из других пространств, воспользуйтесь {{: двоеточием и двойными фигурными скобками}}. Некоторые шаблоны принимают параметры, разделенные символом вертикальной черты.
| Результат: | Вики-текст: |
|---|---|
|
This is a short demo text from the Wikitext examples/transclusion demo sub-page. |
{{Help:Wikitext examples/transclusion demo}}
|
| Этот шаблон принимает параметр и возвращает его дважды:
Привет, Мир!Привет, Мир! |
Этот шаблон принимает параметр и возвращает его дважды:
{{2x|Привет, Мир!}}
|
