# DokuWiki

It's better when it's simple

### Sidebar

Corporate Use

Our Community

plugin:odt:odt-demo-page

This is an old revision of the document!

# ODT Demo Page

This page demonstrates the features and capabilities of the ODT plugin and demonstrates which plugins support ODT export. To test it, proceed like this:

• copy the page content to your wiki
• install the ODT plugin
• install all other plugins which you like to test for ODT support

Exporting this page is also a easy way to check the influence of ODT or CSS templates on the generated output. You might also like to compare the differences caused by setting the config option css_usage to off (plugins only) or basic style import.

This demo page is work in progress. So a lot of examples are still missing. At the end, all plugins listed under ODT render support should have at least a little example here on the ODT demo page.

Help is always welcome. Do not be afraid to extend this page. I can easily change the page content if something is wrong or if something got broken or deleted accidentally — LarsDW223

First, let's create a table of content using the following code:

{{odt>toc:title=Content;leader_sign=.;indents=0,0.5,1;pagebreak=true;styleL1="font-weight:bold;";styleL2="fontstyle:italic;";styleL3="font-style:normal;";}}

The table of contents needs to be updated after export to ODT to show correct page numbers

# DokuWiki Basic syntax

## Basic Text Formatting

DokuWiki supports bold, italic, underlined and monospaced texts. Of course you can combine all these.

DokuWiki supports **bold**, //italic//, __underlined__ and ''monospaced'' texts.
Of course you can **__//''combine''//__** all these.

You can use subscript and superscript, too.

You can use <sub>subscript</sub> and <sup>superscript</sup>, too.

You can mark something as deleted1) as well.

You can mark something as <del>deleted</del> as well.

An external link looks like this after export to ODT: This Link points to google. The ODT plugin treats an internal link like an external one: This Link points to the start page. This only changes if the link points “inside” the exported ODT document: This Link points to the start of this document. This example only works if the page name of this page is odt-demo-page.

The ODT plugin renders Windows share links as plain text: Example link.

If you would like headings to be numbered after export to ODT, then set the config option outline_list_style to Numbers. Hint: Do not worry if the heading numbers are missing in the table of contents, they will appear after updating it.

## Images

Images are included in the exported ODT document. Let's see some examples:

Resized to given width and height:

An left aligned image:

…and a centered one…

…and also one right aligned:

## Lists

Of course, lists are exported to ODT as well. See the example from the DokuWiki.org Syntax page:

• 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

## Text to Image Conversions

Images generated from Text to Image Conversions will also be included in the exported ODT Document. Again, see the example from the DokuWiki.org Syntax page:

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

## Quoting

Quoting is implemented by using tables, see the example from DokuWiki.org:

I think we should do it

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

## Tables

And yet another example taken from DokuWiki.org:

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
 Heading 1 Heading 2 Row 1 Col 2 Row 1 Col 3 no colspan this time Row 2 Col 2 Row 2 Col 3

Tables look quite boring after export to ODT. There is no difference between a table header cell and a normal cell. This can be changed by using a ODT or CSS template or by setting the config option css_usage to basic style import.

## Syntax Highlighting

As DokuWiki itself, the ODT plugin uses Geshi for syntax highlighting:

/**
* 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.
}
}

Please note that links generated by Geshi will also be inserted as links into the exported ODT document.
Downloadable code blocks tagged with file just look like normal code blocks after the export:

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

Because the ODT plugin runs on the DokuWiki server, it is not possible to implement ODT support in JavaScript based Syntax highlighter plugins.

## Footnotes

Footnotes can also be exported to ODT, some examples first:

You can add footnotes 2) by using double parentheses. And another 3) footnote. And again the first one 4).

Please notice that footnotes in the ODT document are slightly different than in the browser:

• footnotes are always displayed at the bottom of the current ODT page, not at the bottom of the end of the exported DokuWiki page
• footnotes with the same text receive the same number (see the example above and compare it with the browser view)

# Changemarks plugin

This example requires the changemarks plugin to be installed

The changemarks plugin is used to mark portions of text as <ins This has been inserted.>inserted</ins>, <del This has been deleted.>deleted</del> or !!This has been highlighted.>highlighted!!.

# Chem plugin

This example requires the Chem plugin to be installed

The Chem plugin is used to format a molecular formula. See some examples from the plugin page:

• <chem>C2H6</chem>
• <chem>Na2HPO4 12H2O</chem>
• <chem>C2H5O2|-Na+</chem>
• <chem>Cl2H6N2Pt2+</chem>
• <chem>Al2(SO4)3</chem>

# Color plugin

This example requires the Color plugin to be installed

The Color plugin is used to write text in different colors:

• <color green>text</color>
• <color blue/lightgrey>text</color>
• <color #FF0000>text</color>
• <color /#FFff00>text</color>

# Columns plugin

This example requires the Columns plugin to be installed

The Columns plugin is used to place text in multiple columns: <columns 100% 50% - →

First column text (50% width).

<newcolumn>

Second column text.

<newcolumn>

Third column text.

</columns>

# Definition List plugin

This example requires the Definition List plugin to be installed

See an example of a simple definition list:

; termA : definitionA
; termB : definitionB
; termC : definitionC

# Emphasis plugin

This example requires the emphasis plugin to be installed

Some examples for changing the font color with the emphasis plugin: ::This should be green:: :::and yellow::: ::::and red:::: (if the default color set is used). And now the same for the background colors: ;;This should be green;; ;;;and yellow;;; ;;;;and red;;;;.

# Exttab3 plugin

This example requires the exttab3 plugin to be installed

The exttab3 plugin makes it possible to change the look of your tables. Have a look at the example form the plugin page:

{| title=“Extended Table Example”

{| title=“nested table”

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

List in Cell

• italic and bold
• monospace
quoting

ATTENTION:
Needs an extra empty line after lists and quoting syntax!

# Filelist plugin

This example requires the filelist plugin to be installed

The output generated by the filelist plugin is exported to ODT: lib/images/*&style=table&direct=1&preview=1&link=0

# Geotag plugin

This example requires the geotag plugin to be installed

The geotag plugin allows a user to annotate pages with a geotag: lat:51.565696, lon:5.324596

# Keyboard plugin

This example requires the keyboard plugin to be installed

Key sequences generated with the keyboard plugin are exported to ODT, see the example from the plugin page:

This displays the keys <key>ALT</key> + <key>H</key>.

# Mimetex plugin

This example requires the mimetex plugin to be installed

The mimetex plugin can be used to insert formulas which are also exported to ODT. See some examples from the plugin page:

<latex>

  \frac{3}{4 \pi}   \sqrt{4 \cdot x^2   12}\\
\lim_{n \to \infty}
\sum_{k=1}^n \frac{1}{k^2} = \frac{\pi^2}{6}\\
\it{f}(x) = \frac{1}{\sqrt{x} x^2}\\
e^{i \pi} + 1 = 0\;

</latex>

# Pagebreak plugin

This example requires the pagebreak plugin to be installed

A manual pagebreak can be inserted with the following code:

<pagebreak>

Let's test it…<pagebreak>…this text should be on a new page. If the pagebreak is included or not will make no difference in the browser view.

# Switchpanel plugin

This example requires the switchpanel plugin to be installed

SVG images can be easily included in the exported ODT document as the example from the switchpanel plugin page shows: <switchpanel> ==line:number=12 1,PC1a 2,PC2 3,PC3 6,?? ==line 1,AB 10:case=none 11,int.:color=red 12,sas:case=close </switchpanel>

1)
This text might be red or black. This depends on the changemarks plugin being installed or not
2) , 4)
This is a footnote
3)
This is a different footnote