Advanced content

Basic tables

Basic tables can be inserted with the Github-flavoured Markdown table extension.

| Heading    | Heading    | Heading |
|:-----------:----------:|--------:|
| Something  | Something  | ?       |
| Another    | Another    | ?       |
| One more   | One more   | ?       |
Heading Heading Heading
Something Something ?
Another Another ?
One more One more ?

HTML tables

Regular HTML can also be used for tables, allowing full custom styling (including table and column widths).

<table style="width:100%;">
 <tr>
  <th>Heading</th>
  <th>Heading</th>
  <th>Heading</th>
 </tr>
 <tr>
  <td class="bold">Example</td>
  <td>Example</td>
  <td>Example</td>
 </tr>
 <tr>
  <td><strong>Example</strong></td>
  <td class="w-success-text">Example</td>
  <td><span class="dgIcon" data-name="check"></span></td>
 </tr>
 <tr>
  <td><strong>Example</strong></td>
  <td class="w-error-text">Example</td>
  <td><span class="dgIcon" data-name="x"></td>
 </tr>
</table>
Heading Heading Heading
Example Example Example
Example Example
Example Example

To create links to other sections within one content page, put hyphens between the words in the heading and prepend with #:

[link to heading](#this-is-a-heading)

... other page content here ...

This is a heading
-----------------

To create links to other content pages provide the relative url to the page:

[link to heading](example-page.html)

Control of page breaks in the PDF

DocGen does not provide precision control over PDF layout. However, some steps can be taken in case of page break issues (the most common problem).

To force a page break, insert the following before an element that should appear on a new page:

<p class="dg-forceBreak"></p>

DocGen automatically tries to eliminate page breaks inside code blocks, block quotes, and table rows. To apply the same technique to other elements, revert to HTML and apply the dg-avoidBreak class. For example:

<p class="dg-avoidBreak">A long paragraph</p>