![]() |
#1 |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Weird tables in epub
Yes, it's me, I'm back again with another problem.
![]() I'm still working here on Thoreau's "Walden" (and various other Thoreau-related works) and especially in that particular book he has quite a few different tables. I've included here one of the weirder ones that I had to -- or tried to -- duplicate, and if I could get this one table figured out then I'm sure I'll manage with all the other ones. I'm sure the three attachments here should illustrate what I'm trying to accomplish, and the problem(s) I'm having. walden-table-original.jpg is the page from the 1906 edition (i.e. the original print edition, of course) of "Walden" showing the table that I'm trying to duplicate. walden-table.epub is basically what I came up with for my ebook, with the following two attachments being screenshots of that... walden-table-ipad.png is a screenshot of this latter epub as it display on the iPad -- basically what I'd expected and hoped for, although apart from other issues (which you'll see with the ADE screenshot, below), I do wish that I could conjure up a way to do up a long (tall), "stretchy" curly bracket (brace), one that would increase/decrease in length (i.e. height) without getting fatter in the process. Any ideas on that one, while I'm here? walden-table-ade.png is a screenshot of the same in ADE, which shows the problems I'm having. Obviously, this is far more important for me to get right than it is to do so on the iPad -- although I do find it odd that things displayed as I'd hoped, as I'd coded it, on the latter, but things just go haywire in ADE. I guess the issues I see with this are... - How come the widths of my table columns are being ignored in ADE? They should be coming out more nicely spaced (as I'd specified in my code) as they do on the iPad, but it seems like ADE just completely ignores what I set them as. - How come there's no hyphenation of the word "experiments" in the bottom-right hand column in that table? - Although you don't see it in this ADE screenshot (in the two-page layout), in a one-page, wider layout the table defaults to aligning itself on the left of the page. Although this is a "bigger" table, I do have a whole bunch of other smaller table to deal with, too, and it would be nice if I could get them all to center (horizontally) in the page -- I just can't seem to figure out how to do so, though! It almost makes me long for ye olden days, when we had the simple <center></center> tag, because text-align:center doesn't cut it. Right now, I just have no idea what to do about these various tables -- and there's lots of them, and in another book of Thoreau's ("The Maine Woods") I just realized that I'm going to have a TON of them (in the appendix), too. Thanks in advance, as always, for any and all help! ![]() |
![]() |
![]() |
![]() |
#2 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
<colgroup> <col span="1" style="width: 35%;" /> <col span="1" style="width: 5%;" /> <col span="1" style="width: 5%;" /> <col span="1" style="width: 5%;" /> <col span="1" style="width: 25%;" /> <col span="1" style="width: 2%;" /> <col span="1" style="width: 23%;" /> </colgroup> Code:
.width_1 { width: 35%; } .width_2 { width: 5%; } .width_3 { width: 25%; } .width_4 { width: 2%; } .width_5 { width: 23%; } Before: Code:
<td align="left" class="tdtext" valign="middle">Rice,</td> Code:
<td align="left" class="tdtext width_1" valign="middle">Rice,</td>
Quote:
Quote:
Below you can watch screenshots of my ADE 3.0 (with one and two columns layout): I hope all this can help you Regards Rubén Last edited by RbnJrg; 11-16-2014 at 07:55 AM. |
|||
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Oh, thank you (once again!), Rubén! Indeed, that does seem to work out just fine! I was worried that I was going to have to do something really major (like not use tables at all -- eek!), but that should be fairly easy to change.
So I gather what you're saying is to use styles to set the column width, rather than that <colgroup> method? It's funny, but I'd never even heard of that <colgroup> tag until I did this, and I forget where I saw it, but I think I read somewhere that that was the way to do it for ebooks -- but obviously it doesn't quite work. As for centering the table, what you did for this particular table worked out just fine, but I have so many other tables, each all a little "weird" in their own way, and there are some that I wish I could just have centered on the page if the viewing area is wide (for example, single-page landscape), but if necessary could be 100% the width of the screen if it's not-so-wide. Or, to put it another way, I just wish there was a simple, stupid <center> tag, like there used to be! Is there no way to have an item -- like a table -- and just have it "center" on the page, but without having to do it by setting a specific margin size? Like, just center the stupid thing, and if it needs to be 100% wide, then it just is, and if it doesn't then it just adjusts itself? I find it so crazy that "centering" something is one of the most common and useful things that one can do in design, and yet they tossed that out the window as CSS got more "advanced" (supposedly). I really find that incomprehensible... ...but anyway, I digress. ![]() |
![]() |
![]() |
![]() |
#4 | |||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() Quote:
![]() Quote:
![]() ![]() ![]() ![]() Regards |
|||
![]() |
![]() |
![]() |
#5 | |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
Gawd, I have sooooooo many tables to fix up and re-do now, though! At least as far as inserting specific code into each <td> tag -- having done it the <colgroup> way at first, I won't be able to just do a simple search & replace. :/ Oh well -- worth the effort, though, and I'm glad I realized this before I continued on with the next pile of tables that I still have to do now. ![]() Thanks again, Rubén! ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Houston, we have a problem!
![]() I thought I'd stay up all night and try to get all my tables re-done, and as soon as I started on the first one in the book I ran into a problem. Here's a screenshot of how it ended up looking in ADE. As I mentioned in my last reply, I thought I'd give it (the table, and all tables) a left margin of 3.2em -- which is the same that I have my poems and "blockquotes" set at -- but giving the table that margin seems to move the whole table into the right-hand margin by that much (if I delete that margin-left:3.2em then everything looks okay). I tried different things -- using padding instead of margin (then the table goes flush-left, no indentation at all), and giving the table a right margin of 3.2em, too (no effect all), and I have no idea what to do. Any ideas? If you need more info, feel free to ask away -- here's a screenshot of how it's turning out, though. You can see the problem toward the bottom of the table, where there's the line in the right-hand column that says "I carried a good part on my back." |
![]() |
![]() |
![]() |
#7 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,522
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Does your table have a 100% width (on its own, or all columns summed up)? Then it's not surprising that it happens.
You could try wrapping a <div> around the table, putting the 3.2em margin in the <div>, and leaving the table without margins, with 100% width. Otherwise just reduce the table's width and write the margin as a % too. |
![]() |
![]() |
![]() |
#8 | |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
And as for changing the margin from ems to %, then I'd lose out on keeping things consistent with my poem and blockquote paragraphs. However! On a happy note, your solution to wrap the whole table in a div and give that a 3.2em margin seems to have done the trick! At least, in ADE it's worked out fine -- I haven't tried it on the iPad yet, but I'm assuming that it'll come out okay in that. Thanks so much -- you saved the day once again, Jellby! ![]() ![]() |
|
![]() |
![]() |
![]() |
#9 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
It seems that you didn't read this part of my original post: ![]() Quote:
Code:
.table_width { /* this class is for the <div> tag that will enclose any of your tables */ width: X%; /* Here instead of X you'll write your desired width */ } table { width: 100%; } Code:
<div class="table_width"> <table> .... .... </table> </div> Rubén Last edited by RbnJrg; 11-17-2014 at 12:16 PM. |
||
![]() |
![]() |
![]() |
#10 | |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Oops -- I probably read it, but then promptly forgot about it.
![]() Quote:
On the other hand, if I used % to indent the tables, even if I get it looking "similar" to how I've indented those other bits of text in, say, landscape mode, then that will change when I go in portrait mode (or by changing between one-page or two-page landscape) and then things won't be consistent. At least with em, everything looks nice and consistent. Wouldn't that make more sense? |
|
![]() |
![]() |
![]() |
#11 |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Interesting... I just noticed that tables don't break across pages in ADE, like they do in iBooks -- although I suppose they would if they "had" to, if it was an especially long table or something (note: I just tried it, made a reeeeeeeeeeeeally long table, and indeed it does break across pages no problem).
I thought maybe it might be because of the addition of that <div> wrapping around the table -- hey, what the heck do I know? ![]() This might be a stupid question, but is there perchance some "secret code" (secret to me, anyway) that allows the table to break across pages? As it is, I've got several tables that are relatively big -- like, maybe half a page in size or something -- and I can see that there will be times where you'd end up with the regular text paragraphs coming just before that table having a big blank space at the bottom, and then the table on the next page, just to keep that table "all together." I'd rather that the table broke across pages, and didn't inadvertently insert all that white space (which I think would potentially be more confusing to readers -- leaving them thinking that there was an intentional "section break" within the chapter -- than having the table split across pages). |
![]() |
![]() |
![]() |
#12 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
https://www.mobileread.com/forums/sho...48&postcount=6 Think about it ![]() Regarding your new issue with long tables under ADE, could you post an epub with one of those tables? Regards Rubén |
|
![]() |
![]() |
![]() |
#13 | |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#14 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,580
Karma: 7043711
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#15 | |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
And I am actually quite happy with how this has all turned out. I do have to go over and re-do all my tables (to some extent), one-by-one, but in the process I've discovered some other ways that I can simplify everything, too, and so overall those tables will be much nicer (both in how they display, as well as "behind-the-scenes" for me to work with in coding them). Thanks again, Rubén -- and I do appreciate your concerns, too! ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tables in an epub? | Section8 | ePub | 12 | 10-17-2013 06:53 AM |
Glo Graphics, pictures and tables in Epub | Elfuente | Kobo Reader | 1 | 12-03-2012 06:40 PM |
Tables in ePub: CSS | virtual_ink | ePub | 5 | 02-23-2012 02:51 PM |
ePub to Mobi issues with tables | apastuszak | Conversion | 11 | 06-20-2011 09:19 PM |
Converting Word Doc with Tables to Epub? | dhume01 | ePub | 8 | 12-28-2010 08:02 PM |