Categories > OpenTBS with ODT >

Fine gained enlarge or block range in relative syntax

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Jim
Date: 2013-04-17
Time: 06:45

Fine gained enlarge or block range in relative syntax

Hi,

I'm trying to use OpenTBS to generate odt documents, I'd like to keep the template odt readable, so I'm trying to use comments to add TBS code and using relative syntax to define blocks/enlarge, similar to the demo's usage of "[onload;block=text:p;when [var.x_delete]=0]". But I keep finding I need more fine gained way to define blocks or enlarge for field, for example if I try to render a sentence: "The customer bought 4 items." where 4 could be any number, right now I have to delete 4 and add a comment there to render the item count, but what I'd like to do is to keep the 4, add a comment behind it so that when the template is rendered, it will replace 4 with the item count, something like enlarge="the character before this point". Is this possible or are there other ways to achieve what I'm looking for?

Thanks
By: Skrol29
Date: 2013-04-17
Time: 19:35

Re: Fine gained enlarge or block range in relative syntax

Hi Jim,

You cannot do this with using a Comment because in LibreOffice/OpenOffice comments are not covering a string, they are placed at a point.
But you can do it using a simple frame.

I've added an example of this in the last OpenTBS package, in the ODT template:
http://www.tinybutstrong.com/dl.php?f=tbs_plugin_opentbs_beta.zip&s=2
By: Jim
Date: 2013-04-18
Time: 02:41

Re: Fine gained enlarge or block range in relative syntax

Hi,

Thank you, this looks good, I'll give it a try. I'm currently using version 1.7.6, I assume this feature only works with the beta version?

Thanks
By: Skrol29
Date: 2013-04-19
Time: 00:09

Re: Fine gained enlarge or block range in relative syntax

Hi,

It works for any version of OpenTBS.
With TBS version 3.8.0 use "enlarge=draw:frame", for TBS prior to 3.8.0 use "comm=draw:frame".
By: Jim
Date: 2013-04-19
Time: 05:13

Re: Fine gained enlarge or block range in relative syntax

Ok, got it, thanks.