wiki:syntax
Различия
Показаны различия между двумя версиями страницы.
| Предыдущая версия справа и слеваПредыдущая версия | |||
| wiki:syntax [2026/03/18 15:18] – перевод admin | wiki:syntax [2026/10/11 22:09] (текущий) – внешнее изменение 127.0.0.1 | ||
|---|---|---|---|
| Строка 1: | Строка 1: | ||
| - | ====== | + | ====== |
| - | [[doku> | + | [[doku> |
| - | ===== Базовое форматирование текста | + | ===== Basic Text Formatting |
| - | DokuWiki | + | DokuWiki |
| - | DokuWiki | + | DokuWiki |
| - | | + | |
| - | Вы также можете использовать < | + | Note that the formatting markers have to directly enclose the text, so '' |
| - | Вы также можете использовать | + | You can use <sub>subscript</ |
| - | Можно пометить текст как | + | You can use <sub>subscript</sub> and < |
| - | Можно пометить текст как | + | You can mark something as <del>deleted</ |
| - | **Параграфы** создаются пустыми строками. Если вы хотите **вставить перенос строки** без создания параграфа, | + | You can mark something as < |
| - | Это текст с переносами строк\\ Обратите внимание, что | + | **Paragraphs** are created from blank lines. If you want to **force a newline** without a paragraph, you can use two backslashes followed by a whitespace or the end of line. |
| - | два обратных слэша распознаются только в конце строки\\ | + | |
| - | или если за ними следует\\ пробел \\без него не сработает. | + | |
| - | Это текст с переносами строк\\ Обратите внимание, | + | This is some text with some linebreaks\\ Note that the |
| - | | + | two backslashes are only recognized at the end of a line\\ |
| - | | + | or followed by\\ a whitespace |
| - | Используйте принудительные переносы только при необходимости. | + | This is some text with some linebreaks\\ Note that the |
| + | two backslashes are only recognized at the end of a line\\ | ||
| + | or followed by\\ a whitespace \\this happens without it. | ||
| - | ===== Ссылки ===== | + | You should use forced newlines only if really needed. |
| - | DokuWiki поддерживает несколько способов создания ссылок. | + | ===== Links ===== |
| - | ==== Внешние ==== | + | DokuWiki supports multiple ways of creating links. |
| - | Внешние ссылки распознаются автоматически: | + | ==== External ==== |
| - | DokuWiki поддерживает несколько способов создания ссылок. Внешние ссылки распознаются | + | External links are recognized automagically: http:// |
| - | автоматически: http:// | + | |
| - | текст ссылки: [[http:// | + | |
| - | почты вроде | + | |
| - | ==== Внутренние ==== | + | DokuWiki supports multiple ways of creating links. External links are recognized |
| + | automagically: | ||
| + | link text as well: [[http:// | ||
| + | addresses like this one: < | ||
| - | Внутренние ссылки создаются с помощью квадратных скобок. Можно указать просто [[pagename]] или использовать [[pagename|текст ссылки]]. | + | ==== Internal ==== |
| - | Внутренние ссылки создаются с помощью квадратных скобок. Можно указать просто | + | Internal links are created by using square brackets. You can either just give a [[pagename]] |
| - | | + | |
| - | [[doku>pagename|Имена страниц]] автоматически преобразуются в нижний регистр, | + | Internal links are created by using square brackets. You can either just give |
| + | a [[pagename]] or use an additional | ||
| - | Можно использовать | + | [[doku> |
| - | Можно использовать | + | You can use [[some: |
| - | Подробнее о пространствах имён см. [[doku>namespaces]]. | + | You can use [[some:namespaces]] |
| - | Можно ссылаться на конкретный раздел, | + | For details about namespaces see [[doku> |
| - | Эта ссылка ведёт на [[syntax# | + | Linking to a specific section is possible, too. Just add the section name behind a hash character as known from HTML. This links to [[syntax# |
| - | Примечания: | + | This links to [[syntax# |
| - | * Ссылки на [[syntax|существующие страницы]] отображаются иначе, чем на [[nonexisting|несуществующие]]. | + | Notes: |
| - | * DokuWiki по умолчанию не использует [[wp> | + | |
| - | * Если заголовок раздела изменится, | + | |
| - | ==== Интервики ==== | + | * Links to [[syntax|existing pages]] are shown in a different style from [[nonexisting]] ones. |
| + | * DokuWiki does not use [[wp> | ||
| + | * When a section' | ||
| - | DokuWiki поддерживает ссылки [[doku>Interwiki]]. Это быстрые ссылки на другие вики. Например, | + | ==== Interwiki |
| - | | + | DokuWiki |
| - | Например: [[wp> | + | |
| - | ==== Windows‑ресурсы ==== | + | DokuWiki supports [[doku> |
| + | For example this is a link to Wikipedia' | ||
| - | Ресурсы | + | ==== Windows |
| - | Ресурсы | + | Windows |
| - | Примечания: | + | Windows Shares like [[\\server\share|this]] are recognized, too. |
| - | * По соображениям безопасности прямой доступ к Windows‑ресурсам работает только в Internet Explorer (и только в «локальной зоне»). | + | Notes: |
| - | * В Mozilla/ | + | |
| - | <code - conf/ | + | |
| - | <?php | + | |
| - | /** | + | |
| - | * Настройка английского языкового файла | + | |
| - | * Копируйте только строки, | + | |
| - | */ | + | |
| - | $lang[' | + | |
| - | </ | + | |
| - | ==== Ссылки‑картинки | + | * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone" |
| + | * For Mozilla and Firefox it can be enabled through different workaround mentioned in the [[http:// | ||
| + | <?php | ||
| + | /** | ||
| + | * Customization of the english language file | ||
| + | * Copy only the strings that needs to be modified | ||
| + | */ | ||
| + | $lang[' | ||
| + | </ | ||
| + | |||
| + | ==== Image Links ==== | ||
| - | Можно использовать изображение как ссылку, | + | You can also use an image to link to another internal or external page by combining the syntax for links and [[# |
| [[http:// | [[http:// | ||
| Строка 102: | Строка 103: | ||
| [[http:// | [[http:// | ||
| - | Учтите: форматирование изображения — единственный вид форматирования, | + | Please note: The image formatting is the only formatting syntax accepted in link names. |
| - | Поддерживается весь синтаксис | + | The whole [[# |
| - | ===== Сноски | + | ===== Footnotes |
| - | Вы можете добавлять сноски | + | You can add footnotes |
| - | | + | |
| - | ===== Разделение | + | ===== Sectioning |
| - | Можно использовать до пяти уровней заголовков. Если заголовков больше трёх, автоматически создаётся оглавление — его можно отключить, | + | You can use up to five different levels of headlines to structure your content. If you have more than three headlines, a table of contents is generated automatically -- this can be disabled by including the string |
| - | ==== Заголовок уровня | + | ==== Headline Level 3 ==== |
| - | === Заголовок уровня | + | === Headline Level 4 === |
| - | == Заголовок уровня | + | == Headline Level 5 == |
| - | ==== Заголовок уровня | + | ==== Headline Level 3 ==== |
| - | === Заголовок уровня | + | === Headline Level 4 === |
| - | == Заголовок уровня | + | == Headline Level 5 == |
| - | Четыре или более дефисов создают горизонтальную линию: | + | By using four or more dashes, you can make a horizontal line: |
| ---- | ---- | ||
| - | ===== Медиафайлы | + | ===== Media Files ===== |
| - | Можно вставлять внешние и внутренние | + | You can include external and internal |
| - | Исходный размер: | + | Real size: {{wiki: |
| - | Изменить ширину: | + | Resize to given width: {{wiki: |
| - | Изменить ширину и высоту((если пропорции не совпадают, изображение будет обрезано)): {{wiki: | + | Resize to given width and height((when the aspect ratio of the given width and height doesn' |
| - | Внешнее изображение с изменением размера: {{https:// | + | Resized external image: {{https:// |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | Пробелы слева/ | + | |
| + | By using left or right whitespaces you can choose the alignment. | ||
| {{ wiki: | {{ wiki: | ||
| Строка 157: | Строка 159: | ||
| {{ wiki: | {{ wiki: | ||
| - | Можно добавить заголовок | + | You can also set the alignment explicitly with a ''? |
| + | |||
| + | {{wiki: | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | Of course, you can add a title (displayed as a tooltip by most browsers), too. | ||
| - | {{ wiki: | + | {{ wiki: |
| - | {{ wiki: | + | {{ wiki: |
| - | См. [[#Image Links]] | + | For linking an image to another page see [[#Image Links]] |
| - | ==== Поддерживаемые форматы | + | ==== Supported Media Formats |
| - | DokuWiki | + | DokuWiki |
| - | | Изображения | + | | Image | '' |
| - | | Видео | + | | Video | '' |
| - | | Аудио | + | | Audio | '' |
| - | | Flash | + | | Flash | '' |
| - | Если формат не поддерживается, будет показана ссылка. | + | If you specify a filename that is not a supported media format, then it will be displayed as a link instead. |
| - | ''? | + | By adding |
| {{wiki: | {{wiki: | ||
| - | {{wiki: | + | {{wiki: |
| - | ==== Запасные форматы | + | ==== Fallback Formats |
| - | Не все браузеры поддерживают все форматы. Чтобы повысить совместимость, загрузите файл в нескольких форматах. | + | Unfortunately not all browsers understand all video and audio formats. To mitigate the problem, you can upload your file in different formats for maximum browser compatibility. |
| - | Например: | + | For example consider this embedded mp4 video: |
| - | {{video.mp4|Забавное видео}} | + | {{video.mp4|A funny video}} |
| - | Если рядом лежат | + | When you upload a '' |
| - | Можно добавить «постер» — изображение '' | + | Additionally DokuWiki supports a " |
| - | ===== Списки | + | ===== Lists ===== |
| - | DokuWiki поддерживает маркированные и нумерованные списки. Для элемента списка отступите две позиции и используйте | + | Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a '' |
| - | * Это список | + | * This is a list |
| - | * Второй элемент | + | * The second item |
| - | * Вложенный уровень | + | * You may have different levels |
| - | * Ещё один элемент | + | * Another item |
| - | - Тот же список, | + | - The same list but ordered |
| - | - Ещё один элемент | + | - Another item |
| - | - Вложенный уровень | + | - Just use indention for deeper levels |
| - | - Готово | + | - That's it |
| < | < | ||
| - | * Это список | + | * This is a list |
| - | * Второй элемент | + | * The second item |
| - | * Вложенный уровень | + | * You may have different levels |
| - | * Ещё один элемент | + | * Another item |
| - | - Тот же список, | + | - The same list but ordered |
| - | - Ещё один элемент | + | - Another item |
| - | - Вложенный уровень | + | - Just use indention for deeper levels |
| - | - Готово | + | - That's it |
| </ | </ | ||
| - | См. также | + | Also take a look at the [[doku> |
| - | ===== Преобразования текста | + | ===== Text Conversions |
| - | DokuWiki | + | DokuWiki |
| - | ==== Преобразование текста в изображения ==== | + | The text to image conversion is mainly done for smileys. And the text to HTML conversion is used for typography replacements, |
| - | DokuWiki | + | ==== Text to Image Conversions ==== |
| + | |||
| + | DokuWiki | ||
| * 8-) %% 8-) %% | * 8-) %% 8-) %% | ||
| Строка 252: | Строка 262: | ||
| * DELETEME %% DELETEME %% | * DELETEME %% DELETEME %% | ||
| - | ==== Преобразование текста в HTML ==== | + | ==== Text to HTML Conversions |
| - | Типографика: [[DokuWiki]] | + | Typography: [[DokuWiki]] |
| -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) | -> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r) | ||
| Строка 264: | Строка 274: | ||
| </ | </ | ||
| - | Исключения: | + | The same can be done to produce any kind of HTML, it just needs to be added to the [[doku>entities|pattern file]]. |
| - | ===== Цитирование ===== | + | There are three exceptions which do not come from that pattern file: multiplication entity (640x480), ' |
| - | Иногда нужно показать ответ или комментарий: | + | ===== Quoting ===== |
| + | |||
| + | Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: | ||
| < | < | ||
| Строка 296: | Строка 308: | ||
| >>> | >>> | ||
| - | ===== Таблицы | + | ===== Tables |
| - | DokuWiki | + | DokuWiki |
| - | ^ Заголовок | + | ^ Heading |
| - | | Строка | + | | Row 1 Col 1 | Row 1 Col 2 |
| - | | Строка | + | | Row 2 Col 1 | some colspan |
| - | | Строка | + | | Row 3 Col 1 | Row 3 Col 2 |
| - | | + | Table rows have to start and end with a '' |
| - | | Строка 1,1 | Строка 1,2 | Строка 1,3 | | + | |
| - | | Строка 2,1 | объединение | + | |
| - | | Строка 3,1 | Строка 3,2 | Строка 3,3 | | + | |
| - | Вертикальные заголовки: | + | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ |
| + | | Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 | | ||
| + | | Row 2 Col 1 | some colspan (note the double pipe) || | ||
| + | | Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 | | ||
| - | | ^ Заголовок 1 ^ Заголовок 2 ^ | + | To connect cells horizontally, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators! |
| - | ^ Заголовок 3 | Строка 1,2 | Строка 1,3 | | + | |
| - | ^ Заголовок 4 | без объединения | + | |
| - | ^ Заголовок 5 | Строка 2,2 | Строка 2,3 | | + | |
| - | Rowspan: | + | Vertical tableheaders are possible, too. |
| - | ^ Заголовок | + | | |
| - | | Строка | + | ^ Heading |
| - | | Строка 2,1 | + | ^ Heading 4 |
| - | | Строка 3,1 | + | ^ Heading 5 |
| - | Выравнивание: | + | As you can see, it's the cell separator before a cell which decides about the formatting: |
| - | ^ Таблица с выравниванием | + | | ^ Heading 1 ^ Heading 2 ^ |
| + | ^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 | | ||
| + | ^ Heading 4 | no colspan this time | | | ||
| + | ^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 | | ||
| + | |||
| + | You can have rowspans (vertically connected cells) by adding '' | ||
| + | |||
| + | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ||
| + | | Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | | ||
| + | | Row 2 Col 1 | ::: | Row 2 Col 3 | | ||
| + | | Row 3 Col 1 | ::: | Row 2 Col 3 | | ||
| + | |||
| + | Apart from the rowspan syntax those cells should not contain anything else. | ||
| + | |||
| + | ^ Heading 1 ^ Heading 2 ^ Heading 3 ^ | ||
| + | | Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 | | ||
| + | | Row 2 Col 1 | ::: | Row 2 Col 3 | | ||
| + | | Row 3 Col 1 | ::: | Row 2 Col 3 | | ||
| + | |||
| + | You can align the table contents, too. Just add at least two whitespaces at the opposite end of your text: Add two spaces on the left to align right, two spaces on the right to align left and two spaces at least at both ends for centered text. | ||
| + | |||
| + | ^ Table with alignment | ||
| | | | | ||
| |left | | |left | | ||
| | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | ||
| - | ===== Без форматирования ===== | + | This is how it looks in the source: |
| - | Если нужно отобразить текст ровно так, как он набран | + | ^ Table with alignment |
| + | | | ||
| + | |left | | ||
| + | | xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx | | ||
| + | |||
| + | Note: Vertical alignment is not supported. | ||
| + | |||
| + | ===== No Formatting ===== | ||
| + | |||
| + | If you need to display text exactly like it is typed (without any formatting), enclose the area either with '' | ||
| < | < | ||
| This is some text which contains addresses like this: http:// | This is some text which contains addresses like this: http:// | ||
| </ | </ | ||
| - | |||
| The same is true for %%// | The same is true for %%// | ||
| Строка 346: | Строка 384: | ||
| The same is true for %%// | The same is true for %%// | ||
| - | ===== Блоки кода | + | ===== Code Blocks |
| - | Блоки кода создаются отступом в две позиции или тегами | + | You can include code blocks into your documents by either indenting them by at least two spaces (like used for the previous examples) or by using the tags '' |
| - | | + | |
| < | < | ||
| - | Это предварительно форматированный код, все пробелы сохраняются: вот | + | This is preformatted code all spaces are preserved: like <-this |
| </ | </ | ||
| < | < | ||
| - | То же самое, но используется для отображения содержимого файла. | + | This is pretty much the same, but you could use it to show that you quoted a file. |
| </ | </ | ||
| - | Исходный код: | + | Those blocks were created by this source: |
| - | | + | |
| < | < | ||
| - | | + | |
| </ | </ | ||
| < | < | ||
| - | | + | |
| </ | </ | ||
| - | | ||
| - | ==== Подсветка синтаксиса ==== | ||
| - | [[wiki: | + | ==== Syntax Highlighting ==== |
| + | |||
| + | [[wiki: | ||
| <code java> | <code java> | ||
| /** | /** | ||
| - | | + | |
| + | * simply displays | ||
| */ | */ | ||
| class HelloWorldApp { | class HelloWorldApp { | ||
| public static void main(String[] args) { | public static void main(String[] args) { | ||
| - | System.out.println(" | + | System.out.println(" |
| } | } | ||
| } | } | ||
| </ | </ | ||
| - | Список поддерживаемых языков: //4cs 6502acme | + | The following language strings are currently recognized: //4cs 6502acme |
| - | Дополнительные параметры см. [[doku> | + | There are additional |
| - | ==== Скачиваемые блоки кода | + | ==== Downloadable Code Blocks |
| - | Можно сделать код доступным для скачивания: | + | When you use the '' |
| < | < | ||
| Строка 405: | Строка 444: | ||
| </ | </ | ||
| - | Если подсветка не нужна, используйте | + | If you don't want any highlighting but want a downloadable file, specify a dash ('' |
| - | ===== RSS/ | + | ===== RSS/ |
| + | [[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http:// | ||
| - | [[DokuWiki]] может интегрировать данные из внешних XML‑лент через [[http://simplepie.org/|SimplePie]]. | + | ^ Parameter |
| + | | any number | will be used as maximum number items to show, defaults to 8 | | ||
| + | | reverse | ||
| + | | author | ||
| + | | date | show item dates | | ||
| + | | description| show the item description. All HTML tags will be stripped | | ||
| + | | nosort | ||
| + | | //n//[dhm] | refresh period, where d=days, h=hours, m=minutes. (e.g. 12h = 12 hours). | | ||
| - | ^ Параметр | + | The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki: |
| - | | число | + | |
| - | | reverse | + | |
| - | | author | + | |
| - | | date | показывать даты | | + | |
| - | | description| показывать описание (HTML удаляется) | | + | |
| - | | nosort | + | |
| - | | n[dhm] | период обновления | | + | |
| - | Пример: | + | By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the '' |
| + | |||
| + | **Example:** | ||
| {{rss> | {{rss> | ||
| Строка 426: | Строка 468: | ||
| {{rss> | {{rss> | ||
| - | ===== Управляющие макросы ===== | ||
| - | Некоторые конструкции влияют на рендеринг страницы: | + | ===== Control Macros ===== |
| + | |||
| + | Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble: | ||
| + | |||
| + | ^ Macro ^ Description | | ||
| + | | %%~~NOTOC~~%% | ||
| + | | %%~~NOCACHE~~%% | DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the %%< | ||
| + | |||
| + | ===== Syntax Plugins ===== | ||
| - | ^ Макрос | + | DokuWiki' |
| - | | %%~~NOTOC~~%% | + | |
| - | | %%~~NOCACHE~~%%| отключает кэширование | + | |
| - | ===== Плагины синтаксиса ===== | + | ~~INFO: |
| - | Синтаксис DokuWiki можно расширять через [[doku> | ||
wiki/syntax.1773847113.txt.gz · Последнее изменение: — admin
