Page 1 of 1

TOC Last Entry shifting to next page

Posted: Tue Jul 10, 2018 12:19 pm
by dpksaini89
Hi,
All the entries in a TOC are properly aligned except the last one.
Image

Re: TOC Last Entry shifting to next page

Posted: Tue Jul 10, 2018 1:35 pm
by Radu
Hi,

Please try to provide enough details on each newly posted forum thread.
How does your CSS customization look like?
What version of Oxygen are you using?
If you are using Oxygen 20.1, are you publishing using the DITA+CSS=PDF transformation scenario (DITA Map PDF - based on DITA & CSS (WYSIWYG)) or the one which does HTML5+CSS=PDF DITA Map PDF - based on HTML5 & CSS ?

Regards,
Radu

Re: TOC Last Entry shifting to next page

Posted: Tue Jul 10, 2018 1:50 pm
by dpksaini89
I am using Oxygen 20.1 and DITA Map PDF - based on DITA & CSS (WYSIWYG) for customization.

Code: Select all

@import 'p-optional-numbering-deep.css';

/* To hide the "Chapter NN." labels */
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicmeta"] > *[class ~= "topic/navtitle"]:before{
content:none !important;
}

:root {
widows:4;
orphans:4;
font-family: arial;
font-size: 11pt;
color: #000000;
font-style: normal;
}

/*-------------------------------
* The FRONT page layout.
*-------------------------------*/

@media print {

*[class~="front-page/front-page"] {
page: front-page;
}

*[class~="front-page/front-page-title"] {
display:block;
text-align:right;
padding-top: 2in;
padding-bottom: 2in;
text-transform: uppercase;
margin-top: 0.8in;
font-size: 32pt;
font-family: arial;
font-weight: bold;
}
@page front-page {
border-top: none;
border-bottom: none;
@top-right {
content: url("logo.png");
width: 506px;
height: 56px;
image-resolution: 300dpi;
}
@bottom-left {
content: "© GreyOrange Pte. Ltd. 2018 - All rights reserved. We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express authority is strictly forbidden.";
font-size: 9pt;
}
}



}


/*-------------------------------
* The TOC page layout.
*-------------------------------*/

/* Clear the default headers */
@page table-of-contents {
@top-left { content: none; }
@top-center { content: none; }
@top-right { content: none; }
@bottom-left { content: none; }
@bottom-center { content: none; }
@bottom-right { content: none; }
}
@page table-of-contents:left {

@top-right {
content: url("logo.png");
width: 506px;
height: 56px;
image-resolution: 300dpi;
}

@top-left {
content: string(toc-header) " | " counter(page, lower-roman);
font-size: 8pt;
}
@bottom-left {
content: "© GreyOrange Pte. Ltd. 2018 - All rights reserved.";
font-size: 9pt;
}
@bottom-right-corner {
content: " | " counter(page);
font-size: 9pt;
}

}
@page table-of-contents:right {
@top-right {
content: url("logo.png");
width: 506px;
height: 56px;
image-resolution: 300dpi;
}

@top-left {
content: string(toc-header) " | " counter(page, lower-roman);
font-size: 8pt;
}

@bottom-left {
content: "© GreyOrange Pte. Ltd. 2018 - All rights reserved.";
font-size: 9pt;
}

@bottom-right-corner {
content: " | " counter(page);
font-size: 9pt;
}
}
/*Do not put a header on the first page of the TOC*/
@page table-of-contents:first:left
{
@top-right {
content: url("logo.png");
width: 506px;
height: 56px;
image-resolution: 300dpi;
}



@bottom-left {
content: "© GreyOrange Pte. Ltd. 2018 - All rights reserved.";
font-size: 9pt;
}

@bottom-right-corner {
content: " | " counter(page);
font-size: 9pt;
}
}
@page table-of-contents:first:right

{
@top-right {
content: url("logo.png");
width: 506px;
height: 56px;
image-resolution: 300dpi;
}



@bottom-left {
content: "© GreyOrange Pte. Ltd. 2018 - All rights reserved.";
font-size: 9pt;
}

@bottom-right-corner {
content: " | " counter(page);
font-size: 9pt;
}
}


/*-------------------------------
* The default page layout.
*-------------------------------*/


@page {
size: A4 portrait;
margin-left: 0.5in;
margin-right: 0.5in;
padding-top: 0.2in;
padding-bottom: 0.2in;

font-family: arial;
font-size: 12pt;
font-style: normal;

margin-top: 0.8in;
border-top: 0.01in solid orange;

margin-bottom: 0.8in;
border-bottom: 0.01in solid gray;
}


