Topics

Chapter numbering issue when using

Chris Brand
 

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
Chris.


Am 27.06.20 um 16:05 schrieb Toshihiko Makita:

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/
 -----------------------------------------------------------------------*/

Toshihiko Makita
 

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/
 -----------------------------------------------------------------------*/

Chris Brand
 

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
Gesendet: Montag, 22. Juni 2020 15:47
An: main@dita-users.groups.io
Betreff: Re: [dita-users] Chapter numbering issue when using <topicgroup>

 

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/
 -----------------------------------------------------------------------*/

Toshihiko Makita
 

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/
 -----------------------------------------------------------------------*/

Chris Brand
 

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
Gesendet: Samstag, 20. Juni 2020 15:41
An: main@dita-users.groups.io
Betreff: Re: [dita-users] Chapter numbering issue when using <topicgroup>

 

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/
 -----------------------------------------------------------------------*/

Chris Brand
 

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
Gesendet: Freitag, 19. Juni 2020 20:28
An: main@dita-users.groups.io; Chris Brand via groups.io <chrizzbee74@...>
Betreff: Re: [dita-users] Chapter numbering issue when using <topicgroup>

 

Hi,

You can try <topicset> instead.

-m

On June 19, 2020 8:12:48 AM PDT, "Chris Brand via groups.io" <chrizzbee74@...> wrote:

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.

Toshihiko Makita
 

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/
 -----------------------------------------------------------------------*/

Mica Semrick
 

Hi,

You can try <topicset> instead.

-m


On June 19, 2020 8:12:48 AM PDT, "Chris Brand via groups.io" <chrizzbee74@...> wrote:
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.

Chris Brand
 

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.