Hi tomek
These macros will work:
[macros]
(?su)(?<!\w)[\\]?(?P<name>indexstart):(?P<target>\S+?)\[(?P<attrlist>.*?)\]=
(?su)(?<!\w)[\\]?(?P<name>indexend):(?P<target>\S+?)\[\]=
[indexstart-inlinemacro]
# Primary only.
<indexterm id="{target}" class="startofrange">
<primary>{1}</primary>
</indexterm>
[indexend-inlinemacro]
<indexterm startref="{target}" class="endofrange" />
This example:
Here are a indexstart:I1[Some examples] ... some text ...
... more text ... indexend:I1[] the end.
Generates this DocBook:
<simpara>Here are a <indexterm id="I1" class="startofrange">
<primary>Some examples</primary>
</indexterm> … some text …
… more text … <indexterm startref="I1" class="endofrange" /> the
end.</simpara>
Cheers, Stuart
On 14/09/10 06:31, Tomek Kaczanowski wrote:
Hello All,
And now the problem. How can I create indexterms with startofrange and
endofrange? I couldn't find it in the User Guide.
I have learned that I can use a passthrough block, like this:
=== Code Coverage
++++
<indexterm id="idx_codecoverage" class='startofrange'><primary>Code
Coverage</primary></indexterm>
++++
... a lot of text here ...
++++
<indexterm startref="idx_codecoverage" class="endofrange"/>
++++
And it produces the desired output in Index section.
Is there a better way to achieve this functionality with Asciidoc?
--
Regards,
Tomek Kaczanowski
http://kaczanowscy.pl/tomek
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.