wiki:syntax

문서의 이전 판입니다!


서식 문법 (Formatting Syntax)

도쿠위키는 데이터 파일을 최대한 읽기 쉽게 유지하기 위해 간단한 마크업 언어를 지원합니다. 이 페이지는 페이지 편집 시 사용할 수 있는 모든 가능한 문법을 포함하고 있습니다. “이 페이지 편집하기” 버튼을 눌러 이 페이지의 소스를 직접 확인해 보세요. 무언가 테스트해보고 싶다면 연습장(playground) 페이지를 이용하세요. 간단한 마크업은 퀵버튼 툴바를 통해서도 쉽게 사용할 수 있습니다.

도쿠위키는 굵게(bold), 기울임(italic), 밑줄(underlined)타이핑체(monospaced) 텍스트를 지원합니다. 물론 이 모든 서식들을 혼합해서 사용할 수도 있습니다.

도쿠위키는 **굵게(bold)**, //기울임(italic)//, __밑줄(underlined)__ 및 ''타이핑체(monospaced)'' 텍스트를 지원합니다.
물론 이 모든 서식들을 **__//''혼합''//__**해서 사용할 수도 있습니다.

아래 첨자(subscript)위 첨자(superscript)도 사용 가능합니다.

<sub>아래 첨자</sub>와 <sup>위 첨자</sup>도 사용할 수 있습니다.

무언가를 삭제(deleted)된 것으로 표시할 수도 있습니다.

무언가를 <del>삭제(deleted)</del>된 것으로 표시할 수도 있습니다.

단락(Paragraphs)은 빈 줄을 통해 생성됩니다. 만약 단락 없이 강제로 줄바꿈을 하려면 백슬래시 두 개(`\\`) 뒤에 공백을 넣거나 줄의 끝에서 줄을 바꾸면 됩니다.

이것은 줄바꿈이 포함된 텍스트입니다
주의할 점은 두 개의 백슬래시는 오직 줄의 끝에서만 인식되거나
혹은 뒤에
공백이 올 때만 인식됩니다 \\이것은 공백이 없어서 그대로 표시됩니다.

이것은 줄바꿈이 포함된 텍스트입니다\\ 주의할 점은
두 개의 백슬래시는 오직 줄의 끝에서만 인식되거나\\
혹은 뒤에\\ 공백이 올 때만 인식됩니다 \\이것은 공백이 없어서 그대로 표시됩니다.

강제 줄바꿈은 정말 필요한 경우에만 사용해야 합니다.

도쿠위키는 링크를 만드는 다양한 방법을 지원합니다.

외부 링크는 자동으로 인식됩니다: http://www.google.com 또는 단순히 www.google.com - 링크 텍스트를 직접 설정할 수도 있습니다: 이 링크는 구글을 가리킵니다. andi@splitbrain.org와 같은 이메일 주소도 마찬가지로 인식됩니다.