@page :left {

@top-left {
content: string(maptitle) string(chaptertitle);
font-size: 12pt;
}
@top-right {
content: url("logo.png");
width: 506px;
height: 56px;
image-resolution: 300dpi;
}
@bottom-left {
content: "© GreyOrange Pte. Ltd. 2018 - All rights reserved.";
font-size: 9pt;
}
@bottom-right-corner {
content: " | " counter(page);
font-size: 9pt;
}
}

@page :right{

@top-left {
content: string(maptitle) string(chaptertitle);
font-size: 12pt;
}
@top-right {
content: url("logo.png");
width: 506px;
height: 56px;
image-resolution: 300dpi;
}
@bottom-left {
content: "© GreyOrange Pte. Ltd. 2018 - All rights reserved.";
font-size: 9pt;
}
@bottom-right-corner {
content: " | " counter(page);
font-size: 9pt;
}
}

/*-------------------------------
* The chapter page layout.
*-------------------------------*/

@page chapter{
/* Currently inherit from the default page.*/
}

/* No headers on the chapter first page. */
@page chapter:first:left{

@top-left {
content: none;
}
@top-right {
content: url("logo.png");
width: 506px;
height: 56px;
image-resolution: 300dpi;
}
@bottom-left {
content: "© GreyOrange Pte. Ltd. 2018 - All rights reserved.";
font-size: 9pt;
}
@bottom-right-corner {
content: " | " counter(page);
font-size: 9pt;
}
}
@page chapter:first:right{

@top-left {
content: none;
}
@top-right {
content: url("logo.png");
width: 506px;
height: 56px;
image-resolution: 300dpi;
}
@bottom-left {
content: "© GreyOrange Pte. Ltd. 2018 - All rights reserved.";
font-size: 9pt;
}
@bottom-right-corner {
content: " | " counter(page);
font-size: 9pt;
}
}

/*-------------------------------
* The tables layout.
*-------------------------------*/
*[class~="topic/table"] {
hyphens: auto;
}

*[class ~= "topic/image"] {
prince-image-resolution: 300dpi;
-ah-image-resolution: 300dpi;
image-resolution: 300dpi;
}

*[outputclass ~= "side-by-side"] > *[class ~= "topic/p"] {
display:inline-block;
width: 45%;
}

*[outputclass ~= "side-by-side"] > *[class ~= "topic/fig"] {
display:inline-block;
width: 45%;
}


:root:after {
page: lp;
display: block;
content: " ";
margin-top: 50%;
text-align: right;
}

@page lp {
background-image: url("BC001.tif");
background-position: top left;
background-repeat: no-repeat;
border-top: none;
border-bottom: none;
@top-right {
content: none;
}
@bottom-left {
content: none;
}
@top-left {
content: none;
}
@bottom-right {
content: none;
}
@bottom-right-corner {
content: none;
}
border-top: 0in;
border-bottom: 0in;
}
This is the complete custom.css i am using.

Re: TOC Last Entry shifting to next page

Posted: Tue Jul 10, 2018 2:18 pm
by Radu
Hi,

Using your CSS I tried to produce a PDF using a sample DITA Bookmap we also ship in the Oxygen installation folder (OXYGEN_INSTALL_DIR\samples\dita\it-book\taskbook.ditamap) but I cannot reproduce the problem.
Can you put together a small sample DITA map + topics project on which the problem can be reproduced? We have a tech support page on which you can upload a zip file:

https://www.oxygenxml.com/techSupport.html

Regards,
Radu

Re: TOC Last Entry shifting to next page

Posted: Wed Jul 11, 2018 10:23 am
by dpksaini89
Hi Radu,
I tried creating the user manual of 'thunderbird' (in the sample folder) using my custom.css.
The problem is coming there also only in the 'last entry of the toc'.
Please help.
Image
Image
Image

Re: TOC Last Entry shifting to next page

Posted: Wed Jul 11, 2018 2:28 pm
by dpksaini89
Hi Radu,

Did you get chance to look into this?

Re: TOC Last Entry shifting to next page

Posted: Wed Jul 11, 2018 2:30 pm
by Radu
Hi,

Thanks for giving a way to reproduce this on my side, I can do this now.
But this is more complicated and we need some time to think about it. I'll try to update this forum thread in a couple of days.

