View Single Post
Old 12-25-2013, 08:31 AM   #2
truemarine
Member
truemarine has a complete set of Star Wars action figures.truemarine has a complete set of Star Wars action figures.truemarine has a complete set of Star Wars action figures.truemarine has a complete set of Star Wars action figures.
 
Posts: 20
Karma: 374
Join Date: Dec 2013
Device: K4B, Kobo Aura H2O
Now the full version. I do not know why I can not edit my own post.

First I am using the default reader (fbreader and pdf reader for TXT and EPUB). I tried to add more control by myself and now want to share some experiences.

Tools: OTFM and any editer you like (notepad++ as an example). If you want you can begin with OTMF alone, even for editing on the fly (thanks to the author for creating such a great tool!).

Part I (FBReader for TXT)

File to modify:
/root/onyx_reader/ui.xml

Sample:

<?xml version="1.0" encoding="UTF-8"?>
<config>
<group name="Indicator">
<option name="FontSize" value="24"/>
</group>
<group name="Options">
<option name="BottomMargin" value="8"/>
<option name="LeftMargin" value="8"/>
<option name="RightMargin" value="8"/>
<option name="TopMargin" value="8"/>
</group>
<group name="Style">
<option name="Base:fontFamily" value="YourFontName"/>
<option name="Base:fontSize" value="34"/>
<option name="Base:lineSpacingPercent" value="125"/>
<option name="Regular Paragraph:spaceAfter" value="4"/>
<option name="Regular Paragraph:spaceBefore" value="4"/>
</group>
</config>

What we have:
- Better control for the page margin
- Better control for the line spacing
- Control for paragraph spacing ("Regular Paragraph:spaceAfter" and "Regular Paragraph:spaceBefore")

If you use fbreader for epub reading I guess you can have more control by yourself.

Part II (PDF Reader for EPUB)

File to modify:
/usr/share/adobe/resources/userStyle.css

Sample:

@page {
margin-top: 5px;
margin-bottom: 5px;
}

body
{
padding: 1%;
margin-top: 1%;
margin-bottom: 1%;
margin-left: 1%;
margin-right: 1%;
line-height: 150%;
widows: 0;
orphans: 0;
}

p {
line-height: 150%;
margin-top: 2%;
margin-bottom: 2%;
}

img{
max-width: 100%;
max-height: 100%;
}

.calibre, .calibre1, .calibre2, .calibre3, .calibre4, .calibre5, .calibre6, .calibre7, .calibre8, .calibre9, .calibre10, .calibre11, .calibre12, .calibre13 {
margin-left: 6pt;
margin-right: 6pt;
line-height: 150%;
margin-top: 2%;
margin-bottom: 2%;
}

.preface {
margin-left: 6pt;
margin-right: 6pt;
line-height: 150%;
margin-top: 2%;
margin-bottom: 2%;
}

.quote {
margin-top: 2%;
margin-bottom: 2%;
line-height: 150%;
}

What we have:
- Better control for the page margin
- Removing the strange blank at the bottom of the page
- Removing image "overflow"
- Override some of the CSS setting of the EPUB file (not sure if everyone want to have that)

I am not the expert for all these stuff but just hope it's useful for you.

BTW have nice holiday!

Last edited by truemarine; 12-25-2013 at 08:33 AM. Reason: Fix typo.
truemarine is offline   Reply With Quote