04-15-2013, 03:27 PM | #1 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Float Question (ADE)
I am currently working on a book which has formula numbers down the right hand side of the page.
In ADE, it seems to drop the formula number down a line, instead of floating to the right edge of the same line. (Sigil looks as I expected). I was wondering if anyone out there has run into this same problem, and what sort of code they used to fix the situation. Currently, I am using this code: Code:
<p class="center margintop">Formula Formula Formula <span class="floatright">(##)</span></p> Code:
.center { text-indent: 0; text-align: center; } .margintop { margin-top: 1em; } span.floatright { float: right; }
Last edited by Tex2002ans; 04-15-2013 at 03:30 PM. |
04-16-2013, 01:50 AM | #2 |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
I know everybody scowls and tries to avoid them, but have you considered using two-column tables for these? Without borders, if so desired, but maybe using a "dotted" bottom border on the cells could substiture for the dot-leaders in the original book.
Ok, silly answer. Just brain-storming. Last edited by GrannyGrump; 04-16-2013 at 01:52 AM. |
04-16-2013, 03:06 AM | #3 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
This is maybe the 8th book I have run into with this dilemma. I can't be the only one who has run into this same problem when converting to EPUBs/MOBIs. No answer is a silly answer! (ok ok that was a lie ) |
|
04-16-2013, 03:44 AM | #4 | |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
Quote:
I hope you find a solution, I will absolutely steal it! |
|
04-16-2013, 06:04 AM | #5 |
Groupie
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
|
ha, i just ran into this problem in a book i'm working on literally 10 minutes ago. in the past i've broken up the numbers and the corresponding text into 2 elements, and then added the floated element above the non-floated element in the html. seems to work across readers, but if someone had a saner solution i'd be grateful for it.
here's what i'm using now to float a number inline with a block of text: Code:
<p style="float:right;">(##)</p> <p>here's some text with a number floated to the right of it</p> |
04-16-2013, 07:26 AM | #6 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Here's an ePub showing both float left and right.
I use spans in the paragraph but they are both defined before the text of the paragraph, (otherwise they don't float properly.) Works with my Sony reader which is ADE based. (I think this is really the same as mzmm's solution, but I prefer using span.) .cen { text-align:center } .fll { float:left } .flr { float:right } <p class="cen"><span class="fll">1</span><span class="flr">1</span>Text</p> Last edited by Agama; 04-16-2013 at 07:33 AM. |
04-16-2013, 06:29 PM | #7 | |||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Impossible to "steal" something which is intangible!! Are we not all here to make better ebooks?
But feel free to copy/emulate what we learn here in this topic! Also, feel free to also take a look at any of the 100+ books I have worked on over the past year (almost all Non-Fiction Economics books) and give comments/tips/suggestions. It will be much appreciated. I also must begin compiling all these tips/tricks I have absorbed from the forums into one ultimate resource. Sometimes these goodies just disappear into the abyss... never to be seen again! Quote:
Quote:
Quote:
This code works fine in ADE (as Agama's EPUB shows) (See Image 1): Code:
<p class="cen"><span class="fll">(1)</span> <span class="flr">(1)</span> A lot more text than normal Text</p>
Code:
<p class="cen"><span class="fll">(1)</span>A lot more text than normal Text <span class="flr">(1)</span></p>
Code:
<p class="cen"><span class="fll">(1)</span>A lot more text than normal Text<span class="flr">(1)</span></p>
|
|||
04-17-2013, 12:37 AM | #8 |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
For another way to set it up with two separate paragraphs, check out Toxaris' suggestion in this thread: https://www.mobileread.com/forums/sho...d.php?t=208541
If you adjust the width, it allows two paragraphs side-by-side. Last edited by GrannyGrump; 04-17-2013 at 01:13 AM. Reason: change info |
04-17-2013, 01:33 AM | #9 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
I hate those gremlins... and your edit, isn't that solution exactly what I just wrote in my post?
Quote:
Hmmmm... trying to get text boxes eh? This is some CSS I stripped out of a book I purchased/read, and now I use it all the time in my own EPUBs if I ever need to recreate a box (see attached image for how it looks): Code:
div.textbox { background-color:#D1D3D4; border-bottom: 3px double; border-top: 3px double; border-left: 3px double; border-right: 3px double; padding: 1em; line-height: 1.7em; text-align: center; } |
|
04-17-2013, 02:10 AM | #10 | |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
Quote:
I like the text box, I will be trying that out soon. Thank you. |
|
04-17-2013, 02:53 AM | #11 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
I also love/hate when the publishers have those huge CSS files that they stick in the EPUB.... lots of classes to mess around with in there to figure out what they do. |
||
04-17-2013, 03:29 AM | #12 | |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
Quote:
or, since you only want the right float: Code:
<p class="cen"><span class="flr">(1)</span>A lot more text than normal Text</p> |
|
04-17-2013, 04:01 AM | #13 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
I was just clarifying the sections in red in my "don't work" examples. (Compared with the code that DOES work from your EPUB test).
Quote:
Thank you. |
|
04-18-2013, 06:23 AM | #14 | ||
Groupie
Posts: 171
Karma: 86271
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
|
Quote:
Quote:
although floating numbers inline hadn't occurred to me, think i still personally prefer separating them into discreet blocks. because there are so many back-references in the book i was working on, i end up with things like <p class="paragraph_number"><a id="ref300"/><span class="bold underline">300</span></p> good to hear that you found a solution though! |
||
04-18-2013, 01:33 PM | #15 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
My job involves mostly working from the dreaded PDF scans. Whenever I get to work right from the original InDesign files/Word Documents it is like music to my eyes. This EPUB of "The Economics of Inflation: A Study of Currency Depreciation in Post-War Germany" by Constantino Bresciani-Turroni was 464 pages of pure....... "fun". I am telling you, the Typesetter/Publisher in 1937/1968 decided, "let us pick the WORST POSSIBLE everything to make Tex2002ans's conversion hell". Hopefully my sacrifice is worth it though, I do this conversion once, and create a nearly 100% accurate conversion of the text. This EPUB/XHTML version will then be released for free online, for anyone to read/search/copy/paste/influence/learn from in the far future. Thank you, hopefully others can use this as well. Over the coming days, I will have to test this + the two line solution, and have to see how all of these look on the Kindle versions as well, and/or how gracefully it fails (if float is not available). I will be sure to report any updates here. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about ADE | crutledge | ePub | 7 | 04-15-2013 02:11 AM |
The operator >> is undefined for the argument type(s) float, float | twobob | Kindle Developer's Corner | 10 | 09-05-2012 12:50 PM |
Float bug in ADE ? | helenouchkaia | ePub | 16 | 01-08-2012 11:11 AM |
float not working as expected in ADE | iain robinson | ePub | 8 | 06-18-2011 04:16 AM |
Another question about ADE | crutledge | Sigil | 0 | 05-21-2010 05:03 PM |