Glossary content control
Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
-
- Posts: 41
- Joined: Wed Aug 14, 2019 9:16 am
Glossary content control
Hi,
I would like to control the content that is included in my glossary. I have managed to set a glossary up satisfactorily using keyrefs, which are used to reference the <glossentry> topics. Provided the glossentry is referenced in the <glossarylist> in the same bookmap where the key is referenced, it includes the <glossentry> in the text (as abbreviated-form) and in the glossary at the back of the PDF. It looks like this in a bookmap using the 'HMI' <glossentry>:
I'm not sure if this is the recommended/most efficient way, but it seems to work.
At the moment, for each term in the glossary of the PDF, the following elements are shown:
<glossterm>, <glossdef>, <glosssurfaceform>, <glossacronym>.
Is there a way to control what elements are shown for all the referenced <glossentry> topics in the PDF glossary?
The <glossterm> and the <glosssurfaceform> are almost identical, so they both don't need to be visible. The <glossacronym> could also be removed, leaving only the <glossterm> and the <glossdef> in the PDF glossary, for each entry.
Thanks.
I would like to control the content that is included in my glossary. I have managed to set a glossary up satisfactorily using keyrefs, which are used to reference the <glossentry> topics. Provided the glossentry is referenced in the <glossarylist> in the same bookmap where the key is referenced, it includes the <glossentry> in the text (as abbreviated-form) and in the glossary at the back of the PDF. It looks like this in a bookmap using the 'HMI' <glossentry>:
Code: Select all
<backmatter>
<booklists>
<glossarylist>
<topicref href="Reuseable%20content/glossary/H/hmi.dita" keys="gloss_HMI"/>
At the moment, for each term in the glossary of the PDF, the following elements are shown:
<glossterm>, <glossdef>, <glosssurfaceform>, <glossacronym>.
Is there a way to control what elements are shown for all the referenced <glossentry> topics in the PDF glossary?
The <glossterm> and the <glosssurfaceform> are almost identical, so they both don't need to be visible. The <glossacronym> could also be removed, leaving only the <glossterm> and the <glossdef> in the PDF glossary, for each entry.
Thanks.
-
- Posts: 667
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Glossary content control
Post by julien_lacour »
Hello
Of course you can control this display for example by using:
For more filtering, you can debug your CSS using your favorite browser: Debugging the CSS
Regards,
Julien
Of course you can control this display for example by using:
Code: Select all
*[class~="glossentry/glossSurfaceForm"] {
display: none;
}
Regards,
Julien
-
- Posts: 41
- Joined: Wed Aug 14, 2019 9:16 am
Re: Glossary content control
Great, thanks Julien, that works.
For some reason when I add:
below your suggestion, the glossary does not recognise page boundaries and will put all the glossary entries on a single page, spilling beyond the page bottom (it does remove the glossAlt element, as intended). This doesn't occur if I only use the CSS you suggest. Do you know why this may occur?
For some reason when I add:
Code: Select all
*[class~="glossentry/glossAlt"] {
display: none;
}
-
- Posts: 667
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Glossary content control
Post by julien_lacour »
Hello,
As far as I know, glossentries are always displayed on the same page, if you need to change this behavior you can simply do the following:
Regards,
Julien
As far as I know, glossentries are always displayed on the same page, if you need to change this behavior you can simply do the following:
Code: Select all
* [class ~= 'glossentry/glossentry'] {
page-break-after: always;
}
Julien
-
- Posts: 41
- Joined: Wed Aug 14, 2019 9:16 am
Re: Glossary content control
Apologies, Julien, I perhaps didn't explain myself clearly. Attached is a screenshot showing the bottom of the page with the contents of the glossary spilling over the footer and beyond the page. There is only the single page for all the glossary items, instead of the three required to fit the contents for all glossary items.
This only occurs if I try to filter out more than one of the glossary elements, like <glossAlt> and <glossSurfaceForm>.
This only occurs if I try to filter out more than one of the glossary elements, like <glossAlt> and <glossSurfaceForm>.
image.png
You do not have the required permissions to view the files attached to this post.
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: Glossary content control
Hello Duncan,
I think the problem comes from the usage of "page-break-before:avoid" property on "glossentry/glossterm" elements. Do you have something like this in your customization CSS?
Please note that "glossentry/glossterm" elements are also inheriting the "topic/title" class, so another rule from the built-in CSS applies:
So the result is that the page cannot break before or after the glossterms, so it start bleeding. I recommend removing the page-break-avoid property from the customization CSS.
Many regards,
Dan
I think the problem comes from the usage of "page-break-before:avoid" property on "glossentry/glossterm" elements. Do you have something like this in your customization CSS?
Please note that "glossentry/glossterm" elements are also inheriting the "topic/title" class, so another rule from the built-in CSS applies:
Code: Select all
*[class ~= "topic/title"] {
page-break-after:avoid;
}
Many regards,
Dan
-
- Posts: 41
- Joined: Wed Aug 14, 2019 9:16 am
Re: Glossary content control
Hi Dan,
Thanks for the information - you were correct. I had a number of 'page-break-before:avoid' properties set on topictitle elements.
As so on for the topictitle2, 3, 4.
When I remove the property for topictitle, topictitle1, topictitle2, it resolves the issue; topictitle3 & 4 have no effect.
I have removed them now, and there don't seem to be any negative impacts.
Thanks!
Thanks for the information - you were correct. I had a number of 'page-break-before:avoid' properties set on topictitle elements.
Code: Select all
.topictitle {
font-family: IBMPlexSans-Medium;
font-size: 18pt;
margin-bottom: 0.5em;
margin-top: 0.7em;
border-bottom: 0.75pt solid red;
page-break-after:avoid;
page-break-before:avoid;
}
.topictitle1 {
font-family: IBMPlexSans-Medium;
font-size: 18pt;
margin-bottom: 0.5em;
margin-top: 0.7em;
border-bottom: 0.75pt solid red;
page-break-after:avoid;
page-break-before:avoid;
}
When I remove the property for topictitle, topictitle1, topictitle2, it resolves the issue; topictitle3 & 4 have no effect.
I have removed them now, and there don't seem to be any negative impacts.
Thanks!
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service