7 Output Formats

Some cursory remarks. The output can be fine tuned by setting certain variables – see 15.1.

7.1 HTML, single-file (no chunks) output

This is the default formatter. It generates plain html; tidy gives some warnings (mostly about nested lists), but no errors. Formatting has to/should be done via a css.


Currently only some kind of APA-look-alike style is provided. The bibliography is compiled directly from a set of BibTeX files. It probably fails on some entries.
Set the document variable “headings” (see 12.1) or the headings option (see 15.4) to “plain” to turn off numbering.

7.2 HTML Site, multi-page (chunky) output

This is a variant of the HTML formatter that can be used to generate websites. The output is broken at first level heading so that each chapter is saved in its own file. By default the file names are numbered (e.g., basename.html, basename00001.html, basename00002.html …). If you give a first level heading an id (see 10.4), this id will be used instead – as it was done for deplate‘s online documentation.

If docNavbar variable is defined and true (i.e., “1”), a navigation bar is added to the top and the bottom. If docNavbar equals top, only the top navigation bar is displayed; if it equals bottom only the bottom navigation bar. In general, using templates is a much more convenient and flexible way to add navigation bars. Take a look, e.g., at deplate/templates/html-left-tabbar-js.html for the template that was used to create the online documentation.

If JavaScript is enabled, you can navigate through the slides by pressing:

Previous page
Front page
<a-n>, <Shift>
Next page (double clicking on a heading moves to the next page, too)

Navigation was originally inspired by remotehtml slides by Gervase Markham.

7.3 HTML Slides, abbreviated online presentations

This is a variant of htmlsite that can be used to create html based presentations. In its default setting, it “swallows” paragraphs (unless the noSwallow variable is given). This way you can easily generate a full paper and an abridged presentation version (just the lists, the figures, and the tables) from the same source.

7.4 HTML Website

This is a variant of the htmlslides formatter that places a tabbar at the top of the page. htmlwebsite was kindly contributed by Fritz Heinrichmeyer.

NOTE: This formatter is obsolete. Fritz Heinrichmeyer now uses his htmlslides-navbar-fh module in conjunction with the html-slides formatter and page templates.

7.5 XHTML 1.0-transitional (xhtml10t)

This is a minor variant of the HTML formatter that improves XML conformance.

7.6 XHTML 1.1 with MathML (xhtml11m)

This is a hackish variant of XHTML 1.0t.

7.7 Php, PhpSite

This is a simple variant of the HTML formatter that can be used for generating php output. PhpSite is based on HTML Site.

The following additional elements are provided by the php-extra module.

Additional region:

Insert the body as php code

Additional command:

Insert the body as php code

Additional macros:

{php: BODY}
Insert as php code (<?php BODY ?>)
print_r the php code (<?php print_r (BODY) ?>)

Example 7.1: Php output

* Test Php-Output

#Php <<--
$mod = "absolutely";
echo '<p>Here we go!</p>';

Mixing php control constructs and ''deplate'' markup:

#PHP: foreach(array('doing', 'saying', 'writing about') as $action):
I have {php: echo $mod} no idea{fn: none} what I'm __{=$action}__.
#PHP: endforeach;

#Fn: none <<--
None whatsoever.

7.8 LaTeX

If you give the --pdf option, some packages are marked for use with pdflatex.

The LaTeX-formatter assumes the use of the natbib-package for citations (see DeplateMacro#formatted_citation).

The graphicx package is used for displaying graphics, the hyperref package for hyperlinks.

If you set the useBooktabs variable, the booktabs package is used. This results in prettier ready-to-print tables but interferes with table styles.

If you don’t provide image dimensions (bw, bh options), deplate uses ImageMagick’s identify to guess its width and height.

  • If you prefer a different tool, redefine Deplate::External.image_dimension(filename), which returns the bounding box as [bw, bh, bx, by] (bx and by are most likely ignored)

You can set the DIV variable to change the typearea. This uses koma’s typearea package.

7.8.1 latex-dramatist: Typeset stage plays with the dramatist package

In conjunction with the play input filter, this formatter generates nicely formatted stage plays, thanks to the remotedramatist package.

  • Scene titles won’t be printed.
  • Groups can be defined as follows:
      Name One :: A man
      - Group A
          Name Two :: A woman
          Name Three :: Another man
      Name Four:: Another woman

7.8.2 Sweave: Handle embedded R-code via Sweave

This formatter differs from the LaTeX formatter in that embedded R code is formatted for post-processing by remoteSweave. The output of deplate will be an Rnw-file.

The R and Img regions take an extra option sweave (a string that will be inserted as sweave options).

Example 7.2: Sweave output

#R sweave="engine=R" <<

#Img: R <<--
#CAP: Pairs plot of the iris data.

Please note the double quotes in the argument list of the R region.

7.9 Docbook: article, book, reference pages

The docbook formatter currently is able to generate proper xml for the deplate manual but it doesn’t perform any validation and doesn’t try to modify the input in order to attain valid output. It should work most of the time though.

The formatter currently comes in the following flavors:

Format as an article
  • use the headings: “sect1”, “sect2” …
Format as a book
  • use the headings: “chapter”, “sect1”, “sect2” …
Format as a reference or man page
  • use the headings: “refsect1”, “refsect2” …
  • make uses of the following doc variables if provided
    • refentry (or use the filename)
    • manvol (defaults to “1”)
  • the document title (defined with #TI) is used as refpurpose
  • there is currently no way to define a synopsis in deplate

7.10 Plain text

Wow! deplate can also convert mostly markup-free text formats to plain text.

If the asciiArt variable is set (or if it set to “jave”), deplate uses remoteJave to convert images to ascii representations. You can use the additional ascii_algorithm and ascii_width arguments to tweak jave’s output.

This requires a jave command to be in the path. Such a command could look like this:

exec java -jar $JAVE_HOME/jave5.jar $@

or (for Windows):

@echo off
%JAVA_HOME%\bin\java.exe -jar %JAVE_HOME%\jave5.jar %*

7.11 Template

This formatter is used by deplate for filling in templates as described in 5.5. From a user perspective, it could be useful in conjunction with the template input filter.

Prev Home Next
1 Introduction
2 Getting deplate
3 Installation
4 Usage
5 Configuration
6 Input Formats
7 Output Formats
7.1 HTML, single-file (no chunks) output
7.2 HTML Site, multi-page (chunky) output
7.3 HTML Slides, abbreviated online presentations
7.4 HTML Website
7.5 XHTML 1.0-transitional (xhtml10t)
7.6 XHTML 1.1 with MathML (xhtml11m)
7.7 Php, PhpSite
7.8 LaTeX
7.9 Docbook: article, book, reference pages
7.10 Plain text
7.11 Template
8 Themes
9 Modules
10 Markup
11 Regions
12 Commands
13 Macros
14 Skeletons
15 Variables and options
16 Internals
17 Extending deplate
18 Bibliography
19 Index
About this page