View Single Post
Old 02-12-2014, 12:53 AM   #7
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by RbnJrg View Post
You can achieve that effect with the following code:
Of course! Right when I saw negative margins in your post, the same type of solution clicked for me (I hate it when that happens).

Thanks for the fantastic example.

I only did a few minor tweaks to your CSS:
  • Uncondensed margins.
  • Made the width 25% (adjusted margins to fit)
    • 5% was a little too thin when I used "VIII"
  • Removed specifying "black" from the border-top
    • This should allow the line to match the user specified font color
    • Tested it by changing the font color in Calibre, looked like the line color changed right along with it

Code:
h2 {
    text-align: center;
    margin-top: 1em;
    margin-bottom: 1em;
    margin-left: 0;
    margin-right: 0;
    border-top: 3px solid;
    height: 0.5em;
}

.text {
    float: left;
    width: 25%;
    margin-top: -.5em;
    margin-bottom: 0;
    margin-left: 37.5%;
    margin-right: 37.5%;
    background: white !important;
}

p {
    text-align: justify;
    text-indent: 0em;
}
(See attached EPUB)

In ADE:

Click image for larger version

Name:	VII.png
Views:	273
Size:	54.3 KB
ID:	118992

Tested it in Calibre, you get this oddity (border appears at the very top, and not through the middle):

Click image for larger version

Name:	CalibreLineOddity.png
Views:	285
Size:	31.8 KB
ID:	118993

Quote:
Originally Posted by RbnJrg View Post
Here you can see how it looks in ADE:
JPG?!?!?!?! You disappoint me! Have I taught you nothing about the superiority of PNG for artificial images?!!?!?

Quote:
Originally Posted by GrannyGrump View Post
@RbnJrg -- but won't that look odd if the user does not have Black Text on a White Background?
Indeed... doesn't seem like there would be a perfect solution, but this is a fantastic step in the right direction.

Definitely much further than where I was previously!

Quote:
Originally Posted by GrannyGrump View Post
@Tex -- if you want to go through the hassle of an embedded font, freeware Type Light [http://www.cr8software.net/typelight.html -- it says "open type font editor", but also works with true type] is fairly simple to use to edit/replace glyphs. You could make the emdash longer, and embed that subsetted font. Just a thought.
Thanks for the info. I personally tend to just err on the side of never getting in the way of user font choices, so I try to avoid embedding any fonts.

I will put this one in my pocket and take a look though.

Quote:
Originally Posted by gbm View Post
Remember that the Nook does not like condensed margins
Please see this thread, Post #13-#21. Nook does not like condensed margins when not using publisher defaults.
Thanks for pointing this out. Good to let others learn about oddities in certain readers.

I always use the uncondensed version anyway, seems much easier to understand/read (especially if others open the book and want to quickly tweak something).
Attached Files
File Type: epub LineThroughTexEdit.epub (2.6 KB, 205 views)

Last edited by Tex2002ans; 02-12-2014 at 12:57 AM.
Tex2002ans is offline   Reply With Quote