Regards,
Radu

Re: TOC Last Entry shifting to next page

Posted: Thu Jul 12, 2018 11:16 am
by Radu
Hi,

I discussed this problem with our main Chemistry engine developer, we will add an internal issue and try to fix this on our side.
In the meantime his recommendation is to replace the entire contents of "p-optional-numbering-deep.css" with:

Code: Select all

/*
* ======================================================
*
* Page, Chapter and Sections numbering, both in TOC and
* in the content.
*
* ======================================================
*/

/*
* Reset the counters on the root element.
*/
*[class ~= "map/map"] {
counter-reset: page 1
toc-chapter 0
toc-section1 0
toc-section2 0
toc-section3 0
toc-section4 0
chapter 0
section1 0
section2 0
section3 0
section4 0
figcount 0
tablecount 0;
}


/*
* =======================================
* Pages
*/

/*
Reset the page counter on the first topic that follows the TOC placeholder:
<ot-placeholder:toc xmlns:ot-placeholder="http://suite-sol.com/namespaces/ot-placeholder" />
The page counter was used in the p-toc generating numbers for the TOC pages.
*/
*[class ~= "map/map"] > *[class ~= "placeholder/toc"] + *[class ~= "topic/topic"]{
counter-reset: page 1;
}


/*
* =======================================
* TOC
*/


/*
* Increment the counters.
*/
*[class ~= "map/topicref"][is-chapter]:not([is-part]) {
counter-increment:toc-chapter;
counter-reset: toc-section1;
}
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"]{
counter-increment:toc-section1;
counter-reset: toc-section2;
}
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicref"]{
counter-increment:toc-section2;
counter-reset: toc-section3;
}

/*
All the parts get a part number.
Each chapter gets a chapter number.
All other topicrefs following a part do not have a number.
*/
*[class ~= "map/topicref"][is-part] {
counter-reset:toc-chapter !important;
counter-increment:toc-part;
}

/* All other topicrefs that follow a part should not have a number (i.e appendices) */
*[class ~= "map/topicref"][is-part] ~ *[class ~= "map/topicref"]:not([is-part]) > *[class ~= "map/topicmeta"]:before{
content: none !important;
counter-increment:none;
}

/*
* Showing the counters before the titles from TOC.
*/
/*
*[class ~= "map/topicmeta"] > *[class ~= "topic/navtitle"]:before {
display:none !important; /\* In case this CSS is used in cascade with the classic numbering. *\/
}
*/

*[class ~= "map/topicref"] {
position:relative;

}

*[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]:before {
display:inline;
}
/*
*[class ~= "map/topicref"][is-part] > *[class ~= "map/topicmeta"]:before {
left: -1.5em; /\* Increase the value of width and left as the depth increases. *\/
width:1em;
}
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicmeta"]:before {
left: -1.5em;
width:1em;
}
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]:before {
left: -2em;
width:2em;
}
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]:before {
left: -2.5em;
width:2.5em;
}

*/
*[class ~= "map/topicref"][is-part] > *[class ~= "map/topicmeta"]> *[class ~= "topic/navtitle"]:before {
content: counter(toc-part, upper-roman) "." " ";
}
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicmeta"]> *[class ~= "topic/navtitle"]:before {
content: counter(toc-chapter) "." " " !important;
}
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]> *[class ~= "topic/navtitle"]:before {
content: counter(toc-chapter) "." counter(toc-section1) " ";
}
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]> *[class ~= "topic/navtitle"]:before {
content: counter(toc-chapter) "." counter(toc-section1) "." counter(toc-section2) " ";
}
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]> *[class ~= "topic/navtitle"]:before {
content: counter(toc-chapter) "." counter(toc-section1) "." counter(toc-section2) "." counter(toc-section3) " ";
}


/*
* =======================================
* Content.
*/

/*
* Increment the counters.
*/
*[class ~= "topic/topic"][is-part]{
counter-increment:part;
counter-reset:chapter;
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) {
counter-increment: chapter;
counter-reset:section1;
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/topic"] {
counter-increment:section1;
counter-reset:section2;
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/topic"] > *[class ~= "topic/topic"] {
counter-increment:section2;
counter-reset:section3;
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/topic"] > *[class ~= "topic/topic"] > *[class ~= "topic/topic"] {
counter-increment:section3;
counter-reset:section4;
}


/*
Front Matter and Back Matter and
all other topics that follow a part
should not define string sets, counters, etc..
*/

