I am trying to write a macro, the idea behind the macro is follows:
The macro will be reading from a XML file:
<book>
<chapter index="1">
<line index="1" text="some line text"/>
</chapter>
</book
The macro will be called as follows:
my_macro::target[chapter=1, line=1, tokens="2-3"]
The macro will retrieved the text from given chapter and line and suppose to insert the text. If tokens attribute is present it is supposed to highlight corresponding tokens (in this example line text will be highlighted).
Most of the time macro will be included in a table cell. Following is the code snippet of the block macro:
int chapterNumber = Integer.parseInt((String) attributes.get("chapter"));
int lineNumber = Integer.parseInt((String) attributes.get("line"));
return createBlock(parent, "paragraph", searchEngine.find(chapterNumber, lineNumber).getValue(), attributes);
The problem is macro doesn't get processed within a table cell but it does get processed if it is outside of table.
Hi There,
I am trying to write a macro, the idea behind the macro is follows:
The macro will be reading from a XML file:
The macro will be called as follows: my_macro::target[chapter=1, line=1, tokens="2-3"]
The macro will retrieved the text from given
chapter
andline
and suppose to insert the text. Iftokens
attribute is present it is supposed to highlight corresponding tokens (in this example line text will be highlighted).Most of the time macro will be included in a table cell. Following is the code snippet of the block macro:
The problem is macro doesn't get processed within a table cell but it does get processed if it is outside of table.
Second question is how can I make text highlight.
Thanks in advance.
Regards,
Syed