도쿠위키는 링크를 만드는 다양한 방법을 지원합니다. 외부 링크는 자동으로
인식됩니다: http://www.google.com 또는 단순히 www.google.com - 링크 텍스트를
직접 설정할 수도 있습니다: [[http://www.google.com|이 링크는 구글을 가리킵니다]].
<[email protected]>와 같은 이메일 주소도 마찬가지로 인식됩니다.

내부 링크는 대괄호를 사용하여 만듭니다. 단순히 페이지이름만 적거나 추가적인 링크 텍스트를 사용할 수 있습니다.

내부 링크는 대괄호를 사용하여 만듭니다. 단순히 [[페이지이름]]만 적거나
추가적인 [[페이지이름|링크 텍스트]]를 사용할 수 있습니다.

위키 페이지 이름은 자동으로 소문자로 변환되며, 특수 문자는 허용되지 않습니다.

페이지 이름에 콜론을 사용하여 네임스페이스를 사용할 수 있습니다.

페이지 이름에 콜론을 사용하여 [[어떤:네임스페이스]]를 사용할 수 있습니다.

네임스페이스에 대한 자세한 내용은 namespaces를 참조하십시오.

특정 섹션으로 링크하는 것도 가능합니다. HTML에서 알려진 것처럼 섹션 이름 뒤에 해시(#) 기호를 추가하면 됩니다. 이 링크는 이 섹션으로 연결됩니다.

이 링크는 [[syntax#내부|이 섹션]]으로 연결됩니다.

참고:

  • 존재하는 페이지에 대한 링크는 존재하지않는페이지와는 다른 스타일로 표시됩니다.
  • 도쿠위키는 기본적으로 CamelCase를 자동 링크 생성에 사용하지 않지만, config 파일에서 이 동작을 활성화할 수 있습니다. 힌트: 만약 DokuWiki가 링크로 표시된다면 활성화된 것입니다.
  • 섹션의 제목이 변경되면 해당 북마크도 변경됩니다. 따라서 섹션 링크에 너무 의존하지 마십시오.

도쿠위키는 Interwiki 링크를 지원합니다. 이는 다른 위키로 연결되는 빠른 링크입니다. 예를 들어, 다음은 위키에 대한 위키백과 페이지로 연결되는 링크입니다: Wiki.

도쿠위키는 [[doku>Interwiki]] 링크를 지원합니다. 이는 다른 위키로 연결되는 빠른 링크입니다.
예를 들어, 다음은 위키에 대한 위키백과 페이지로 연결되는 링크입니다: [[wp>Wiki]].

이것과 같은 Windows 공유도 인식됩니다. 이는 기업의 인트라넷과 같이 동질적인 사용자 그룹에서만 의미가 있다는 점에 유의하십시오.

[[\\server\share|이것]]과 같은 Windows 공유도 인식됩니다.

참고:

  • 보안상의 이유로 Windows 공유의 직접 검색은 기본적으로 Microsoft Internet Explorer에서만 작동합니다(그리고 “로컬 영역”에서만).
  • Mozilla 및 Firefox의 경우 Mozilla 지식 베이스에 언급된 다양한 해결 방법을 통해 활성화할 수 있습니다. 그러나 Windows 공유를 열려고 시도하는 것에 대한 JavaScript 경고는 여전히 표시됩니다. (모든 사용자에 대해) 이 경고를 제거하려면 conf/lang/ko/lang.php에 다음 줄을 추가하십시오 (자세한 내용은 현지화 참조):
    conf/lang/ko/lang.php
    <?php
    /**
     * 한국어 언어 파일 사용자 정의
     * 수정이 필요한 문자열만 복사하십시오
     */
    $lang['js']['nosmblinks'] = '';

링크 문법과 이미지 문법(아래 참조)을 결합하여 내부 또는 외부 페이지로 연결되는 이미지를 사용할 수도 있습니다:

[[http://php.net|{{wiki:dokuwiki-128.png}}]]

참고: 이미지 서식은 링크 이름에서 허용되는 유일한 서식 문법입니다.

전체 이미지링크 문법이 지원됩니다 (이미지 크기 조정, 내부 및 외부 이미지와 URL, 인터위키 링크 포함).

이중 괄호를 사용하여 각주1)를 추가할 수 있습니다.

이중 괄호를 사용하여 각주((이것은 각주입니다))를 추가할 수 있습니다.

콘텐츠의 구조를 짜기 위해 최대 5단계의 제목을 사용할 수 있습니다. 제목이 3개 이상이면 목차가 자동으로 생성됩니다. 문서 안에 ~~NOTOC~~라는 문자열을 넣으면 목차 생성을 비활성화할 수 있습니다.

제목 레벨 4

제목 레벨 5
==== 제목 레벨 3 ====
=== 제목 레벨 4 ===
== 제목 레벨 5 ==

4개 이상의 대시(-)를 사용하면 가로 구분선을 만들 수 있습니다:


중괄호를 사용하여 외부 및 내부 이미지, 비디오 및 오디오 파일을 포함할 수 있습니다. 선택적으로 크기를 지정할 수 있습니다.

실제 크기:

지정한 너비로 크기 조정:

지정한 너비와 높이로 크기 조정2):

크기가 조정된 외부 이미지:

실제 크기:                        {{wiki:dokuwiki-128.png}}
지정한 너비로 크기 조정:            {{wiki:dokuwiki-128.png?50}}
지정한 너비와 높이로 크기 조정:      {{wiki:dokuwiki-128.png?200x50}}
크기가 조정된 외부 이미지:           {{https://www.php.net/images/php.gif?200x50}}

왼쪽이나 오른쪽에 공백을 사용하여 정렬을 선택할 수 있습니다.

{{ wiki:dokuwiki-128.png}}
{{wiki:dokuwiki-128.png }}
{{ wiki:dokuwiki-128.png }}

물론 제목(대부분의 브라우저에서 툴팁으로 표시됨)을 추가할 수도 있습니다.

이것은 캡션입니다

{{ wiki:dokuwiki-128.png |이것은 캡션입니다}}

이미지를 다른 페이지로 연결하려면 위의 이미지 링크를 참조하십시오.

도쿠위키는 다음 미디어 형식을 직접 삽입할 수 있습니다.

이미지 gif, jpg, png
비디오 webm, ogv, mp4
오디오 ogg, mp3, wav
Flash swf

지원되지 않는 미디어 형식의 파일 이름을 지정하면, 대신 링크로 표시됩니다.

?linkonly를 추가하면 미디어를 인라인으로 표시하지 않고 해당 미디어로 연결되는 링크를 제공합니다.

{{wiki:dokuwiki-128.png?linkonly}}

dokuwiki-128.png 이것은 단지 이미지로 연결되는 링크입니다.

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|A funny video}}

When you upload a video.webm and video.ogv next to the referenced video.mp4, DokuWiki will automatically add them as alternatives so that one of the three files is understood by your browser.

Additionally DokuWiki supports a “poster” image which will be shown before the video has started. That image needs to have the same filename as the video and be either a jpg or png file. In the example above a video.jpg file would work.

Dokuwiki supports ordered and unordered lists. To create a list item, indent your text by two spaces and use a * for unordered lists or a - for ordered ones.

  • This is a list
  • The second item
    • You may have different levels
  • Another item
  1. The same list but ordered
  2. Another item
    1. Just use indention for deeper levels
  3. 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 FAQ on list items.

DokuWiki can convert certain pre-defined characters or strings into images or other text or HTML.

The text to image conversion is mainly done for smileys. And the text to HTML conversion is used for typography replacements, but can be configured to use other HTML as well.

DokuWiki converts commonly used emoticons to their graphical equivalents. Those Smileys and other images can be configured and extended. Here is an overview of Smileys included in DokuWiki:

  • 8-) 8-)
  • 8-O 8-O
  • :-( :-(
  • :-) :-)
  • =) =)
  • :-/ :-/
  • :-\ :-\
  • :-? :-?
  • :-D :-D
  • :-P :-P
  • :-O :-O
  • :-X :-X
  • :-| :-|
  • ;-) ;-)
  • ^_^ ^_^
  • m( m(
  • :?: :?:
  • :!: :!:
  • LOL LOL
  • FIXME FIXME
  • DELETEME DELETEME

Typography: DokuWiki can convert simple text characters to their typographically correct entities. Here is an example of recognized characters.

→ ← ↔ ⇒ ⇐ ⇔ » « – — 640×480 © ™ ® “He thought 'It's a man's world'…”

-> <- <-> => <= <=> >> << -- --- 640x480 (c) (tm) (r)
"He thought 'It's a man's world'..."

The same can be done to produce any kind of HTML, it just needs to be added to the pattern file.

There are three exceptions which do not come from that pattern file: multiplication entity (640×480), 'single' and “double quotes”. They can be turned off through a config option.

Some times you want to mark some text to show it's a reply or comment. You can use the following syntax:

I think we should do it

> No we shouldn't

>> Well, I say we should

> Really?

>> Yes!

>>> Then lets do it!

I think we should do it

No we shouldn't
Well, I say we should
Really?
Yes!
Then lets do it!

DokuWiki supports a simple syntax to create tables.

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

Table rows have to start and end with a | for normal rows or a ^ for headers.

^ 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        |

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!

Vertical tableheaders are possible, too.

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

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 ::: into the cells below the one to which they should connect.

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
right center left
left right center
xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxx

This is how it looks in the source:

^           Table with alignment           ^^^
|         right|    center    |left          |
|left          |         right|    center    |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |

Note: Vertical alignment is not supported.

If you need to display text exactly like it is typed (without any formatting), enclose the area either with <nowiki> tags or even simpler, with double percent signs %%.

This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it. The same is true for //__this__ text// with a smiley ;-).

<nowiki>
This is some text which contains addresses like this: http://www.splitbrain.org and **formatting**, but nothing is done with it.
</nowiki>
The same is true for %%//__this__ text// with a smiley ;-)%%.

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 <code> or <file>.

This is text is indented by two spaces.
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:

  This is text is indented by two spaces.
<code>
This is preformatted code all spaces are preserved: like              <-this
</code>
<file>
This is pretty much the same, but you could use it to show that you quoted a file.
</file>

DokuWiki can highlight sourcecode, which makes it easier to read. It uses the GeSHi Generic Syntax Highlighter – so any language supported by GeSHi is supported. The syntax uses the same code and file blocks described in the previous section, but this time the name of the language syntax to be highlighted is included inside the tag, e.g. <code java> or <file java>.

/**
 * The HelloWorldApp class implements an application that
 * simply displays "Hello World!" to the standard output.
 */
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); //Display the string.
    }
}

