AntennaHouse / pdf5-ml

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

table xref output option for table number without title #181

Closed steinbacher01 closed 3 years ago

steinbacher01 commented 3 years ago

Is it possible to make xrefs to tables so the output only includes “Table X” without the rest of the title? Some table titles can be very long and this makes the xref generated text distracting.

table-xref

How can we get "Table 3-2" without the table title?

Thanks,

Leroy Steinbacher

ToshihikoMakita commented 3 years ago

How can we get "Table 3-2" without the table title?

One more @outputclass option is needed to implement this feature.

ToshihikoMakita commented 3 years ago

I'm afraid that introducing this feature needs significant template interface changes that affects existing user. My suggestion is to divide getXrefTitle template into small pieces of sub-templates. So if this has done successfully, you can override one of these template that generates xref title as you like. Do you have any ideas?

ToshihikoMakita commented 3 years ago

I've implemented this feature in development branch as follows:

xref-to-table_New

Could you test it in your side?

Also you can use @outputclass="title-prefix-only in the xref to fig .

steinbacher01 commented 3 years ago

I tested xref outputclass="title-prefix-only" to both table and fig targets. The generated text is working as expected.

Thanks for the enhancement!

Will this be included in a future release of the base pdf5-ml, or do I need to add it to my custom plugin?

Thanks again,

Leroy

ToshihikoMakita commented 3 years ago

I will merge development branch to master so that you can use this feature without customization.

Regards,