Page 1 of 1

Exclude some tables from captions and List of Tables

Posted: Wed Aug 21, 2019 7:27 am
by dbutch
Hi,
Is it possible to exclude or ignore certain tables from table captions and also from the List of Tables?
This is in relation to topic20373.html,
I would like to exclude the caption for two tables in the PDF output. I have attempted to set the output class on both the table and the topic, and apply CSS rules based on that output class; however, the tables are still showing the captions and are present in the List of Tables.

Code: Select all

/* No table numbering */
 *[class~='topic/topic'][outputclass ~= "before-toc"] > *[class~="topic/table"] > * [class~="topic/title"]:before {
	 display: none !important;
 }
I used 'before-toc' as the output class in this case, as it is required to move the topic prior to the TOC.

Thanks.

Re: Exclude some tables from captions and List of Tables

Posted: Wed Aug 21, 2019 2:38 pm
by Costin
Hello,

The selector you are trying to use is not the right one.
More specific, after you set the outputclass attribute on a table, the correct selector you should use, in order to match the caption of a table in the entire bookmap context, should be just something like:

Code: Select all

*[class~='topic/topic'][outputclass ~= "before-toc"]
Best Regards,
Costin

Re: Exclude some tables from captions and List of Tables

Posted: Thu Aug 22, 2019 4:15 am
by dbutch
Hi Costin,

Thanks. I set base to 'no-caption' so I could still use auto-table on the outputclass attribute. The following removed the caption from the relevant tables but they are still showing in the List of Tables, and consequently increments all the other tables in that list as if they do exist.

Code: Select all

  *[class~='topic/table'][base ~= "no-caption"] caption::before {
	 display: none !important;
	 counter-increment: none !important
 }
image.png
image.png (6.63 KiB) Viewed 2515 times

How would I exclude them from being shown and counted in the List of Tables?

Many thanks.

Re: Exclude some tables from captions and List of Tables

Posted: Thu Aug 22, 2019 7:26 am
by dbutch
I think I may have found the answer...
Removing the title from the tables results in them not showing in the List of Tables. They now match the table numbers throughout the document, when used in conjunction with the CSS above.

If there is a better method then please advise.

Kind regards.

Re: Exclude some tables from captions and List of Tables

Posted: Thu Aug 22, 2019 11:08 am
by Costin
Hello,

You solution seems legit.

As an alternative, you could try setting multiple values for the outputclass attribute for the tables whose caption you want to hide (like: outputclass="before-toc auto-table").
You could also reset the table number counters in your customization CSS, to override the counters set in the CSS corresponding to the specific numbering parameter you use in your transformation.
More details on the default CSS files that control various numbering options available in the User-Guide.

Regards,
Costin