Справка:Форматирование
![]() |
Внимание: Когда вы редактируете эту страницу, вы соглашаетесь на передачу своего вклада по лицензии CC0. Узнать об этом подробнее можно на странице справки.
|
![]() |
Вы можете форматировать текст с помощью вики-разметки. Она состоит из обычных символов, таких как звездочки, апострофы или знак «равно», иногда, в зависимости от их позиции в тексте, имеющих в вики специальные функции. Например, для форматирования слова курсивом вам надо заключить его в две пары одиночных апострофов — вот ''так''
.
Contents
Разметка для форматирования текста
Описание | Вы вводите | Вы получаете |
---|---|---|
Форматирование символов (в строке) — действует везде | ||
Курсивный текст | ''Курсив'' |
Курсив |
Полужирный текст | '''Полужирный''' |
Полужирный |
Полужирный курсив | '''''Полужирный курсив''''' |
Полужирный курсив |
Отключение вики-разметки | <nowiki>без ''разметки''</nowiki> |
без ''разметки'' |
Форматирование заголовка раздела — только в начале строки | ||
Заголовки разных уровней | == Уровень 2 == === Уровень 3 === ==== Уровень 4 ==== ===== Уровень 5 ===== ====== Уровень 6 ======
|
Уровень 2Уровень 3Уровень 4Уровень 5Уровень 6 |
Горизонтальная черта | Текст до ---- Текст после |
Текст до Текст после |
Маркированный список |
* Начало каждой строки * со звезды [[Wikipedia:asterisk|asterisk]] (*). ** Следующая звезда создаст следующий уровень вложенности *** и еще более глубокий. * Перенос строки <br /> не прерывает уровни вложенности. *** Однако, если пропустить уровень - создастся пустое пространство. Любое другое начало строки, кроме *, закончит создание списка * сочетание маркированного списка ** с определением ::- определение ** создаёт пустое пространство * сочетание маркированного списка ** с определением *:- определение ** без пустого пространства *маркированный список :- определение :* подстановка, которая не создаёт пустые :* пространства после определения |
Любое другое начало строки, кроме *, закончит создание списка
|
Нумерованный список |
# Начинайте каждую строку # со [[Wikipedia:Number_sign|знака решётки]] (#) ## Чем больше знаков решётки, ### Тем большим будет ### отступ. # Перевод строки <br/> не нарушает отступов. ### Но переход через несколько отсупов создаёт пустое пространство. # Пустые строки. # заканчивайте список и начиайте новый. Любое другое начало также заканчивает список. |
Любое другое начало также заканчивает список. |
Список определений | ;пункт 1 : определение 1 ;пункт 2 : определение 2-1 : определение 2-2 |
|
Отступ текста | : Один отступ :: Двойной отступ ::: Много отступов This workaround may harm accessibility.
|
|
Смесь различных типов списков |
# one # two #* two point one #* two point two # three #; three item one #: three def one # four #: four def one #: this looks like a continuation #: and is often used #: instead <br />of <nowiki><br /></nowiki> # five ## five sub 1 ### five sub 1 sub 1 ## five sub 2 The usage of
#: and *: for breaking a line within an item may also harm accessibility. |
|
Преформатированный текст | Каждая строка начинается с пробела. Текст '''преформатирован''' и при этом '''''может''''' включать ''разметку''. This way of preformatting only applies to section formatting. Character formatting markups are still effective.
|
Start each line with a space. Text is preformatted and markups can be done. |
Блоки преформатированного текста | <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 |
Абзацы
MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tag <br />
.
Теги HTML
Some HTML tags are allowed in MediaWiki, for example <code>
, <div>
, and <span>
. These apply anywhere you insert them.
Описание | Вы вводите | Вы получаете |
---|---|---|
Inserted (Displays as underline in most browsers) |
<ins>Inserted</ins> или <u>Underline</u> |
Inserted или Underline |
Deleted (Displays as strikethrough in most browsers) |
<s>Зачёркнутый</s> или <del>Удалённый</del> |
или
|
Моноширинный текст | <code>Исходный код</code> или <code>Моноширинный текст</code> |
или
|
Цитаты | Текст до <blockquote>Цитата</blockquote> Текст после |
Текст до
Текст после |
Quotes | <q>This is a quotation</q> The q element must not be used in place of quotation marks that do not represent quotes; for example, it is inappropriate to use the q element for marking up sarcastic statements.[1]
|
This is a quotation |
Комментарий | <!-- Это комментарий --> Комментарии видны только при редактировании. |
Комментарии видны только в режиме редактирования. |
Полностью преформатированный текст | <pre>Текст '''преформатирован''' и ''разметка'' '''''не применяется'''''</pre> Для преформатированного текста с разметкой смотрите строку Преформатированный текст в конце предыдущей таблицы.
|
Текст '''преформатирован''' и ''разметка'' '''''не применяется''''' |
Customized preformatted text | <pre style="color: red">Text is '''preformatted''' with a style and ''markups'' '''''cannot''''' be done </pre> A CSS style can be named within the
style attribute. |
Text is '''preformatted''' with a style and ''markups'' '''''cannot''''' be done |
continued:
Описание | Вы вводите | Вы получаете |
---|---|---|
Default preformatted text has a CSS attribute (white-space: pre-wrap; ) to wrap the text according to available width
|
<pre> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. </pre> |
This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. |
Customized preformatted text with disabled text wrapping | <pre style="white-space: pre;"> This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. </pre> |
This long sentence is used to demonstrate text wrapping. This additional sentence makes the text even longer. This additional sentence makes the text even longer. |
Вставка символов
Symbols and other special characters not available on your keyboard can be inserted in a multitude of ways. Many Operating Systems and browsers allow you 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 entities. For example, the following sequence (entity) → when inserted will be shown as right arrow HTML symbol → and — when inserted will be shown as an em dash HTML symbol —.
HTML symbol entities | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Á | á | Â | â | ´ | Æ | æ | À | à | ℵ | Α | α | & | ∧ | ∠ | Å | å | ≈ | Ã | ã | Ä | ä | „ | Β | β | ¦ | • | ∩ | Ç | ç | ¸ | ¢ |
Χ | χ | ˆ | ♣ | ≅ | © | ↵ | ∪ | ¤ | † | ‡ | ↓ | ⇓ | ° | Δ | δ | ♦ | ÷ | É | é | Ê | ê | È | è | ∅ | Ε | ε | ≡ | Η | η | ||
Ð | ð | Ë | ë | € | ∃ | ƒ | ∀ | ½ | ¼ | ¾ | ⁄ | Γ | γ | ≥ | > | ↔ | ⇔ | ♥ | … | Í | í | Î | î | ¡ | Ì | ì | ℑ | ∞ | ∫ | Ι | ι |
¿ | ∈ | Ï | ï | Κ | κ | Λ | λ | 〈 | « | ← | ⇐ | ⌈ | “ | ≤ | ⌊ | ∗ | ◊ | | ‹ | ‘ | < | ¯ | — | µ | · | − | Μ | μ | ∇ | – | |
≠ | ∋ | ¬ | ∉ | ⊄ | Ñ | ñ | Ν | ν | Ó | ó | Ô | ô | Œ | œ | Ò | ò | ‾ | Ω | ω | Ο | ο | ⊕ | ∨ | ª | º | Ø | ø | Õ | õ | ⊗ | Ö |
ö | ¶ | ∂ | ‰ | ⊥ | Φ | φ | Π | π | ϖ | ± | £ | ′ | ″ | ∏ | ∝ | Ψ | ψ | " | √ | 〉 | » | → | ⇒ | ⌉ | ” | ℜ | ® | ⌋ | Ρ | ρ | |
› | ’ | ‚ | Š | š | ⋅ | § | | Σ | σ | ς | ∼ | ♠ | ⊂ | ⊆ | ∑ | ⊃ | ¹ | ² | ³ | ⊇ | ß | Τ | τ | ∴ | Θ | θ | ϑ | Þ | þ | ˜ | |
× | ™ | Ú | ú | ↑ | ⇑ | Û | û | Ù | ù | ¨ | ϒ | Υ | υ | Ü | ü | ℘ | Ξ | ξ | Ý | ý | ¥ | ÿ | Ÿ | Ζ | ζ | | |
Описание | Вы вводите | Вы получаете |
---|---|---|
Copyright symbol | © |
|
Greek delta letter symbol | δ |
|
Символ евро | € |
|
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;">Typo to be corrected</span>
→ Typo to be corrected
<span style="color: red; text-decoration: line-through;">Typo to be corrected</span>
→ <span style="color: red; text-decoration: line-through;">Typo to be corrected</span>
Nowiki для 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 "
").
Другие вопросы форматирования
Beyond the text formatting markup shown hereinbefore, here are some other formatting references:
- Справка:Ссылки
- Справка:Списки
- Справка:Изображения
- References - see Extension:Cite/Cite.php
- Tables
You can find more references at Help:Contents.