Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 09-10-2019, 05:48 AM   #1
kso
Enthusiast
kso began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Jun 2018
Location: UK
Device: Android, iPad, iPod, kindle {keyboard,fire7,hdx8.9} kobo, Sony PRS 600
Kindle table problem due to use of caption

I'm trying to use a very narrow table (3 columns) with a caption and I have nothing but trouble. Either the epub I'm building to be processed by Kindle Previewer 3.33 doesn't look the way it should (1st screenshot), or it does but then I have to make do without the pretty green checkmark next to "Enhanced Typesetting" (2nd screenshot).

Quote:
<table>
<caption>Short Caption String</caption>
<thead>
<tr>
<th>Amount</th>
<th>Unit</th>
<th>Item</th>
</tr>
</thead>
<tbody>
<tr>
<td>20.0000</td>
<td>Gram</td>
<td>Sugar</td>
</tr>
<tr>
<td>1.0000</td>
<td></td>
<td>Carrot</td>
</tr>
<tr>
<td>0.5000</td>
<td>litre</td>
<td>Cider</td>
</tr>
</tbody>
</table>
If I remove the caption from the table and use a span (or DIV or whatever) beneath the table, wrapping both in a DIV for the simulated caption to theoretically have the same width as the table and to share the same left margin as the centered table I get Enhanced Typesetting in the previewer 3.33 but it looks anything but enhanced: the simulated caption moves to the left margin of the page, no matter what I use (display:inline-block or block). When I add a border around the DIV containing table and caption I see that the table occupies only a fraction of the width of the page -- even on narrow screens such as an old ipod. Despite this the caption string at the bottom of the wrapping DIV is positioned outside the actual DIV.

Anyone knows how to have the caption positioned as in the 2nd image but _with_ Enhanced Typesetting on? I'd really appreciate it.

Klaus

Edit: How do you indent code when posting here? The code I fed into the form has indentation, but when I look at the posted page it's gone?
Attached Thumbnails
Click image for larger version

Name:	wrappedspan.jpg
Views:	192
Size:	3.3 KB
ID:	173361   Click image for larger version

Name:	looksOKbutNoEnhTS.jpg
Views:	196
Size:	4.8 KB
ID:	173362  

Last edited by kso; 09-10-2019 at 05:50 AM. Reason: Quoted Code lacks indentation
kso is offline   Reply With Quote
Old 09-10-2019, 06:39 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by kso View Post
Anyone knows how to have the caption positioned as in the 2nd image but _with_ Enhanced Typesetting on? I'd really appreciate it.
Simply remove the caption and add it as a regular <td> element:

Code:
      <tr>
        <td colspan="3">Short Caption String</td>
      </tr>
Doitsu is offline   Reply With Quote
Advert
Old 09-10-2019, 10:12 AM   #3
j.p.s
Grand Sorcerer
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 5,278
Karma: 98804578
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by kso View Post
How do you indent code when posting here? The code I fed into the form has indentation, but when I look at the posted page it's gone?
Use CODE tags insteead og QUOTE

Code:
First line
    Indented line
Unindented line
j.p.s is offline   Reply With Quote
Old 09-10-2019, 12:23 PM   #4
kso
Enthusiast
kso began at the beginning.
 
Posts: 47
Karma: 10
Join Date: Jun 2018
Location: UK
Device: Android, iPad, iPod, kindle {keyboard,fire7,hdx8.9} kobo, Sony PRS 600
Red face What can I say...

Boy oh boy. It appears I'm not fully awake right after getting out of bed. Confusing CODE and QUOTE is due to lack of coffee. Adding a caption as a TD is something I'd never thought of in a million years.

Thanks
kso is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Caption problem elbona88 Conversion 2 05-02-2018 02:24 PM
Problem with Epub to Pdf Conversion:text invisible on right hand side due to clipping Feher Conversion 2 06-08-2013 03:58 AM
Touch Table of contents problem - firmware 2.3.1 James R Kobo Reader 1 01-31-2013 01:04 AM
Problem with table of contents in ePub Terisa de morgan Conversion 1 11-17-2011 08:28 AM
Table of contents conversion problem... artbatista Calibre 3 06-21-2009 02:52 AM


All times are GMT -4. The time now is 09:35 PM.


MobileRead.com is a privately owned, operated and funded community.