The following language strings are currently recognized: 4cs 6502acme 6502kickass 6502tasm 68000devpac abap actionscript3 actionscript ada aimms algol68 apache applescript apt_sources arm asm asp asymptote autoconf autohotkey autoit avisynth awk bascomavr bash basic4gl batch bf biblatex bibtex blitzbasic bnf boo caddcl cadlisp ceylon cfdg cfm chaiscript chapel cil c_loadrunner clojure c_mac cmake cobol coffeescript c cpp cpp-qt cpp-winapi csharp css cuesheet c_winapi dart dcl dcpu16 dcs delphi diff div dos dot d ecmascript eiffel email epc e erlang euphoria ezt f1 falcon fo fortran freebasic freeswitch fsharp gambas gdb genero genie gettext glsl gml gnuplot go groovy gwbasic haskell haxe hicest hq9plus html html4strict html5 icon idl ini inno intercal io ispfpanel java5 java javascript jcl j jquery julia kixtart klonec klonecpp kotlin latex lb ldif lisp llvm locobasic logtalk lolcode lotusformulas lotusscript lscript lsl2 lua m68k magiksf make mapbasic mathematica matlab mercury metapost mirc mk-61 mmix modula2 modula3 mpasm mxml mysql nagios netrexx newlisp nginx nimrod nsis oberon2 objc objeck ocaml-brief ocaml octave oobas oorexx oracle11 oracle8 oxygene oz parasail parigp pascal pcre perl6 perl per pf phix php-brief php pic16 pike pixelbender pli plsql postgresql postscript povray powerbuilder powershell proftpd progress prolog properties providex purebasic pycon pys60 python qbasic qml q racket rails rbs rebol reg rexx robots roff rpmspec rsplus ruby rust sas sass scala scheme scilab scl sdlbasic smalltalk smarty spark sparql sql sshconfig standardml stonescript swift systemverilog tclegg tcl teraterm texgraph text thinbasic tsql twig typoscript unicon upc urbi uscript vala vbnet vb vbscript vedit verilog vhdl vim visualfoxpro visualprolog whitespace whois winbatch wolfram xbasic xml xojo xorg_conf xpp yaml z80 zxbasic

