Les deux révisions précédentes
Révision précédente
Prochaine révision
|
Révision précédente
|
wiki:syntax [2018/01/12 17:20] jerome |
wiki:syntax [2020/11/21 18:39] (Version actuelle) |
[[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing "Edit this page". If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too. | [[doku>DokuWiki]] supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing "Edit this page". If you want to try something, just use the [[playground:playground|playground]] page. The simpler markup is easily accessible via [[doku>toolbar|quickbuttons]], too. |
| |
\\ \\ | |
===== Basic Text Formatting ===== | ===== Basic Text Formatting ===== |
| |
You should use forced newlines only if really needed. | You should use forced newlines only if really needed. |
| |
\\ \\ | |
===== Links ===== | ===== Links ===== |
| |
For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. | For example this is a link to Wikipedia's page about Wikis: [[wp>Wiki]]. |
| |
| ==== Windows Shares ==== |
| |
| Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate [[wp>Intranet]]. |
| |
| Windows Shares like [[\\server\share|this]] are recognized, too. |
| |
| Notes: |
| |
| * 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://kb.mozillazine.org/Links_to_local_pages_do_not_work|Mozilla Knowledge Base]]. However, there will still be a JavaScript warning about trying to open a Windows Share. To remove this warning (for all users), put the following line in ''conf/lang/en/lang.php'' (more details at [[doku>localization#changing_some_localized_texts_and_strings_in_your_installation|localization]]): <code - conf/lang/en/lang.php> |
| <?php |
| /** |
| * Customization of the english language file |
| * Copy only the strings that needs to be modified |
| */ |
| $lang['js']['nosmblinks'] = ''; |
| </code> |
| |
==== Image Links ==== | ==== Image Links ==== |
The whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links). | The whole [[#images_and_other_files|image]] and [[#links|link]] syntax is supported (including image resizing, internal and external images and URLs and interwiki links). |
| |
\\ \\ | |
===== Footnotes ===== | ===== Footnotes ===== |
| |
You can add footnotes ((This is a footnote)) by using double parentheses. | You can add footnotes ((This is a footnote)) by using double parentheses. |
| |
\\ \\ | |
===== Sectioning ===== | ===== Sectioning ===== |
| |
---- | ---- |
| |
\\ \\ | |
===== Media Files ===== | ===== Media Files ===== |
| |
Resize to given width and height((when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing)): {{wiki:dokuwiki-128.png?200x50}} | Resize to given width and height((when the aspect ratio of the given width and height doesn't match that of the image, it will be cropped to the new ratio before resizing)): {{wiki:dokuwiki-128.png?200x50}} |
| |
Resized external image: {{http://php.net/images/php.gif?200x50}} | Resized external image: {{https://secure.php.net/images/php.gif?200x50}} |
| |
Real size: {{wiki:dokuwiki-128.png}} | Real size: {{wiki:dokuwiki-128.png}} |
Resize to given width: {{wiki:dokuwiki-128.png?50}} | Resize to given width: {{wiki:dokuwiki-128.png?50}} |
Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} | Resize to given width and height: {{wiki:dokuwiki-128.png?200x50}} |
Resized external image: {{http://php.net/images/php.gif?200x50}} | Resized external image: {{https://secure.php.net/images/php.gif?200x50}} |
| |
| |
For linking an image to another page see [[#Image Links]] above. | For linking an image to another page see [[#Image Links]] above. |
| |
\\ | |
==== Supported Media Formats ==== | ==== Supported Media Formats ==== |
| |
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. | 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. |
| |
\\ \\ | |
===== Lists ===== | ===== Lists ===== |
| |
Also take a look at the [[doku>faq:lists|FAQ on list items]]. | Also take a look at the [[doku>faq:lists|FAQ on list items]]. |
| |
\\ \\ | |
===== Text Conversions ===== | ===== Text Conversions ===== |
| |
* DELETEME %% DELETEME %% | * DELETEME %% DELETEME %% |
| |
\\ | |
==== Text to HTML Conversions ==== | ==== Text to HTML Conversions ==== |
| |
There are three exceptions which do not come from that pattern file: multiplication entity (640x480), 'single' and "double quotes". They can be turned off through a [[doku>config:typography|config option]]. | There are three exceptions which do not come from that pattern file: multiplication entity (640x480), 'single' and "double quotes". They can be turned off through a [[doku>config:typography|config option]]. |
| |
\\ \\ | |
===== Quoting ===== | ===== Quoting ===== |
| |
>>> Then lets do it! | >>> Then lets do it! |
| |
\\ \\ | |
===== Tables ===== | ===== Tables ===== |
| |
Note: Vertical alignment is not supported. | Note: Vertical alignment is not supported. |
| |
\\ \\ | |
===== No Formatting ===== | ===== No Formatting ===== |
| |
The same is true for %%//__this__ text// with a smiley ;-)%%. | The same is true for %%//__this__ text// with a smiley ;-)%%. |
| |
\\ \\ | |
===== Code Blocks ===== | ===== Code Blocks ===== |
| |
</file> | </file> |
| |
\\ \\ | |
==== Syntax Highlighting ==== | ==== Syntax Highlighting ==== |
| |
</code> | </code> |
| |
The following language strings are currently recognized: //4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript-french, actionscript, actionscript3, ada, algol68, apache, applescript, asm, asp, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcs, delphi, diff, div, dos, dot, e, epc, ecmascript, eiffel, email, erlang, euphoria, f1, falcon, fo, fortran, freebasic, fsharp, gambas, genero, genie, gdb, glsl, gml, gnuplot, go, groovy, gettext, gwbasic, haskell, hicest, hq9plus, html, html5, icon, idl, ini, inno, intercal, io, j, java5, java, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, modula2, modula3, mmix, mpasm, mxml, mysql, newlisp, nsis, oberon2, objc, objeck, ocaml-brief, ocaml, oobas, oracle8, oracle11, oxygene, oz, pascal, pcre, perl, perl6, per, pf, php-brief, php, pike, pic16, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, python, q, qbasic, rails, rebol, reg, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, uscript, vala, vbnet, vb, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, winbatch, whois, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic// | 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 [[doku>syntax_highlighting|advanced options]] available for syntax highlighting, such as highlighting lines or adding line numbers. |
| |
\\ | |
==== Downloadable Code Blocks ==== | ==== Downloadable Code Blocks ==== |
| |
If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. | If you don't want any highlighting but want a downloadable file, specify a dash (''-'') as the language code: ''%%<code - myfile.foo>%%''. |
| |
\\ \\ | |
===== Embedding HTML and PHP ===== | ===== Embedding HTML and PHP ===== |
| |
**Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. | **Please Note**: HTML and PHP embedding is disabled by default in the configuration. If disabled, the code is displayed instead of executed. |
| |
\\ \\ | |
===== RSS/ATOM Feed Aggregation ===== | ===== RSS/ATOM Feed Aggregation ===== |
[[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|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: | [[DokuWiki]] can integrate data from external XML feeds. For parsing the XML feeds, [[http://simplepie.org/|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: |
{{rss>http://slashdot.org/index.rss 5 author date 1h }} | {{rss>http://slashdot.org/index.rss 5 author date 1h }} |
| |
\\ \\ | |
===== Control Macros ===== | ===== Control Macros ===== |
| |
| %%~~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 | | | %%~~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 | |
| |
\\ \\ | |
===== Syntax Plugins ===== | ===== Syntax Plugins ===== |
| |
~~INFO:syntaxplugins~~ | ~~INFO:syntaxplugins~~ |
| |
| |
\\ \\ | |
===== Windows Shares ===== | |
| |
Windows shares like [[\\server\share|this]] are recognized, too. Please note that these only make sense in a homogeneous user group like a corporate [[wp>Intranet]]. | |
| |
Windows Shares like [[\\server\share|this]] are recognized, too. | |
| |
Notes: | |
| |
* 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://kb.mozillazine.org/Links_to_local_pages_do_not_work|Mozilla Knowledge Base]]. However, there will still be a JavaScript warning about trying to open a Windows Share. To remove this warning (for all users), put the following line in ''conf/lang/en/lang.php'' (more details at [[doku>localization#changing_some_localized_texts_and_strings_in_your_installation|localization]]): | |
* https://www.dokuwiki.org/wiki:syntax#windows_shares (more info) | |
| |
| |
| |
\\ \\ \\ | |