Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: Unknown

====== Exporting ======

Zim will be able to export content to various formats. At the moment only exporting to (simple) [[Help:Export:HTML|HTML]] and [[Help:Export:LaTeX|LaTeX]] is supported.

To open op the export dialog in zim use the "//File//->//Export//" menu item. This dialog asks for a number of input fields before you can start exporting.

Under **Pages** you can check "Complete notebook" if you want to export all the pages in the notebook.

The **Format** allows the choice of the output format.

The **Template** field asks you to select a template file (see below). When you select "''Other...''" in the combo box you can browse for another file in the input field below the combo box.

Finally an **Output folder** is required, this is the directory name where you want to save the exported pages.  

If you specify an **Index page** a page will be generated that contains a list with links to all pages that were exported. This can e.g. be used as a site map.

The **Documents** section allows you to choose what you want to do with linked files and images. Files and images that live inside the notebook directory (attachments, equations etc.) will always be copied to the new directory, but the behavior for files and images under the document root can be changed.

TODO explain document root somewhere

===== Templates =====
The export code only produces the tags that represent the content of the page. [[Templates]] are used to create complete output. A few standard templates are packaged  with zim, see the pages for the output formats for a list and descriptions. You can also make your own.

===== Exporting from the commandline =====
Try something like:

'''
$ zim --export --output=./html \
  --format=html --template=./foo.html ~/Notes
'''

See "''zim --help''" for all options.