*[class ~= "bookmap/frontmatter"],
*[class ~= "bookmap/frontmatter"] *[class ~= "topic/topic"],
*[class ~= "bookmap/backmatter"],
*[class ~= "bookmap/backmatter"] *[class ~= "topic/topic"],
*[class ~= "topic/topic"][is-part] ~ *[class ~= "topic/topic"]:not([is-part]) {
counter-increment:none !important;
counter-reset: part chapter section1 section2 section3 section4 !important;
}



/*
* Alter the string sets that are shown in the header of the page.
*/
*[class ~= "topic/topic"][is-part] > *[class ~= "topic/title"] {
string-set: parttitle " | " counter(part, upper-roman) " - " content(), chaptertitle ""; /* Avoid propagating a past chapter title on a new part */
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/title"] {
string-set: chaptertitle " | " counter(chapter) " - " content(), sectiontitle "";
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/topic"] > *[class ~= "topic/title"] {
string-set: sectiontitle " | " counter(chapter) "." counter(section1) " - " content();
}

/*
Topics from Front Matter and Back Matter and
all other topics that follow a part
should not define string sets, counters, etc..
*/
*[class ~= "bookmap/frontmatter"] > *[class ~= "topic/title"],
*[class ~= "bookmap/frontmatter"] *[class ~= "topic/topic"] > *[class ~= "topic/title"],
*[class ~= "bookmap/backmatter"] > *[class ~= "topic/title"],
*[class ~= "bookmap/backmatter"] *[class ~= "topic/topic"] > *[class ~= "topic/title"],
*[class ~= "topic/topic"][is-part] ~ *[class ~= "topic/topic"]:not([is-part]) > *[class ~= "topic/title"],
*[class ~= "topic/topic"][is-part] ~ *[class ~= "topic/topic"]:not([is-part]) *[class ~= "topic/topic"] > *[class ~= "topic/title"]{
string-set: parttitle "", chaptertitle "", sectiontitle "";
}


/*
* Use the numbers in front of titles in the content.
*/
*[class ~= "topic/topic"][is-part] > *[class ~= "topic/title"]:before{
content: counter(part, upper-roman) ". ";
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/title"]:before{
content: counter(chapter) ". ";
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before{
content: counter(chapter) "." counter(section1) ". ";
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/topic"] > *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before{
content: counter(chapter) "." counter(section1) "." counter(section2) ". ";
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/topic"] > *[class ~= "topic/topic"] > *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before{
content: counter(chapter) "." counter(section1) "." counter(section2) "." counter(section3) ". ";
}

/*
Topics from Front Matter and Back Matter and
all other topics that follow a part
should not define string sets, counters, etc..
*/
*[class ~= "bookmap/frontmatter"] > *[class ~= "topic/title"]:before,
*[class ~= "bookmap/frontmatter"] *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before,
*[class ~= "bookmap/backmatter"] > *[class ~= "topic/title"]:before,
*[class ~= "bookmap/backmatter"] *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before,
*[class ~= "topic/topic"][is-part] ~ *[class ~= "topic/topic"]:not([is-part]) > *[class ~= "topic/title"]:before,
*[class ~= "topic/topic"][is-part] ~ *[class ~= "topic/topic"]:not([is-part]) *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before{
content:none !important;
}

/*/\* To hide the "Chapter NN." labels *\/
*[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicmeta"] > *[class ~= "topic/navtitle"]:before{
content:none !important;
}*/
This will remove the problem but if there are very large topic titles, the titles may end up wrapping their text under the counter set before them.

Regards,
Radu

Re: TOC Last Entry shifting to next page

Posted: Thu Jul 12, 2018 1:59 pm
by dpksaini89
Thanks please let me know when issue has been resolved from development end.

Re: TOC Last Entry shifting to next page

Posted: Mon Oct 01, 2018 2:40 pm
by dpksaini89
Any update on this?

Re: TOC Last Entry shifting to next page

Posted: Mon Oct 01, 2018 4:14 pm
by Costin
Hi dpksaini89,

We already fixed this issue in the internal development stream, so, if you are willing to test, I can grant you access to the latest nightly build available of a package containing a ready to use customized DITA-OT (it contains also the latest build of Chemistry engine).
If you are OK with that, just send an email to support@oxygenxml.com and specifically request us to provide you with the nightly build and I could send you a link and instructions on how to use it.

Regards,
Costin