Changes between Version 4 and Version 5 of OdtExportPlugin


Ignore:
Timestamp:
Apr 3, 2010, 8:56:46 AM (14 years ago)
Author:
Aurélien Bompard
Comment:

version 0.4

Legend:

Unmodified
Added
Removed
Modified
  • OdtExportPlugin

    v4 v5  
    2929
    3030In `trac.ini`, you can setup a few options :
    31  * '''get_remote_images''' (boolean, defaults to true) : wheather the plugin should download the remote images
    32  * '''replace_keyword''' (string, defaults to "TRAC-ODT-INSERT") : the string in the ODT template file to replace with the wiki page content.
    33  * '''dpi''' (integer, defaults to 96) : the screen DPI.
    34  * '''img_default_width''' (string, defaults to "8cm") : the width of an exported image when the plugin can't compute it.
    35  * '''img_default_height''' (string, defaults to "6cm") : the height of an exported image when the plugin can't compute it.
     31 * '''get_remote_images''' (boolean, defaults to `true`) : wheather the plugin should download the remote images
     32 * '''replace_keyword''' (string, defaults to `TRAC-ODT-INSERT`) : the string in the ODT template file to replace with the wiki page content.
     33 * '''cut_start_keyword''' (string, defaults to `TRAC-ODT-CUT-START`) and '''cut_stop_keyword''' (string, defaults to `TRAC-ODT-CUT-STOP`) : the text between these strings in the ODT template will be removed. See note below for the reason for these tags.
     34 * '''dpi''' (integer, defaults to `96`) : the screen DPI.
     35 * '''img_default_width''' (string, defaults to `8cm`) : the width of an exported image when the plugin can't compute it.
     36 * '''img_default_height''' (string, defaults to `6cm`) : the height of an exported image when the plugin can't compute it.
     37 * '''remove_macros''' (list, defaults to `PageOutline, TracGuideToc, TOC`) : the macros which will be removed on export. This is mainly because the table of contents should be handled in the ODT directly, not by generating a list of links. Warning, if these macros are in a sub-page included by the IncludeMacro (or similar), they will not be removed.
    3638
    3739Those options must be put under a `[odtexport]` section in the ini file, such as :
     
    4143replace_keyword = REPLACE_ME
    4244}}}
     45
     46=== About the `CUT-START` and `CUT-STOP` tags ===
     47
     48In an ODT file, the only styles that will be saved are the styles which 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 `CUT-START` and `CUT-STOP` tags. This way, the styles will be retained in the ODT file, but the dummy text will be removed on export.
     49
     50=== Choosing a template ===
     51
     52The default template is named `wikipage.odt`. You can use a custom template by creating a file with this name and putting it in the `templates` directory of your Trac instance. This template will be used by default for all the pages.
     53
     54You can also create other ODT files to be used as templates, and put them in the same directory. Then, you can use a special macro in the wiki page to choose the template. This macro is `OdtTemplate` and can be used as such: `[[OdtTemplate(my_other_template)]]`. The `.odt` suffix will be appended, don't put it in the macro.
     55
    4356
    4457== Bugs/Feature Requests ==