There are additional advanced options available for syntax highlighting, such as highlighting lines or adding line numbers.

When you use the <code> or <file> syntax as above, you might want to make the shown code available for download as well. You can do this by specifying a file name after language code like this:

<file php myexample.php>
<?php echo "hello world!"; ?>
</file>
myexample.php
<?php echo "hello world!"; ?>

If you don't want any highlighting but want a downloadable file, specify a dash (-) as the language code: <code - myfile.foo>.

DokuWiki can integrate data from external XML feeds. For parsing the XML feeds, SimplePie is used. All formats understood by SimplePie can be used in DokuWiki as well. You can influence the rendering by multiple additional space separated parameters:

Parameter Description
any number will be used as maximum number items to show, defaults to 8
reverse display the last items in the feed first
author show item authors names
date show item dates
description show the item description. All HTML tags will be stripped
nosort do not sort the items in the feed
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. DokuWiki will generally try to supply a cached version of a page, obviously this is inappropriate when the page contains dynamic external content. The parameter tells DokuWiki to re-render the page if it is more than refresh period since the page was last rendered.

By default the feed will be sorted by date, newest items first. You can sort it by oldest first using the reverse parameter, or display the feed as is with nosort.

Example:

{{rss>http://slashdot.org/index.rss 5 author date 1h }}

Some syntax influences how DokuWiki renders a page without creating any output it self. The following control macros are availble:

Macro Description
~~NOTOC~~ If this macro is found on the page, no table of contents will be created
~~NOCACHE~~ DokuWiki caches all output by default. Sometimes this might not be wanted (eg. when the <php> syntax above is used), adding this macro will force DokuWiki to rerender a page on every call

DokuWiki's syntax can be extended by Plugins. How the installed plugins are used is described on their appropriate description pages. The following syntax plugins are available in this particular DokuWiki installation:


1)
이것은 각주입니다
2)
지정한 너비와 높이의 가로세로 비율이 이미지와 일치하지 않는 경우, 크기를 조정하기 전에 새로운 비율에 맞춰 이미지가 잘립니다
  • wiki/syntax.1766399010.txt.gz
  • 마지막으로 수정됨: 2025/12/22 19:23
  • 저자 devany