AntennaHouse / pdf5-ml

Antenna House PDF5-ML DITA-OT Plug-in
23 stars 9 forks source link

Can Chapter prefix number combine with Page number? #253

Closed ChhunE closed 1 week ago

ChhunE commented 1 week ago

Hello,

I have element in index page as below.

Screenshot 2024-06-27 at 4 22 18 in the afternoon

This is what I want to achieve.

Screenshot 2024-06-27 at 4 22 06 in the afternoon

For page number at the end of line, I want to combine prefix number of chapter with page-number. My idea at the moment, even I can get the prefix number of chapter, there is no way to link it with page-number (e.g. 3number in one line "27,28,12")

Appreciate your help as always.

ToshihikoMakita commented 1 week ago

When you generate fo:page-sequence from chapter, add fo:folio-prefix element and set the content as chapter-no with hyphen such like below.

   <fo:page-sequence ...>
      <fo:folio-prefix>2-</fo:folio-prefix><!-- "2" is counted chapter-no -->
      <fo:static-content flow-name="rgnAfter">
         ...
      </fo:static-content>
      <fo:flow flow-name="xsl-region-body">
        ...
      </fo:flow>
ChhunE commented 1 week ago

Thank you for your comment.

It is working fine. So I will close this issue.