plugin:odt
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
- | |
- | — |
---|---|
+ | |
+ | plugin:odt [2013-01-28 16:04] – Klap-in |
@@ Line -1 +1,281 @@ | |
====== OpenOffice.org Export ====== | |
---- plugin ---- | |
description: | |
author | |
email : andi@splitbrain.org, | |
type : render, syntax | |
lastupdate : 2010-10-30 | |
compatible : 2007-06-26 and later | |
depends | |
conflicts | |
similar | |
tags : export, odt, pdf | |
downloadurl: | |
sourcerepo : http:// | |
bugtracker : http:// | |
donationurl: | |
---- | |
This plugin allows you to export a page to the [[wp> | |
This plugin was initialized by [[andi@splitbrain.org|Andreas Gohr]], and is now developed and maintained by [[http:// | |
===== Download ===== | |
[[http:// | |
Latest release: [[http:// | |
Changes: | |
* Bugfixes | |
* Table rowspan support (closes: [[http:// | |
* Ukrainian translation (by Oleksiy Zagorskyi) | |
* Remove empty paragraphs from output | |
* Download external images | |
Older releases are available [[http:// | |
The development can be [[http:// | |
{{rss> | |
This plugin works with DokuWiki 2007-06-26 and later. | |
===== Usage ===== | |
To make a single page exportable you can add the following macro to the page: | |
~~ODT~~ | |
A better way is to integrate an export button into your [[: | |
Use the following to add another button in the upper or bottom button row of the default template((In ''/ | |
< | |
<form class=" | |
<div class=" | |
<input type=" | |
<input type=" | |
<input type=" | |
</ | |
</ | |
</ | |
Or use this for a simple 16x16 icon somewhere in your template: | |
< | |
<a href="<? | |
</ | |
===== Customizing ===== | |
There are three ways of customizing how the output will look like : | |
* Modify the export of the [[wiki: | |
* Use the OpenOffice feature to load the styles from an existing file or template : | |
* export your page in ODT, and open it in OpenOffice, | |
* bring up the styles panel (F11), | |
* click on the top-right icon, | |
* choose "Load styles..." | |
* select all the checkboxes on the bottom (**including** " | |
* click "From file..." | |
* Use a pre-made template, see the following section for details on this feature. | |
==== Templates support ==== | |
You may use templates to export your document. A template is a regular ODT file, as produced by OpenOffice (for example, not tested with other ODT-supporting applications). | |
In your wiki page, add the following code: | |
< | |
{{odt> | |
</ | |
and upload your template to the wiki using the media manager. By default, you must put it in an '': | |
The exported page will be added after the content of your template. If you include the string '' | |
:!: Warning : the '' | |
There are two additional tags you may use in your template : '' | |
are applied to some content in the document. If you want to create an empty ODT document for this plugin, and still want to define styles which will be applied to the wiki content, you have to write some dummy text, apply the styles to this text, and surround the text in the '' | |
===== Other plugins ===== | |
If you use other syntax plugins, their output may not appear in the exported ODT document: those plugins must be modified to support the ODT output format. However, some plugins already support it. | |
^Plugin ^ Description ^ | |
|[[plugin: | |
|[[Notes]] | The nice-looking notes provided by the [[plugin: | |
|[[Include]] | The [[plugin: | |
|[[Math2]] | The [[plugin: | |
|[[LaTeX]] | The [[plugin: | |
|[[Chem]] | The [[plugin: | |
|[[Color]] | The [[plugin: | |
|[[DivAlign2]] | Hi. Just wanted you to know that I've made one of my plugins, [[plugin: | |
|[[nspages]] | The [[nspages]] plugin creates TOC of namespaces. The latest version supports the ODT format.| | |
See also [[plugin: | |
===== Translations ===== | |
The plugin is translated into English, German, French, Italian, Spanish, Japanese, Russian and Chinese. Thanks a lot to the translators, | |
===== Bugs ===== | |
To report bugs or suggest features, **please** use [[http:// | |
===== Discussion ===== | |
==== Language-specific styles ==== | |
<code diff> | |
diff -ur odt.old/ | |
--- odt.old/ | |
+++ odt/ | |
@@ -307,6 +307,9 @@ | |
| |
| |
| |
+ foreach ($this-> | |
+ $extrastyles .= $stylexml; | |
+ } | |
// add defaults | |
| |
@@ -364,6 +367,7 @@ | |
| |
| |
+ $value = str_replace('< | |
| |
// build final manifest | |
@@ -910,7 +914,16 @@ | |
| |
| |
- $style_name = " | |
+ if($language!='' | |
+ $style_name = "Code $language"; | |
+ $this-> | |
+ < | |
+ < | |
+ </ | |
+ '; | |
+ } else{ | |
+ $style_name = " | |
+ } | |
if ($type == " | |
if (is_null($language)) { | |
diff -ur odt.old/ | |
--- odt.old/ | |
+++ odt/ | |
@@ -113,6 +113,7 @@ | |
< | |
< | |
</ | |
+ < | |
< | |
< | |
< | |
</ | |
==== General Use ==== | |
Will someone write a short example how to **integrate export button into template**? I tried to do it myself, but CSS, PHP, HTML are unfamiliar for me. Template consist of 9 files of different types. Which file should be modified? Thanks. --- // | |
> In ''/ | |
> Now it is wise not to edit this default template file but proceed as stated on [[: | |
> --- // | |
---- | |
It is possible to **import ODT into DokuWiki**? | |
> Yes, have a look on http:// | |
> Though, it looks like the latest version of Writer' | |
---- | |
How can I get the **page title** to be included in the template, not just as the name of the file ? ---// | |
---- | |
**Thanks** for this plugin! Downloaded, added the button in ACH template and works :-) -- at least now, and I'm not using the template feature yet ;-) --- // | |
---- | |
Thanks for the GREAT plugin. works out of the box in no time! Is there any means of **specifying the template** in the link rather than the wiki code? I'd prefer a single modification to my template, like | |
<?php echo exportlink($ID, | |
>for now I hacked the plugin to add a " | |
1. add to odt/ | |
$conf[' | |
2. add to odt/ | |
$meta[' | |
3. edit function document_end() in odt/ | |
function document_end(){ | |
+ if (!$this-> | |
+ | |
+ } | |
+ | |
if ($this-> | |
> That's a good idea, I should probably include that at some point. | |
** ODT export error **\\ | |
I bumped into the problem that ODT export stopped working for me, even the pdf export stopped working. | |
After a long time I found the error. | |
In the global apache2 php.ini file mbstring.func_overload was set to 7 by mantis bug tracker | |
(mbstring.func_overload = 7).\\ | |
Dokuwiki ODT export does not like this setting. | |
It has to be mbstring.func_overload = 0 or if you wish to set it only for one site use .htaccess (php_value mbstring.func_overload 0). | |
Sören | |
\\ | |
\\ | |
**Modifying Table Properties** | |
We are trying to get tables not to break on page boardes - the progress is in here: http:// | |
* **UPDATE** This one is finaly fixed! We now have a modified renderer.php which generates non breaking tables all the time, I am so happy :D Thanks to one of the moderators of the OpenOffice Forums :D Get the renderer.php here: http:// | |
==== Non-ASCII pagename in Windows cannot export ==== | |
It's because Windows doesn' | |
<code diff> | |
=== (+2,-2) renderer.php === | |
@@ -382,7 +382,7 @@ | |
} else { | |
| |
} | |
- $this-> | |
+ $this-> | |
if (is_dir($this-> | |
| |
</ | |
--- [[user> | |
==== Extra space after linebreak ==== | |
If you use %%\\\n%% as single linebreak, there would be an extra space after the linebreak in the output odt. This can be fixed by adding an instruction in the document_end funciton in the renderer.php: | |
<code diff> | |
$this-> | |
+ $this-> | |
</ | |
--- [[user> | |
==== Does not export text descriptions for file links ==== | |
It would be great if this plugin could also export text descriptions that link to files: | |
< | |
[[ks: | |
[[http:// | |
{{: | |
</ | |
--- // |
plugin/odt.txt · Last modified: 2024-03-06 12:22 by thomas-schaefer-nh