Check for Additional Properties
You can check which additional properties you can add to your theme or as
subproperties.
Before you begin: If there are no properties or subproperties available, no
options display, and any code you add returns an error.
-
To check for additional properties do one of the following:
- Enter a new line in the most outer brackets.
- Enter a new line in the brackets of the required property or
subproperty.
If entering a new line after another property, make sure to add a comma on the
previous line first.
-
Enter a double quotation mark.

Result: A list displays with possible properties to add.
Change the Body Font
-
In the style property, find the body
definition.
-
Inside body, replace the blue text with the change.
You can control the font family, size, line height, and many other properties.

-
Click
Save.
Result: When you publish a document using this publishing theme, it displays with your new
style applied. In the example above, the document uses the serif font throughout, rather
than monospaced.
Change the Text Margin
-
In the style property, find the body
definition.
-
Inside body, replace the blue text with the change.

-
Click
Save.
Change the Page Footer
-
In the style property, find the footer
definition.
-
Inside footer, replace the blue text with the change.

-
Click
Save.
Changing the Heading Style
-
In the style property, find the h1
definition.
-
Inside h1, replace the blue text with the change.

-
Click
Save.
Add Table of Contents
You can define style properties for up to four levels of the table of contents. The
default maximum table of contents is three, you can add up to two more by adding the value:
"toc-maximum-level"= 5
-
In the style property, find a toc
element.
-
Verify that there is a comma after the closing bracket of the previous
toc element. If there is no comma, add one.
-
Insert a new toc element on the next line followed by a colon,
pair of curly braces, and a comma.
For example: toc-2: {},
-
Inside the brackets, you can add subproperties like color, indentation, and
font.
-
Enter a double quotation mark and select the appropriate value from the list of
suggestions.
-
Enter a colon followed by another double quotation mark.
-
Select or enter the appropriate value and add a comma.

-
Click
Save.
Result:
When you publish a document using this publishing theme, the table of contents displays
according to your defined styles, depending on the hierarchy of the document map.
Add Vertical Content
-
In the style property, find a body
element.
-
Inside body replace the red text with the change.

