Chapter numbering issue when using <topicgroup>
Hi
In my map structure, I started to use <topicgroup> with profiling. My chapters are all numbered based on a template derived from the DITA Generator code. This worked nice so far. I understood that <topicgroup> elements do not affect the map structure. In the PDF output this is indeed true, the <topicgroup> element doesn't show up and is not included in the TOC. But all children of the <topicgroup> are counted up one level, thus creating a false numbering. Example: 1 Chapter <topicgroup> 1.1.1 Chapter 1.1.2 Chapter </topicgroup> 1.2 Chapter I expect that the output is like this: 1 Chapter <topicgroup> 1.1 Chapter 1.2 Chapter </topicgroup> 1.3 Chapter So the children of the <topicgroup> get the wrong chapter depth assigned. Anyone knows a fix? Thanks, Chris.
|
|
Mica Semrick
Hi,
toggle quoted messageShow quoted text
You can try <topicset> instead. -m
On June 19, 2020 8:12:48 AM PDT, "Chris Brand via groups.io" <chrizzbee74@...> wrote: Hi
|
|
Hi Chiris,
As <topicgroup> is specialization of topicref, it affects numbering wrongly. To avoid this problem, I always skip <topicgroup> in the merged middle file processing in PDF output. See https://github.com/AntennaHouse/pdf5-ml/blob/master/com.antennahouse.pdf5.ml/xsl/dita2fo_convmerged.xsl Line 163 or near. Hope this helps. Regards, -- /*----------------------------------------------------------------------- Toshihiko Makita Development Group. Antenna House, Inc. Ina Branch Web site: http://www.antenna.co.jp/ http://www.antennahouse.com/ -----------------------------------------------------------------------*/
|
|
Hi Mica
<topicset> behaves same as <topicgroup> in PDF generation when it comes to wrong chapter numbers.
Greez, Chris.
Von: main@dita-users.groups.io <main@dita-users.groups.io> Im Auftrag von Mica Semrick
Hi,
On June 19, 2020 8:12:48 AM PDT, "Chris Brand via groups.io" <chrizzbee74@...> wrote:
|
|
Hi Toshihiko
Thanks! I'm using FOP and not AH for PDF conversion. Do you have an idea where this specific template of yours has to be placed in the pdf2 section? I tried all possible files but it had no effect ...
Greez, Chris.
Von: main@dita-users.groups.io <main@dita-users.groups.io> Im Auftrag von Toshihiko Makita
Hi Chiris,
|
|
Hi Chiris,
> Do you have an idea where this specific template of yours has to be placed in the pdf2 section? What DITA-OT version are you using? I will take a look at PDF2 plug-in tomorrow. Regards, -- /*----------------------------------------------------------------------- Toshihiko Makita Development Group. Antenna House, Inc. Ina Branch Web site: http://www.antenna.co.jp/ http://www.antennahouse.com/ -----------------------------------------------------------------------*/
|
|
Hi Toshihiko
I'm (still) using 2.5.4. Thanks for checking!!
Chris.
Von: main@dita-users.groups.io <main@dita-users.groups.io> Im Auftrag von Toshihiko Makita
Hi Chiris,
|
|
Hi Chiris,
Sorry for the late reply. As PDF2 plug-in has extension point named "org.dita.pdf2.xsl.topicmerge", you can override default topicmerge stylesheet processing by making plug-in. Here is my example. https://1drv.ms/u/s!AkbL99fLhxKUhp50UTIXM1xI7FSmlg?e=2Jrj9Q You can integrate this plug-in and change PDF2 topicmerge processing. In my testing, I could succeed to remove topicgroup elements from the map portion of the merged middle file in DITA-OT 2.5.4. If there are any problems, please let me know. Regards, -- /*----------------------------------------------------------------------- Toshihiko Makita Development Group. Antenna House, Inc. Ina Branch Web site: http://www.antenna.co.jp/ http://www.antennahouse.com/ -----------------------------------------------------------------------*/
|
|
Dear Toshihiko I'm taking a bow. Your plugin works like a charm. Thank you very much for this nice feature! That should be part of the DITA-OT by default. Best regards
Am 27.06.20 um 16:05 schrieb Toshihiko
Makita:
Hi Chiris,
|
|