View Single Post
Old 12-28-2009, 04:27 PM   #1
Crusader
Space Cadet
Crusader ought to be getting tired of karma fortunes by now.Crusader ought to be getting tired of karma fortunes by now.Crusader ought to be getting tired of karma fortunes by now.Crusader ought to be getting tired of karma fortunes by now.Crusader ought to be getting tired of karma fortunes by now.Crusader ought to be getting tired of karma fortunes by now.Crusader ought to be getting tired of karma fortunes by now.Crusader ought to be getting tired of karma fortunes by now.Crusader ought to be getting tired of karma fortunes by now.Crusader ought to be getting tired of karma fortunes by now.Crusader ought to be getting tired of karma fortunes by now.
 
Crusader's Avatar
 
Posts: 1,180
Karma: 4030536
Join Date: Jun 2009
Location: South Africa
Device: Sony PRS-T1, Cybook Opus, Kobo Glo
Some help with code

Some ebooks I recently purchased have strange formatting on my Opus. It results in the text being one small column in the center of the page with around 50% left as whitespace.

I'm trying to fix it using Sigil and I came across the following code which I think might be the culprit

Code:
<style type="application/vnd.adobe-page-template+xml">
<![CDATA[
  <?xml version='1.0' encoding='utf-8'?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


  <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="single_column">
                <fo:region-body margin-bottom="3em" margin-top="0.5em" margin-left="3em" margin-right="3em"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="single_column_head">
                <fo:region-before extent="8.3em"/>
                <fo:region-body margin-bottom="3em" margin-top="6em" margin-left="3em" margin-right="3em"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="two_column" margin-bottom="0.5em" margin-top="0.5em" margin-left="0.5em" margin-right="0.5em">
                <fo:region-body column-count="2" column-gap="10em"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="two_column_head" margin-bottom="0.5em" margin-left="0.5em" margin-right="0.5em">
                <fo:region-before extent="8.3em"/>
                <fo:region-body column-count="2" margin-top="6em" column-gap="10em"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="three_column" margin-bottom="0.5em" margin-top="0.5em" margin-left="0.5em" margin-right="0.5em">
                <fo:region-body column-count="3" column-gap="10em"/>
    </fo:simple-page-master>

    <fo:simple-page-master master-name="three_column_head" margin-bottom="0.5em" margin-top="0.5em" margin-left="0.5em" margin-right="0.5em">
                <fo:region-before extent="8.3em"/>
                <fo:region-body column-count="3" margin-top="6em" column-gap="10em"/>
    </fo:simple-page-master>

    <fo:page-sequence-master>
        <fo:repeatable-page-master-alternatives>
            <fo:conditional-page-master-reference master-reference="three_column_head" page-position="first" ade:min-page-width="80em"/>
            <fo:conditional-page-master-reference master-reference="three_column" ade:min-page-width="80em"/>
            <fo:conditional-page-master-reference master-reference="two_column_head" page-position="first" ade:min-page-width="50em"/>
            <fo:conditional-page-master-reference master-reference="two_column" ade:min-page-width="50em"/>
            <fo:conditional-page-master-reference master-reference="single_column_head" page-position="first"/>
            <fo:conditional-page-master-reference master-reference="single_column"/>
        </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>

  </fo:layout-master-set>

  <ade:style>
    <ade:styling-rule selector=".title_box" display="adobe-other-region" adobe-region="xsl-region-before"/>
  </ade:style>

  </ade:template>
  ]]>
  </style>

  <title></title>
  <style type="text/css">
Anyone more experienced that can tell me what this does and if it would be safe to remove?
Crusader is offline   Reply With Quote