-
Click
Save.
Change the Cover Page
You can choose to hide the cover page by adding the following for the
cover element
-
In the style property, find a cover
element.
"cover": {
"display": false
...The default value for this element is true which enables the cover page
in published documents.
-
Inside cover, replace the black text with the change.

-
Click
Save.
Change the Table Default values
-
In the style property, find a table
element.
-
Inside table, replace the black text with the changes.

-
Click
Save.
Change the Table Width
-
In the style property, find a table
element.
-
Inside table, move and resize tables by modifying the start
indent and width properties. To do this:
-
Enter a start indent. The start indent can be a positive or negative number.
-
Enter a table width. The width can be a percentage or length-type value.
The screenshot below shows an example with a sample publishing theme on the left and
the rendered results on the right.

-
Click
Save.
Add a Table to the Header or Footer
-
In the style property, find the header
or footer element and in either element, find the
even.
-
Inside even or odd, there is an empty
table-content. You can enter any of the following:
- You can select the location of the table in the header or footer by using
"location": top/bottom.
- In content, you can enter text (including parameter
definitions and placemarkers) or a background image.
- To add a background image, enter the following:
"content": {
"image": {
"background-image": "Example",
"width": "2cm",
"height": "1cm"
}
} You can upload using file explorer or search for an existing
image in Structured Content Editor.
- To add a placemarker, enter
"text": "Medication Review:
{placemarker:PM-0000001}". If the repository does not contain a
placemarker, the text defaults to JSON text.
- You can span content over multiple rows or columns. The following example spans
one column and two rows:
"col-span": 1,
"row-span": 2The default value for both elements is one.
"table-content": {
"location": "bottom",
"table": {
"rows": [
{
"cells": [
{
"content": {
"image": {
"background-image": "Example",
"width": "2cm",
"height": "1cm"
}
},
"col-span": 1,
"row-span": 2
},
{
"content": {
"text": "Document Title: {documentTitle}"
},
"col-span": 2,
"row-span": 1
}
]
},
{
"cells": [
{
"content": {
"text": "Medication Review: {placemarker:PM-0000001}"
},
"col-span": 1,
"row-span": 1
},
{
"content": {
"text": "Sample table cell content"
},
"col-span": 1,
"row-span": 1
}
]
}
]
}
}
The example above displays a table at the bottom of either a header or a
footer. The table is three columns and three rows. The background image is two rows tall
and the document title is two columns wide. To prevent headers and footers from
overlapping with the main content, enter the following the body
element: "style": {
"body": {
"header-margin": "35mm",
"footer-margin": "40mm"
}
}
Create a Table Style
If you have multiple tables in your document map that require different table
settings, you can create multiple different table styles.
-
In the table element. type and enter the
styles element.
-
Inside the styles element, you can create a table style. You
can give it a custom name.
Note:
You can have multiple table styles.
-
Inside the table style, you can enter the same settings as
table.
-
Click
Save.
Result: You can now apply the table style to a table in your document
map, see Apply a Publishing Theme Table Style.
Configure Borders for Body Tables
You can specify the style, width and color of a border for tables in the body of a
document.
Before you begin: You can configure the borders for all tables in the document
map or create a table style to apply these changes to specific tables.
-
Inside
table or your table style, enter
"body-cell-styles".
-
Inside body-cell-styles, you can add the following:
"sdm-border-left": {
"border-start-style": "solid",
"border-start-width": "1pt",
"border-start-color": "green"
}
Note:
Change "sdm-border-left" to "sdm-border-right"
etc to specify the style for each side.
-
You can use the following code to get the following result:
"styles": [
{"table1": {
"body-cell-styles": [{
"sdm-border-left": {
"border-start-style": "solid",
"border-start-width": "3pt",
"border-start-color": "blue"
},
"sdm-border-right": {
"border-end-style": "solid",
"border-end-width": "3pt",
"border-end-color": "green"
},
"sdm-border-top": {
"border-before-style": "solid",
"border-before-width": "3pt",
"border-before-color": "red"
},
"sdm-border-bottom": {
"border-after-style": "solid",
"border-after-width": "3pt",
"border-after-color": "yellow"}
}
]
}
}

Configure Borders for Header and Footer Tables
You can specify the style, width and color of a border for tables in the header or
footer of a document.
-
In the table element. enter
"header-cell-styles".
-
Inside header-cell-styles, you can add the following:
"sdm-border-left": {
"border-start-style": "solid",
"border-start-width": "1pt",
"border-start-color": "green"
}
Note:
Change "sdm-border-left" to "sdm-border-right"
etc to specify the style for each side.
Configuring Advanced Image Styles
The default publishing theme contains two advanced styles named small and
large. These set the image width to 6 and 17cm respectively. You can edit, add, or
remove any style.
-
Scroll to the style image section of the publishing theme.
"style": {
"image": {
"styles": [
{
"small": {
"width": "6cm",
"align": "left"
},
"large": {
"width": "17cm",
"align": "right"
-
The following configurations items and their corresponding possible values are
available for any style.
| Option | Description |
|---|
| align |
Valid values are left, center, or right. There are no vertical alignment
values. |
| height |
Positive numerical value followed by a unit. cm, em, in, mm, pc, pt, or px
|
| width |
Positive numerical value followed by a unit. cm, em, in, mm, pc, pt, or px
|
| scaling |
A positive percentage value. Scaling is applied only when width or height is
not specified. |
Note:
If no unit is specified for width or height, the app
defaults to pixels.
Note:
There is no upper limit for width, height or scaling values.
Note:
Where no scaling is specified and only one dimension (width or height) is
specified, the missing dimension is scaled proportionately with the specified
dimension.
-
Add an advanced style to the theme by doing the following.
-
Put a comma after the closing bracket of the last style.
-
On the next line, write the name for the new style inside double-quotes, followed
by a colon and an opening chain bracket.
-
Enter each style configuration item as name and value pairs in double-quotes,
separated by a colon. Put a comma after each configuration item line except for the
final one.
-
End the new style with a closing chain bracket
},
"NEW_STYLE_NAME": {
"ITEM": "VALUE",
"ITEM": "VALUE"
}
Configuring a Simple Image Style
By default, a publishing theme does not have a simple image style. If required, you
may add one simple image style to a publishing theme.
Before you begin: A simple style applies to all images in combination with the
advanced style selected in the editor. The published style obeys the following rules.
- The configuration item value of the advanced style takes precedence over that of the
corresponding configuration item in the simple style.
- If the simple style has a configuration item that is absent in the advanced style then
the image is published with all the advanced style configuration item plus the item from
the simple style.
-
Scroll to the style image section of the publishing theme.
"style": {
"image": {
"styles": [
{
-
Add a simple style to the theme by doing the following.
-
Create a new line between image and styles.
-
Enter each style configuration item as name and value pairs in double-quotes,
separated by a colon. Put a comma after each configuration item line.
"style": {
"image": {
"ITEM": "VALUE",
"ITEM": "VALUE",
"styles": [
{
Note:
A simple style does not have a name.
|