PDF Styling
To control the look and feel of your PDF outputs, we recommend that you follow the PDF Styling Workflow. This involves creating or editing a PDF layout, which is where you define the style settings for your PDF. You can use the PDF layout to control a wide range of styles for your PDF, including font styles and colors, spacing, and page breaks, all without any programming knowledge.
Paligo comes with a built-in PDF layout that you can use. You can also Create a Layout and edit them to meet your own requirements. To find out about the various PDF styling and customization settings, see PDF Layout Editor Options.
For PDF, all of the styling is done through the layout (there is no CSS involved). When you publish, Paligo uses the underlying XSLT to take your content and transform it into PDF and applies your styling choices in the process.
![]() |
Note
To make changes beyond what the Layout Editor provides, you will need a customization. Please contact your account manager or support for more information.
The steps you should follow to style your PDF output are:
-
Create your content in Paligo topics and add it to a publication. Some parts of the content can be styled by using attributes, for example, you can set image sizes. But you will apply most of the styling in the PDF layout.
-
Create a Layout or Edit a Layout.
With PDFs, the majority of the styling settings are set in the PDF layout.
-
Use the PDF Layout Editor Options to control the style of the various elements in your PDF output, including headings, subheadings, font colors, font sizes, spacing and more.
-
Publish to PDF using the PDF layout you edited.
The tree of items you can choose to style in the Layout Editor is divided into a number of sections. Each section is described below, with the items you can style and the options available for them.
Note
Many of the items and options are self-explanatory and have explanations right in the Layout Editor. So only the items that may not be immediately transparent are explained below.
Category |
Description |
---|---|
Document |
Use to set some of the page preferences for the PDF documents that Paligo will produce when you publish with the layout. For details on the page settings, see PDF Styling. To learn about the number divisible by 4 setting, which is often needed for printing, see Troubleshoot a PDF Booklet. |
Languages |
Specify if and how you want language names for a multilingual publication to appear. For details, see Set Multi-Language Preferences (PDF). |
Page |
Here you can set the number of columns for your output, set some page preferences such as page numbering after the TOC, and also style header and footer rules. For details, see: |
Page margins |
Use to set the margins around the edge of each page and the body area of each page. Also set the start indent for body content. For details, see Adjust Page Margins (PDF). |
Booklet |
You can create multi-fold booklets for your PDF layout (3-fold, 4-fold, etc). For details, see Booklet. |
Fonts |
Use to set the default font settings for titles and body text. Paligo will use the default fonts unless you specify different font settings elsewhere, for example, if you set different styles for headings in the Section titles section. For details, see Set Default Fonts (PDF). NoteIt is possible to add additional fonts in your Paligo instance. Contact support and send us:
Most new added fonts will work out-of-the-box. But if additional customization is needed for it to work, there is a fee for a customization service. |
Images |
If you set a default width for images, any images that have no specific width set on them in the topic itself will get this width. |
If you use inline images (the inlinemediaobject element), e.g for icons inline with the text, it defaults to fit the image in the normal line height. If you want to change this, you can do so here. |
|
You set it as a compound value: 0.25pt solid silver, e.g, setting border width, style, and color. You can also set a border radius if you want rounded corners. Either use padding to get it as a frame, or if you want to cut the corners of the image itself, experiment with values and a white color to match the page color. Usually a ratio of 3 gets a good result. Eg., border = 3pt solid white and border-radius = 9pt. You can override the default setting here on individual images by setting the The attribute should be set on the NoteNote that there is one condition for this to work properly: every image that you set borders on must have a width attribute. Otherwise the border will be as wide as the page, which the image might not be. So if you set borders on images globally in the Layout Editor, you need to set the image "width" attribute on all images. |
|
TOC |
Use to control the styling of the table of contents for a publication. There are also options for adding a table of contents for each language and lists of titles, such as lists of figures, tables, and examples, see Enable Automatic TOC and LoT (PDF). Besides various styling options, you can also decide if a TOC should be generated at all, and if so to which depth of nesting, see Style TOC Title and Style LoT Titles. TipTo exclude some topics from the TOC, give their This is only for PDF. For HTML / HTML5 you can control it with Chunking. |
Related Topics Section |
Use to style the related topics section that appears if you set your PDF layout to use the Relationship taxonomy feature. |
Glossary, Index, and Bibliography |
Use to set up automatic features for your glossaries, indexes and bibliographies. These include automatic titles, sorting, index columns, and glossary lists. For more details, see: |
Bookmarks |
Options for the use of bookmarks in PDF and down to which level of depth. |
Misc |
Options for setting:
|
Filtering and taxonomies |
Options for using taxonomies for filtering. The options available are the same as for HTML5. To learn about taxonomy filtering, see Taxonomy Filters. |
Bookmarks |
Choose whether to generate PDF bookmarks |
Prepress |
If you need to set crop marks, bleed, etc, sometimes required for printing purposes, you can set them here. |
Draft and Watermark |
Use these parameters to set your PDF to drafts, add watermarks, and background images so that readers know they are looking at a draft copy. For more details, see Enable Drafts and Watermarks (PDF). To have your regular styling, create a new layout based on your custom style, and then add these parameters. |
PDF Properties |
Use to define the metadata for the PDF document, including title, subject, keywords, display title for accessibility, and initial settings for the PDF viewer. For more details, see PDF Document Properties and Metadata. |
Category / Element |
Styling parameters |
Description |
---|---|---|
General |
Graphics and font settings |
Select whether your admonitions (warnings and the like) should use icons or not by setting the graphics option. By default the standard admonition icons in Paligo will be used, but this can be changed to use custom icons. Customize the appearance of the admonitions, see Admonition Styles for PDF. |
Graphical |
Various options for styling admonitions with icons, including the possibility to upload your own icons to replace the default ones. |
Use the settings in the General category and the Graphical category if you want admonitions with icons. |
Nongraphical |
Various options for admonitions if you don't use icons. |
Use the settings in the General category and the Nongraphical category if you want admonitions without icons. |
Category/Element |
Styling parameters |
Description |
---|---|---|
Back cover recto |
Use to style various elements and content boxes on the "recto" side of back covers. For details, see Cover Pages and Front Matter. |
|
Back cover verso |
Use to style various elements and content boxes on the "verso" side of back covers. For details, see Cover Pages and Front Matter. |
Category |
Description |
---|---|
Enable cross-reference auto-title customization |
When enabled, the cross-reference auto-title customizations below can be used. Otherwise legacy cross-reference auto-text is used, or any stylesheet customization you may have. Default: disabled. |
Cross-reference auto-title |
Determines the format of the generated text for cross-references. See Cross-Reference Styling for options available. Default: 'title page', which produces a format like 'My Topic Title (page x)'. |
Cross-reference auto-title for formal elements |
Determines the format of the generated text for cross-references for formal elements (like tables, figures, examples). See Cross-Reference Styling for options available. Default: 'default', which produces a format like 'Example 5, "My Title"'. |
Cross-reference label/title separator |
Punctuation or space separating label (if used) from title in cross-references, when the auto-title parameter above is set. NoteFor a space, use 's' (without the quotes). Default: ':s', which produces a format like 'Example 5: "My Title"'. |
The term Formal elements comes from the content model. It basically is an umbrella term for elements like lists, figures, tables, equations, examples. In this section you can make general settings applying to all such elements consistently if desired.
Note that any settings you make on a higher level (General) can be overridden if you set another value on a lower level (like "informalexample")
Most options are self-explanatory and not described here.
Category |
Description |
---|---|
Formal elements / General / Use auto-label text for formal element titles |
Formal elements like tables, figures, and examples will get a title with a label and number, for example: 'Table 3: My Table'. If you only want the title, without the label and numbering, you can disable this here. Default: Enabled |
Formal elements / General / Restart auto-label numbering |
If enabled, tables, figures, and examples will restart their numbering for each topic, section (including internal sections inside topics), or chunk. Default: continuous numbering throughout the publication. |
Exclude label for abstract |
If enabled, the label for an abstract is excluded from output. This is useful if you do not need it, and if publishing to multiple formats where hiding it with CSS does not work. Default: disabled. |
Category |
Description |
---|---|
General |
Set whether you want a front page generated for your PDF. See Generate a Cover. |
Title block |
Positioning and spacing for the title block, including subtitle if used. |
Title |
Specific styling for the title. |
Subtitle |
Specific styling for the subtitle |
Info elements |
Use the Info elements settings to control the styling of the info elements, including the alignment and order. There are various "info elements" that you can add to the publication topic for your publication. These include |
Logotype |
Use to upload a logo for the front cover and set its alignment, margins, height and width. See Logo on Cover. |
Product image |
Use to upload a foreground image, also known as a product image, on a front cover. |
Background image |
Use to upload a background image for the front cover. See Cover Background. |
Languages |
Use to control how multiple languages are shown on the front cover. You can choose to:
See Languages on Cover. |
Front cover recto |
Use to style various elements and content boxes on the "recto" side of front covers. For details, see Cover Pages and Front Matter. |
Front cover verso |
Use to style various elements and content boxes on the "verso" side of front covers. For details, see Cover Pages and Front Matter. |
The inline elements include: filename, guilabel, guimenus, guibutton, guiicon, glossterm, computeroutput, productname, quote and more.
You can edit the PDF layout to define font family, font weight, font style, font size, font variant, color, border, usage of capitalization and more. For details, see Inline Elements for PDF.
The keep-together options provide the possibility to control how elements are kept together on the same page or column, by default.
It is available for many of the most common elements, and each one has a dropdown where you select one of three values:
The default values often work very well, and usually you don't have to change these default settings, but if you do these are the options:
-
no - means the element will not be kept together by default.
-
yes - means the PDF processor will attempt to keep the element together. But the processor may in certain cases run into cases where it is not appropriate, and will then attempt to select the best keep option. This is usually the best choice if you want to keep a certain element together.
-
always - means the element will be kept together no matter what. This is the strictest rule, and may be ok, but could also cause some undesired keeps.
Note
Note that you can always override the default values for a particular element in a topic, using the xinfo:keep-together
and xinfo:keep-with-next
attributes.
Category/Element |
Styling parameters |
Description |
---|---|---|
General |
Margin before/after lists. |
Default value is used if the value here is "auto". Specify a value such as 15p, or 2em e.g t if you want a specific margin. There are also options for controlling the space after block elements inside lists and procedure steps, see Adjust List Spacing (PDF). |
Unordered Lists |
Various options for the bullet formatting. |
You can specify what symbol you want for bullets depending on their nesting level. |
Ordered Lists |
The width of the label (number). |
Set this if you want to control how much space there is between the label and the text of the list item, see Adjust List Label Width and Alignment. |
Procedures |
Font and color options |
Use these styling options to make your procedures stand out from regular ordered lists. |
Category/Element |
Styling parameters |
Description |
---|---|---|
All sections |
Default font size, font weight, section numbering, and color for all titles. |
The font size uses a reference notation so that you can set the size relative to the body font size. This can be useful to get a consistency in your styling. Only change the value of the factor number if you want to do this. If you want to hard code the value (for example 15pt) you can do this too. This is also the category to use if you want to set numbering for sections (topics). For instance if you want your section titles to have numbering like 1.2, 1.3.1 and so on. Learn how to Style Titles and Subtitles (PDF) |
Level 1 |
Same parameters as all sections, and all other levels, and in addition background color. |
Level 1 titles (topics on the highest level in a project / publication nesting structure) normally represents chapters or the equivalent. In the default style for PDF top-level topic titles ("chapters") get a blue banner background. You can change this color, or just use white to remove the banner. Then change the font color to fit this background. |
Level 2, 3, 4, 5, 6 |
Same settings, but setting it separately for all lower levels. |
You can set styling for titles down to level 6. Best practice in technical documentation is to aim for 4 levels, but that can sometimes be hard to accomplish, so up to 6 levels can be styled. Should you have deeper levels than 6, anything deeper than 6 levels will get the same styling as level 6. |
Bridgehead |
Same common properties as for section titles. |
A bridgehead is an "intermediate" title that you can insert in the middle of a topic. NoteIn most cases, we recommend that you avoid using |
Category |
Sub-category |
Description |
---|---|---|
Tabstyle1 - Tablstyle5 |
General |
Use to set options for up to 5 different table styles. You can assign each table in your content to any 1 of the 5 styles. Tables use Tabstyle1 by default. When you publish, Paligo will apply the styles from the appropriate Tabstyle. See Style Tables (PDF). |
Header |
Use to set up the header for a table style. |
|
Footer |
Use to set up the footer for a table style. |
|
Footnotes |
Use to style footnotes for PDF. |
Verbatim is a term for different kinds of elements that are to be output exactly as they are typed, i.e preserving white space and line breaks, such as elements for code samples, like programlisting
.
Such elements can be particularly tricky in PDF output, because they can take up more space than the page allows. This section allows you to make a number of settings to deal with that problem:
-
Font-size: Set the default font-size for verbatim elements. You can override this on individual elements by using the
role
attribute, setting it to a value like font-size:8pt. You can also use the common size designators similar to CSS: small, smaller, etc. -
Line-wrap: You can enable line wrapping by default for all verbatim elements. And if you do, you can choose to indicate that the line is really meant to continue from the previous line, as is a common convention when exemplifying code. You can choose which character to use as an indicator for this ("hyphenation character"). Note that your font must support the character you choose. This default setting can also be overriden by using the attribute
role
, set to a value of either wrap-option:wrap or wrap-option:no-wrap. -
Color and border: You can also select whether you want your programlisting to have a background color and/or border.
-
Graphical rendering of keycap: Use this if you want the keycap elements to render as a keyboard key, like so: AltShiftV.
-
Syntax highlighting: you can turn syntax highlighting on for code snippets (
programlisting
, etc), choose a theme and also the default programming language. If you set thelanguage
attribute on a particular element, that will override the default setting here.See this page for some samples of the styles available: Syntax highlighting styles. (Note that the plugin used is not the same as the one used in Paligo, but the styles are the same).
Note
-
Note that syntax highlighting for PDF and HTML uses different highlighting mechanisms, so while both offer a number of themes, some similar, the exact look and feel will not be quite identical for each of these outputs.
-
If syntax highlighting is enabled, this option will also control the background color of the
programlisting
. So even if you select a background color for verbatim elements, the syntax highlighting background will override it.However, if you select a syntax highlighting style with a background color other than white, there will be no padding. So you may still want to apply a background color (the same as the one used by the syntax highlighting), to apply padding.
-