View Single Post
Old 04-17-2024, 11:22 AM   #114
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,688
Karma: 5444398
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by Jaco View Post
Hi again,

To do a table in HTML is tedious. I edit technical books and I have to code a lot of boring tables. I spend too much time.

I think it could be a good idea to add a button for programming HTML tables. I see examples here:

https://www.tablesgenerator.com/html_tables
https://www.codeguru.com/network/html-table-generator/
https://www.htmltables.io/

A button similar to List button would be very very useful.

Again, thanks in advance.

Use of tables in epubs of more than just a few columns or a few rows creates many issues for smaller e-readers like phone or tablet based ones.

So what I do is define a new Clip that will insert the elements of a *small* table
in CodeView that I can then easily expand/manipulate by copy and paste.

There are limits on table use in Kindles as well (or their were) so promoting their use may not be in the best interest of of the epub designer.

Here is the Clip called "table" that I created with in any text editor and then used Sigil's Clips Editor to create a table clip using paste so that I can add a simple table framework into my CodeView xhtml with a single click:

Code:
<table>
 <caption> Table Caption </caption>
 <thead>
   <tr> <!-- Headings -->
     <th> Column 1 Header </th>
     <th> Column 2 Header </th>
   </tr>
</thead>
<tbody>
<tr> <!-- Row 1 -->
  <td> data1 </td>
  <td> data2 </td>
</tr>
<tr> <!-- Row 2 -->
  <td> data1 </td>
  <td> data2 </td>
</tr>
<tr> <!-- Row 3 -->
  <td> data1 </td>
  <td> data2 </td>
</tr>
</tbody>
<tfoot>
    <tr>
      <th> Footer1 </th>
      <th> Footer2 </th>
    </tr>
</tfoot>
</table>
You can just as easily create a Clip to paste into a CSS stylesheet when in CodeView to help style it. If I have to do a more elaborate table, you can create Clips that just are specific sub elements of a table and use them as needed.

Hope this helps.

Last edited by KevinH; 04-17-2024 at 11:50 AM.
KevinH is offline   Reply With Quote