View Full Version : Tables & Font Size


Hatgirl
04-30-2011, 07:39 PM
I'm having problems with tables in epubs. Let's say this is the code I am using to create a table:

<table border="1">
<tr>
<th>Season</th>
<th>Episode Name</th>
<th>Description</th>
</tr>
<tr>
<td>Season 1</td>
<td>Miri</td>
<td>The crew find a population ravaged by a strange disease, which only children appear to have survived.</td>
</tr>
<tr>
<td>Season 1</td>
<td>Shore Leave</td>
<td>Captain Kirk orders shore leave for the <i>Enterprise</i> crew on a seemily unihabited planet in the Omicron Delta system. The landing parties begin to see strange sights, such as the White Rabbit, Don Juan, and a sword-wielding samurai. Kirk sees (and fights) an image of Finnegan, a rival from his Starfleet Academy days. Spock discovers that the planet seems to be drawing a large amount of energy from the ship's engines, placing the Enterprise in danger.</td>
</tr>
<tr>
<td>Season 2</td>
<td>Wolf in the Fold</td>
<td>Mr. Scott is implicated in a series of bizarre murders.</td>
</tr>
</table>

This creates a nice, normal 3x4 table that looks fine in Calibre, Ibis Reader and Firefox EPUBReader. But when I look at it on my Sony PRS-300, I run into problems. At the default, smallest text size it looks fine. The three columns are visible, and if there are too many rows to all fit on the same page, the lower columns just overspill onto the next page. All the text is readable, even if it is spread out over a couple of pages. Yay.

But here's the problem:
When I increase the font size on the PRS-300, the far edge of the right hand column disappears and so does the bottom of cells that contain more than a few words of text. This missing text doesn't spill over to the following page or anything, so it is not possible to read all of the text in my table when the font is larger than the default size.

Gah! Ideas, anyone?

DaleDe
04-30-2011, 09:49 PM
You can try forcing breaks with br to limit the width of the computed columns. You can also limit the width of the table to 100% which may help. You can even limit the columns to a percentage or fixed pixels.

Dale

Hatgirl
05-01-2011, 07:43 PM
You can try forcing breaks with br to limit the width of the computed columns.
But that will make the text in the cell "longer", which means more of the text will be cut off the bottom.

You can also limit the width of the table to 100% which may help.
Ooh, that was a good idea! But it didn't work. The edges and/or bottom of cells were still cut off. Drat. But now I've learned how to alter the width of a table and center it, so... yay!


You can even limit the columns to a percentage or fixed pixels.
Oooh, again it was handy to learn how to do that! But it didn't solve the cutting-off problem.

Drat.

Oh well, thanks anyway Dale!

DaleDe
05-01-2011, 08:37 PM
Perhaps you could force the table to start at the top of a page. Perhaps that will give it more room. Using the text size "smaller" will reduce it one setting. I am running out of suggestions. Tables are very finicky.

ADE should allow panning on tables. It would be easy to implement. The way I envision it the user would press the next button as always but instead of going to the next page it would pan to the right enough to get the rest of the table on the page or full pan as needed. (previous would pan to the left). If you pressed next when already to the right edge is would then go to the next page. If you pressed previous while panned it would pan left. This way you could move left and right as needed to study and read the table contents. And if you were back at the beginning of the table previous would go to the previous page. Simple change, no new buttons needed.

Additionally table panning could also force the table to the top of the page to provide more space for the table. Leaving the table would set eveything back where it was.