novx_xtg

Project homepage > Index > User guide


User guide

The novx_xtg Python script runs through all chapters and sections of a novelibre project and fills XTG templates.

Operation

Intended usage

The included installation script prompts you to create a shortcut on the desktop. You can launch the program by dragging a novelibre project file and dropping it on the shortcut icon.

Command line usage

Alternatively, you can

usage: novx_xtg.py [--silent] Sourcefile

positional arguments:

Sourcefile

The path of the novelibre project file.

optional arguments:

--silent suppress error messages and the request to confirm the use of default values


General

About XTG

The XTG file format uses the XPress Tags language, the knowledge of which is assumed. You canownload the manual A Guide to XPress Tags for your program version from the Quark web site.

novelibre text markup

Bold and italics are supported. Other highlighting such as underline and strikethrough are lost.

Quotation marks and punctuation

It is assumed that quotation marks and punctuation marks are already set correctly; this is best done in advance with a word processor, e.g. via novelibre’s “proof read” function.

Configuration


Hint

You find the a sample configuration folder with templates and the novx_xtg default values in the novelibre installation directory under

c:\Users\<user name>\.novx\novx_xtg\sample\

You best make a copy and edit it.


Configuration file

This is the configuration file explained:


[STYLES]
first_paragraph = @Text body:

# XPress tag for paragraphs preceded by a heading or a blank line.

indented_paragraph = @Text body indent:

# XPress tag for indented paragraphs.

other_paragraph = @First line indent:

# XPress tag for regular paragraphs.

italic = <@Emphasis>

# XPress tag opening italic sections. 

italic0 = <@$p>

# XPress tag closing italic sections.

bold = <@Strong emphasis>

# XPress tag opening bold sections.

bold0 = <@$p>

# XPress tag closing bold sections.

acronym =

# XPress tag opening acronyms.

acronym0 = 

# XPress tag closing acronyms.

figure =

# XPress tag opening figure groups.

figure0 = 

# XPress tag closing figure groups.

[OPTIONS]

adjust_digits = Yes

# If Yes, adjust digit-separating blanks.

space_points = Yes

# If Yes, space digit-separating points.

per_chapter = No

# If Yes, create one XTG file for each chapter.
# If No, create one XTG file for the entire document.

Style tags

Options

You can define styles in fileHeader.XTG, but it is preferable to use the names of styles that already exist in the QX book project instead.


Templates

Project level templates

Chapter level templates

Section level templates


Placeholders

Syntax

There are two options:

  1. $Placeholder - If the placeholder is followed by a character that is clearly recognizable as a separator, e.g. a blank.
  2. ${Placeholder} - If the placeholder is followed by a character that is not recognizable as a separator.

“Project template” placeholders

“Chapter template” placeholders

“Section template” placeholders


Installation path

The setup script installs novx_xtg.py in a defined place. This is the installation path on Windows:

c:\Users\<user name>.novx\novx_xtg


Copyright (c) 2025 by Peter Triesberger. All rights reserved.