Table Text smaller than other text

dpksaini89
Posts: 53

Table Text smaller than other text

Tue Jul 10, 2018 12:41 pm

Hi,
U have applied following customization code in my custom.css

Code: Select all

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

All my document text in pdf comes out to be 11pt. Except the text inside table.
How to ensure even the table text is 11pt.
Please help.
Image
Radu
Posts: 5878

Re: Table Text smaller than other text

Tue Jul 10, 2018 1:34 pm

Hi,

Are you using other CSS customizations which might interfere?
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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dpksaini89
Posts: 53

Re: Table Text smaller than other text

Tue Jul 10, 2018 1:48 pm

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.
Radu
Posts: 5878

Re: Table Text smaller than other text

Tue Jul 10, 2018 2:13 pm

Hi,

Try to add this extra CSS selector to force the same font family and size inside tables:

Code: Select all

*[class~="topic/colspec"], col, spanspec{
    font-family:arial;
   font-size:11pt;
}


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dpksaini89
Posts: 53

Re: Table Text smaller than other text

Wed Jul 11, 2018 9:36 am

Hi Radu,
Thanks for help, it worked.

One more thing,
the text in each cell when left aligned, is very close to the cell border due to which it is difficult to read.
Can we do something about it. This is applicable for each table.
Image
Radu
Posts: 5878

Re: Table Text smaller than other text

Wed Jul 11, 2018 9:50 am

Hi,

You can probably add a CSS selector like:

Code: Select all

   *[class~="topic/entry"]{
       padding-left:5px;
   }


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
dpksaini89
Posts: 53

Re: Table Text smaller than other text

Wed Jul 11, 2018 10:11 am

It worked thanks for quick help.

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 1 guest