Download as odt, pdf, or txt
Download as odt, pdf, or txt
You are on page 1of 4

OpenTBS demo

Hello [onshow.yourname],
This is a demo of the OpenTBS plugin.
The current document has been generated at [onshow..now;frm='yyyy-mm-dd
hh:nn:ss']
PHP version: [onshow..cst.PHP_VERSION]
TBS version: [onshow..version]

Merge data with a chart


5
4.5
4
3.5
3
Series 1
2.5
Series 2
2 Series 3
1.5
1
0.5
0
Category A Category B Category C Category D
Merge data with a table in line

First Name Name Membership number


[a.firstname;block [a.name] [a.number]
=tbs:row]

Example #5: merging data in Header and Footer. demo for “[onshow.yourname]”
OpenTBS automatically merges “onshow” and “onload” fields in the header and the footer. An OpenOffice document can have only one
header/footer contents. You can only choose to show or hide it on each page. Header and footer contents are stored in a separate XML
sub-file (styles.xml). Thus you need the load it in order to perform MergeBlock() or other manual merges in it.
Merge or delete bullets and numberings
1. Numbered titles
1.1. This title is kept
1.2. This one will be deleted [onload;block=tbs:p;when [var.x_delete]=0]
1.3. But numbering will be automatically arranged by LibreOffice/OpenOffice Writer
1.4. As you can see
2. Bullets
• This bullet is kept
• This one will be deleted [onload;block=tbs:p;when [var.x_delete]=0]
• As you can see

Merge or delete a part of the text


As you can see, this part of the text contains a title and two paragraphs.
So you can delete the part using this: [onload;block=text:h+tbs:p+(tbs:p);when [var.x_delete]=0].
You can also merge/delete a custom LibreOffice/OpenOffice Writer section using
“block=text:section”.

Delete a frame

This frame will be deleted.


[onload;block=draw:frame;when [var.x_delete]=0]

Delete all comments


This text should have no comment.

Merge too long TBS fields


If you find that a TBS fields is too long and difficult to read when placed in the template, you can
use one of the two following tricks for LibreOffice and OpenOffice only :
1) Nest the TBS in a comment ; add parameter “enlarge=tbs:comment”. You can also add any
extra text in the comment. The whole comment will be replaced with the value to merge.

Dear [onshow.yourname], this text has been build automatically at (). OpenTBS is so delicious.

2) Create a simple frame for which the Anchor property is set to “As character”. Then add the
TBS field in the title or the description of the description of the frame ; add parameter
“enlarge=draw:frame”. You can also add extra text in the frame or the description. The
whole frame will be replaced with the value to merge.

Dear [onshow.yourname], this text has been build automatically at ( date ). OpenTBS is so
delicious.

Example #5: merging data in Header and Footer. demo for “[onshow.yourname]”
OpenTBS automatically merges “onshow” and “onload” fields in the header and the footer. An OpenOffice document can have only one
header/footer contents. You can only choose to show or hide it on each page. Header and footer contents are stored in a separate XML
sub-file (styles.xml). Thus you need the load it in order to perform MergeBlock() or other manual merges in it.
Merge data with pages
In the next page there is an example illustrating how to perform a merge with one page per record.
In this example, the first paragraph has a property giving a page break before. Therefore, the
page-break is repeated for each record.
The example also use a block defined with the alias “tbs:page”. This alias is given by OpenTBS
and it helps to found the bounds of the page (or pages) according to the page-break defined in the
paragraph properties.
If you try to merge one page per record without text before the first page, then make sure that the
first paragraph has the property giving a page break before.

Example #5: merging data in Header and Footer. demo for “[onshow.yourname]”
OpenTBS automatically merges “onshow” and “onload” fields in the header and the footer. An OpenOffice document can have only one
header/footer contents. You can only choose to show or hide it on each page. Header and footer contents are stored in a separate XML
sub-file (styles.xml). Thus you need the load it in order to perform MergeBlock() or other manual merges in it.
Hello [b.firstname;block=tbs:page] [b. name], your membership number is [b.number].

The image is merged using a TBS field which is placed in the Description property of the image.

Example #5: merging data in Header and Footer. demo for “[onshow.yourname]”
OpenTBS automatically merges “onshow” and “onload” fields in the header and the footer. An OpenOffice document can have only one
header/footer contents. You can only choose to show or hide it on each page. Header and footer contents are stored in a separate XML
sub-file (styles.xml). Thus you need the load it in order to perform MergeBlock() or other manual merges in it.

You might also like