User Tools

Site Tools


wiki:syntax

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:syntax [2015/10/09 09:20] – add docs for colored table cells rhaaswiki:syntax [2024/08/05 06:28] (current) – external edit 127.0.0.1
Line 84: Line 84:
  
   * For security reasons direct browsing of windows shares only works in Microsoft Internet Explorer per default (and only in the "local zone").   * 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/userscript.js'': +  * 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 
-  LANG.nosmblinks = '';+/** 
 + * Customization of the english language file 
 + * Copy only the strings that needs to be modified 
 + */ 
 +$lang['js']['nosmblinks'= ''; 
 +</code>
  
 ==== Image Links ==== ==== Image Links ====
Line 92: Line 97:
 You can also use an image to link to another internal or external page by combining the syntax for links and [[#images_and_other_files|images]] (see below) like this: You can also use an image to link to another internal or external page by combining the syntax for links and [[#images_and_other_files|images]] (see below) like this:
  
-  [[http://www.php.net|{{wiki:dokuwiki-128.png}}]]+  [[http://php.net|{{wiki:dokuwiki-128.png}}]]
  
-[[http://www.php.net|{{wiki:dokuwiki-128.png}}]]+[[http://php.net|{{wiki:dokuwiki-128.png}}]]
  
 Please note: The image formatting is the only formatting syntax accepted in link names. Please note: The image formatting is the only formatting syntax accepted in link names.
Line 132: Line 137:
 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://de3.php.net/images/php.gif?200x50}}+Resized external image:           {{https://www.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://de3.php.net/images/php.gif?200x50}}+  Resized external image:           {{https://www.php.net/images/php.gif?200x50}}
  
  
Line 157: Line 162:
  
   {{ wiki:dokuwiki-128.png |This is the caption}}   {{ wiki:dokuwiki-128.png |This is the caption}}
- 
-If you would like the title to show up as a caption as well, just surround the image by square brackets 
- 
-[{{ wiki:dokuwiki-128.png |This is the caption}}] 
- 
-  [{{ wiki:dokuwiki-128.png |This is the caption}}] 
  
 For linking an image to another page see [[#Image Links]] above. For linking an image to another page see [[#Image Links]] above.
  
-==== Directly embedding external images ====+==== Supported Media Formats ====
  
-Sometimes it is useful to directly embedd external images since the normal +DokuWiki can embed the following media formats directly.
-dokuwiki method requires that the dokuwiki server can access the external +
-resourceUse direct html tags to link to the image:+
  
-<html><p align="center"><img +| Image | ''gif'', ''jpg'', ''png'' 
-src="https://astro-cosmo-rel-wiki.aei.mpg.de/_media/wiki/dokuwiki-128.png" +| Video | ''webm'', ''ogv'', ''mp4''
-width="100" title="This is the tooltip"></p></html>+| Audio | ''ogg'', ''mp3'', ''wav''  | 
 +| Flash | ''swf''                    |
  
-==== Supported Media Formats ====+If you specify a filename that is not a supported media format, then it will be displayed as a link instead.
  
-DokuWiki can embed the following media formats directly.+By adding ''?linkonly'' you provide a link to the media without displaying it inline
  
-| Image  | ''gif'', ''jpg'', ''png'', "svg" +  {{wiki:dokuwiki-128.png?linkonly}}
-| Video  | ''webm'', ''ogv'', ''mp4''        | +
-| Audio  | ''ogg'', ''mp3'', ''wav''         | +
-| Flash  | ''swf''                           |+
  
-If you specify a filename that is not a supported media format, then it will be displayed as a link instead.+{{wiki:dokuwiki-128.png?linkonly}} This is just a link to the image.
  
 ==== Fallback Formats ==== ==== Fallback Formats ====
Line 199: Line 194:
 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.
  
-==== Image numbering ==== 
-Simple captions can be displayed by just surrounding the image tag by square 
-brackets ''[''...'']''. 
-[{{ wiki:dokuwiki-128.png |This is the caption}}] 
- 
-  [{{ wiki:dokuwiki-128.png |This is the caption}}] 
- 
-You can use the [[http://www.till-biskup.de/de/software/dokuwiki/caption|caption]] plugin's capabilities to embedd figures and tables with proper captions.  
- 
-  * ''<figure>''...''</figure>'', ''<table>''...''</table>'' 
-  * ''<caption>''...''</caption>'' 
- 
-Concerning this ''<caption>''...''</caption>'' should only be used inside of 
-one of the first two environments. 
- 
-Captions are automatically numbered and labelled with "Figure" or "Table". 
-Figures can be gives labels so that they can be referenced later on: 
-<figure label> 
-{{ wiki:dokuwiki-128.png |This is the tooltip}} 
-<caption>This is the caption</caption> 
-</figure> 
-Figure {{ref>label}} shows a caption. 
- 
-<code> 
-<figure label> 
-{{ wiki:dokuwiki-128.png |This is the tooltip}} 
-<caption>This is the caption</caption> 
-</figure> 
-Figure {{ref>label}} shows a caption. 
-</code> 
-and analogously for tables. 
 ===== Lists ===== ===== Lists =====
  
Line 257: Line 221:
  
 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]].
- 
-===== Collapsible sections ===== 
- 
-If you want to make additional information available that is hidden by default, you have two options with this plugin: 
- 
-==== Inline ==== 
- 
-  This is example ++text | with some of it only shown when you unfold it++. And after that 
-  the text just continues to flow in the same paragraph. 
-   
-This is example ++text | with some of it only shown when you unfold it++. And after that 
-the text just continues to flow in the same paragraph. 
- 
-==== Block ==== 
- 
-<code> 
-This is example text. 
- 
-++++ Title | 
- 
-| This table | is only shown | when you unfold the block | 
- 
-++++ 
-</code> 
- 
-This is example text. 
- 
-++++ Title | 
- 
-| This table | is only shown | when you unfold the block | 
- 
-++++ 
- 
-==== Block allowing nesting: method 1==== 
- 
-<code> 
-This is example text. 
- 
-<hidden Title> 
- 
-| This table | is only shown | when you unfold the block | 
- 
-<hidden Nested> 
-Some more hidden text. 
-</hidden> 
- 
-</hidden> 
-</code> 
- 
-This is example text. 
- 
-<hidden Title> 
- 
-| This table | is only shown | when you unfold the block | 
- 
-<hidden Nested> 
-Some more hidden text. 
-</hidden> 
- 
-</hidden> 
- 
-==== Block allowing nesting: method 2==== 
- 
-<code> 
-This is example text. 
- 
--->Title# 
- 
-Postfix Title text by %%#%% to suppress a preview, postfix Title text by %%^%% to create a section that is initially visible. 
- 
-| This table | is only shown | when you unfold the block | 
- 
--->Nested^ 
-Some more hidden text. 
- 
-<-- 
- 
-<-- 
-</code> 
- 
-This is example text. 
- 
--->Title# 
- 
-Postfix Title text by %%#%% to suppress a preview, postfix Title text by %%^%% to create a section that is initially visible. 
- 
-| This table | is only shown | when you unfold the block | 
- 
--->Nested^ 
-Some more hidden text. 
-<-- 
- 
-<-- 
- 
-See https://www.dokuwiki.org/plugin:outliner for the full documentation. 
  
 ===== Text Conversions ===== ===== Text Conversions =====
Line 378: Line 247:
   * ;-) %%  ;-)  %%   * ;-) %%  ;-)  %%
   * ^_^ %%  ^_^  %%   * ^_^ %%  ^_^  %%
 +  * m(  %%  m(   %%
   * :?: %%  :?:  %%   * :?: %%  :?:  %%
   * :!: %%  :!:  %%   * :!: %%  :!:  %%
Line 404: Line 274:
 Some times you want to mark some text to show it's a reply or comment. You can use the following syntax: 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 +<code>
-   +
-  No we shouldn'+
-   +
-  >> Well, I say we should +
-   +
-  > Really? +
-   +
-  >> Yes! +
-   +
-  >>> Then lets do it! +
 I think we should do it I think we should do it
  
Line 427: Line 286:
  
 >>> Then lets do it! >>> Then lets do it!
 +</code>
  
-===== Citing text =====+I think we should do it
  
-The ''blockquote'' provides three different tags to write quotations and corresponding information:+> No we shouldn't
  
-  * ''%%<blockquote>%%'' marks up block quotations (i.e. quotes including at least one paragraph or more), an alternative syntax is ''%%<QUOTE>%%'' +>> WellI say we should
-  * ''%%<q>%%'' marks up inline quotations (i.e. inside a paragraph or a list etc)an alternative syntax is ''%%<quote>%%'' +
-  * ''%%<cite>%%'' marks up where a quote is cited from+
  
-==== Examples ====+> Really?
  
-<code> +>> Yes!
-<blockquote> +
-There is nothing either good or bad, but thinking makes it so.+
  
-<cite>William Shakespeare, "Hamlet", Act 2 scene 2</cite> +>>> Then lets do it!
-</blockquote> +
-</code> +
-<blockquote> +
-There is nothing either good or bad, but thinking makes it so. +
- +
-<cite>William Shakespeare, "Hamlet", Act 2 scene 2</cite> +
-</blockquote> +
- +
-<code> +
-He said <q>That's life!</q> and moved on. +
-</code> +
-He said <q>That's life!</q> and moved on.+
  
 ===== Tables ===== ===== Tables =====
Line 488: Line 332:
   ^ Heading 5    | Row 2 Col 2          | Row 2 Col 3        |   ^ 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.+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          ^ ^ Heading 1      ^ Heading 2                  ^ Heading 3          ^
Line 518: Line 362:
 Note: Vertical alignment is not supported. Note: Vertical alignment is not supported.
  
-A background color is introduced by @ and ended by :. 
-You can use all names and color codes from HTML. 
-If you don't specify a color, yellow is used. 
- 
-^  Header 1          Header 2  ^  Header 3        ^ 
-|  @lightgreen:**Span**         ||                  | 
-|  @#6495ed:Ligne 1 |  Oui        Oui, à valider  | 
-|  Ligne 2          |  Oui        @orange: Oui    | 
-|  @:Ligne 3        |  Oui       | @red:Non         | 
- 
-This is how it looks in the source: 
-<code> Header 1          Header 2  ^  Header 3        ^ 
-|  @lightgreen:**Span**         ||                  | 
-|  @#6495ed:Ligne 1 |  Oui        Oui, à valider  | 
-|  Ligne 2          |  Oui        @orange: Oui    | 
-|  @:Ligne 3        |  Oui       | @red:Non         | 
-</code> 
 ===== No Formatting ===== ===== No Formatting =====
  
Line 591: Line 418:
 </code> </code>
  
-The following language strings are currently recognized: //4cs6502acme6502kickass6502tasm68000devpacabapactionscript-french, actionscript, actionscript3, adaalgol68apacheapplescriptasmaspautoconfautohotkeyautoitavisynthawkbascomavrbashbasic4glbfbibtexblitzbasicbnfboo, c, c_loadrunner, c_mac, caddclcadlispcfdgcfmchaiscriptcilclojurecmakecobolcoffeescriptcppcpp-qtcsharpcsscuesheet, d, dcsdelphidiffdivdosdot, e, epc, ecmascripteiffelemailerlangeuphoriaf1falconfofortranfreebasicfsharpgambasgenerogenie, gdb, glslgmlgnuplotgogroovy, gettext, gwbasichaskellhicesthq9plushtmlhtml5iconidliniinnointercalio, j, java5javajavascriptjquerykixtartklonecklonecpplatexlblispllvmlocobasiclogtalklolcodelotusformulaslotusscriptlscriptlsl2luam68kmagiksfmakemapbasicmatlabmircmodula2modula3, mmix, mpasmmxmlmysqlnewlispnsisoberon2objcobjeckocaml-briefocamloobasoracle8, oracle11, oxygeneozpascalpcreperl, perl6, perpfphp-briefphppike, pic16, pixelbenderpliplsqlpostgresqlpovraypowerbuilderpowershellproftpdprogressprologpropertiesprovidexpurebasicpyconpythonq, qbasic, railsrebolregrobotsrpmspecrsplusrubysasscalaschemescilabsdlbasicsmalltalksmartysqlsystemverilogtclteratermtextthinbasictsqltyposcriptuniconuscriptvalavbnetvbverilogvhdlvimvisualfoxprovisualprologwhitespacewinbatch, whois, xbasicxmlxorg_confxppyamlz80zxbasic//+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 cpp cpp-qt cpp-winapi csharp css cuesheet c_winapi dart dcl dcpu16 dcs delphi diff div dos dot 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 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 ====
Line 608: Line 437:
  
 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 ===== 
- 
-You can embed raw HTML or PHP code into your documents by using the ''%%<html>%%'' or ''%%<php>%%'' tags. (Use uppercase tags if you need to enclose block level elements.) 
- 
-HTML example: 
- 
-<code> 
-<html> 
-This is some <span style="color:red;font-size:150%;">inline HTML</span> 
-</html> 
-<HTML> 
-<p style="border:2px dashed red;">And this is some block HTML</p> 
-</HTML> 
-</code> 
- 
-<html> 
-This is some <span style="color:red;font-size:150%;">inline HTML</span> 
-</html> 
-<HTML> 
-<p style="border:2px dashed red;">And this is some block HTML</p> 
-</HTML> 
- 
-PHP example: 
- 
-<code> 
-<php> 
-echo 'The PHP version: '; 
-echo phpversion(); 
-echo ' (generated inline HTML)'; 
-</php> 
-<PHP> 
-echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; 
-echo '<td>'.phpversion().'</td>'; 
-echo '</tr></table>'; 
-</PHP> 
-</code> 
- 
-<php> 
-echo 'The PHP version: '; 
-echo phpversion(); 
-echo ' (inline HTML)'; 
-</php> 
-<PHP> 
-echo '<table class="inline"><tr><td>The same, but inside a block level element:</td>'; 
-echo '<td>'.phpversion().'</td>'; 
-echo '</tr></table>'; 
-</PHP> 
- 
-**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 =====
Line 668: Line 446:
 | author     | show item authors names | | author     | show item authors names |
 | date       | show item dates | | date       | show item dates |
-| description| show the item description. If [[doku>config:htmlok|HTML]] is disabled all tags will be stripped |+| 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). | | //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: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 [[wiki:DokuWiki]] to re-render the page if it is more than //refresh period// since the page was last rendered. The refresh period defaults to 4 hours. Any value below 10 minutes will be treated as 10 minutes. [[wiki: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 [[wiki: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:** **Example:**
Line 693: Line 474:
  
 ~~INFO:syntaxplugins~~ ~~INFO:syntaxplugins~~
- 
-===== MathJax ===== 
- 
-This plugin adds MathJax to your wiki pages to let you easily write mathematical formulas that will be typeset and displayed cleanly. It is written to be as simple as possible; it loads and configures the script, protects TeX math expressions from other parsing, and no more.  
- 
-The default configuration uses \$ (dollar signs) to delimit TeX formulas.  This may cause trouble if you have \$ characters in any pages.  The default configuration also lets you escape the dollar signs, however, by changing them to '\\$' This should correct any problems you might have. 
- 
-You can write TeX formulas in your wiki with the following [[http://docs.mathjax.org/en/latest/tex.html#supported-latex-commands|syntax]]: 
- 
-===Inline Math=== 
- 
-Use dollar signs: 
- 
-  $a^2 + b^2 = c^2$ 
- 
-or escaped parentheses: 
- 
-  \(1+2+\dots+n=\frac{n(n+1)}{2}\)   
- 
- 
-===Display Math=== 
- 
-To display math on its own line, use double dollar signs: 
- 
-  $$ \frac{d}{dx}\left( \int_{0}^{x} f(u)\,du\right)=f(x) $$ 
- 
-or escaped square brackets: 
- 
-  \[ \sin A \cos B = \frac{1}{2}\left[ \sin(A-B)+\sin(A+B) \right] \] 
- 
-A wide range of math environments will work as well: 
- 
-  \begin{align*} 
-  e^x & = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \cdots \\ 
-      & = \sum_{n\geq 0} \frac{x^n}{n!} 
-  \end{align*} 
  
wiki/syntax.1444382406.txt.gz · Last modified: 2020/07/08 17:39 (external edit)