View Single Post
Old 08-22-2018, 06:28 AM   #3
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
The Adobe ePub reader determines the number of columns to use based on the width of the screen in em units, i.e. the smaller the font, the wider the screen is when measured in em, and so the more columns used.

Changing the body font sizes in the CSS stylesheet and then rescaling all the other font sizes in proportion might affect the calculations, so if the publisher has done this (many do unfortunately) then the final size of the text on the screen where the number of columns change could be different for each book.

However you can quite easily change the underlying threshold font sizes that are used to select the number of columns to use by editing the Adobe XPGT stylesheet (usually called page-template.xpgt if the book has one, or add your own if it doesn't.)

You might also be able to use the XPGT stylesheet to force a particular number of columns to be used, I haven't looked into that.

Attached is a sample ePub that increases the font size thresholds so that I can get two or three columns on my Glo as the font size is reduced. I don't know much about the format of the XPGT stylesheet, I'm just going by what I have seen some publishers do. Adjust the values "55em", "40em", "25em" to set the width that the screen has to be before more columns are used.

page-template.xpgt
Spoiler:
Code:
<ade:template xmlns="http://www.w3.org/1999/xhtml"
	      xmlns:ade="http://ns.adobe.com/2006/ade"
	      xmlns:fo="http://www.w3.org/1999/XSL/Format">

  <fo:layout-master-set>

    <fo:simple-page-master master-name="one_column">
      <fo:region-body column-count="1"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="two_columns">
      <fo:region-body column-count="2" column-gap="10pt"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="three_columns">
      <fo:region-body column-count="3" column-gap="10pt"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="four_columns">
      <fo:region-body column-count="4" column-gap="10pt"/>
    </fo:simple-page-master>

    <fo:page-sequence-master>
      <fo:repeatable-page-master-alternatives>
        <fo:conditional-page-master-reference
	    master-reference="four_columns"
	    ade:min-page-width="55em"/>
        <fo:conditional-page-master-reference
	    master-reference="three_columns"
	    ade:min-page-width="40em"/>
        <fo:conditional-page-master-reference
	    master-reference="two_columns"
	    ade:min-page-width="25em"/>
        <fo:conditional-page-master-reference
	    master-reference="one_column"/>
      </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>

  </fo:layout-master-set>

</ade:template>
Attached Thumbnails
Click image for larger version

Name:	one.png
Views:	240
Size:	50.8 KB
ID:	165786   Click image for larger version

Name:	two.png
Views:	236
Size:	80.6 KB
ID:	165787   Click image for larger version

Name:	three.png
Views:	234
Size:	115.7 KB
ID:	165788  
Attached Files
File Type: epub ptt.epub (58.4 KB, 257 views)

Last edited by GeoffR; 08-22-2018 at 06:58 AM. Reason: Added contents of page-template.xpgt for those who don't want to dig around in the ePub
GeoffR is offline   Reply With Quote