Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-02-2021, 08:01 PM   #1
Artie
Junior Member
Artie began at the beginning.
 
Artie's Avatar
 
Posts: 8
Karma: 10
Join Date: Jun 2021
Device: Kindle Voyage
Question Tables in ePub

Hello, I kindly ask if it is possible to have tables in an ePub file.

Year 2021.

Many thanks!
Artie is offline   Reply With Quote
Old 12-02-2021, 08:16 PM   #2
Karellen
Addict
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 212
Karma: 872186
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Yes, you can.

What sort of table design do you prefer?

Something to get you started... https://www.w3schools.com/tags/tag_table.asp

Last edited by Karellen; 12-02-2021 at 08:17 PM. Reason: fix wrong url
Karellen is offline   Reply With Quote
Advert
Old 12-02-2021, 08:20 PM   #3
Artie
Junior Member
Artie began at the beginning.
 
Artie's Avatar
 
Posts: 8
Karma: 10
Join Date: Jun 2021
Device: Kindle Voyage
I would like to generate a paper with simple tables, and export to EPUB. No more than four or five columns with numbers, and some merged cells.

I am only capable to handle the document in Google Drive. It exports .EPUB, but I cannot control the table. Sometimes they act weirdly.

Which software do you recommend?

How can HTML tables be exported to EPUB? Many thanks.
Artie is offline   Reply With Quote
Old 12-02-2021, 09:04 PM   #4
Karellen
Addict
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 212
Karma: 872186
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
@Artie

Personally, I use Calibre which has its own section in this forum.
You can download the software here... https://calibre-ebook.com/download
It allows you to manage your library as well as having a built in ereader and an ebook editor.

If you haven't worked with css and html before plus learning the ins and outs of a new software package, it will initially be an uphill battle (from personal experience), but once you realise how html and css work together, it fall together quite quickly. The software is pretty easy to understand, but there is a small learning curve.

You create the tables in epub files, so there is no exporting involved. Once you have created your epub file, added css code to the stylesheet, you can create the table.

Best to take it a step at a time. Install the software, add a couple of books, open one of the books in the editor and become familiar with it. I am sure there are plenty of members here that can help guide you.

It will also help if you have a screenshot of how you want the table to look. Post it here by clicking on the paperclip icon in the editors bar above.
Karellen is offline   Reply With Quote
Old 12-02-2021, 09:07 PM   #5
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 11,595
Karma: 67333333
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
While yes you can have tables, some e-readers (and no... I can't cite examples) do have issues.

Remember you are dealing with a view that is quite narrow.

Some folks prefer embedding a picture of a table

Sent from my Pixel 4a using Tapatalk
PeterT is offline   Reply With Quote
Advert
Old 12-02-2021, 11:35 PM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,997
Karma: 9274203
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Artie View Post
Hello, I kindly ask if it is possible to have tables in an ePub file.
Yes. See this topic from a few months ago:

"Formatting tables best practices"

Quote:
Originally Posted by Artie View Post
I am only capable to handle the document in Google Drive. It exports .EPUB, but I cannot control the table. Sometimes they act weirdly.
What do you mean it "acts weirdly"?

Probably because Google Docs creates absolutely atrocious HTML. But there's no reason you can't open the EPUB up in Sigil (or Calibre's Editor) and clean up the crud.

HTML Tables pretty much just boil down to these simple parts:
  • <table>
    • This is the table
  • <tr>
    • Use this for every new row.
  • <th>
    • This is your headings.
  • <td>
    • This is your data.

Code:
<table>
	<tr>
		<th>First</th>
		<th>Last</th>
	</tr>
	<tr>
		<td>John</td>
		<td>Smith</td>
	</tr>
	<tr>
		<td>Joanne</td>
		<td>Laster</td>
	</tr>
</table>
Quote:
Originally Posted by Artie View Post
I would like to generate a paper with simple tables, and export to EPUB. No more than four or five columns with numbers, and some merged cells.
Merged cells are a little more complicated in HTML, and they get QUITE confusing if trying to code them by hand.

You'd have to use this stuff called:
  • rowspan
    • How many merged rows the cell is.
  • colspan
    • How many merged columns the cell is.

Code:
<table>
	<tr>
		<th colspan="2">FullNames</th>
	</tr>
	<tr>
		<td>John</td>
		<td>Smith</td>
	</tr>
	[...]
</table>
What I do is use an external program (like LibreOffice Calc) to design the complicated table, then export to HTML and do my cleanup elsewhere.

(Google Docs should already be fine for this!)

Side Note: Most tools don't export Accessible HTML though, so you'll have to do manual tweaking anyway.

They do dumb stuff like use "<td> + bold it" for headings... instead of using the actual HTML <th>.

The reason why proper HTML is so important is when devices like Text-to-Speech try to read the table:
  • With <th>, they will know WHICH columns are "First Names" + "Last Names".
  • With <td> + bold, they will just think "First" and "Last" is just another row of data.

Last edited by Tex2002ans; 12-02-2021 at 11:42 PM.
Tex2002ans is offline   Reply With Quote
Old 12-04-2021, 04:33 PM   #7
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,485
Karma: 987654
Join Date: Dec 2012
Device: Kindle
As a strong believer in Keep It Simple, I've never used a table in an ebook, and if I had to, I'd provide an image.

Happy Christmas! -- NJ
Notjohn is offline   Reply With Quote
Old 12-04-2021, 07:14 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 64,545
Karma: 105732195
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, PW3
Quote:
Originally Posted by Notjohn View Post
As a strong believer in Keep It Simple, I've never used a table in an ebook, and if I had to, I'd provide an image.

Happy Christmas! -- NJ
And if I was reading this eBook with a fake table, I would hate you for it.
JSWolf is offline   Reply With Quote
Old 12-05-2021, 01:32 AM   #9
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,997
Karma: 9274203
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Notjohn View Post
[...] I've never used a table in an ebook, and if I had to, I'd provide an image.
Table-as-images is a very bad idea. It's been explained, in extreme depth, dozens of times by me within those linked threads.

They are completely inaccessible.
Tex2002ans is offline   Reply With Quote
Old 12-06-2021, 04:41 AM   #10
Artie
Junior Member
Artie began at the beginning.
 
Artie's Avatar
 
Posts: 8
Karma: 10
Join Date: Jun 2021
Device: Kindle Voyage
Lightbulb Table workflow for ePub

Hi all,

Many thanks for your answers, I really appreciate them.

I've been working with HTML and CSS for years, so this is not an issue. Image/HTML debate is old for me.

And I think this GIF is brilliant! Super! https://old.reddit.com/r/gifs/commen...less_terrible/

I started this thread to figure out which is the best workflow for tables inside an EPUB file.

If the EPUB format supports tables, I do really believe there should be a straightforward way to generate a document with tables that can be translated into an EPUB, in a clean way.

Right now, I use Ulysses for writing. When I need to write the table, I switch to Google Drive, create and populate the table, export as an image, and embed into Ulysses. Of course, when exporting to EPUB, the table shows.

But if I have to switch to a text editor to create the table, this is exactly what I do with Google Docs right now.

I have tried Typora, Zettlr, iA Writer and TableFlip to replace Drive, but if they support tables, they aren't able to export and vice versa.

Vellum neither Ulysses understand tables.
TableFlip and Marked understand tables, but they don't export to EPUB.

I don't want to use Google Drive, Word or OpenOffice.
I don't want to use images for tables (and maths formulas).
I want my EPUB file to have the lowest file size possible, as it is extended and contains lots of data.

I use Calibre to transfer the EPUB that generates Ulysses to my Kindle device. Sigil is new for me, but it seems a text editor.

Likewise, I'm confused about how Calibre and Sigil may help me, can you please elaborate a little more on that @Kalleen?

Many thanks!
Artie is offline   Reply With Quote
Old 12-06-2021, 01:09 PM   #11
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 9,552
Karma: 130607609
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Artie View Post
Hi all,

Many thanks for your answers, I really appreciate them.

I've been working with HTML and CSS for years, so this is not an issue. Image/HTML debate is old for me.

And I think this GIF is brilliant! Super! https://old.reddit.com/r/gifs/commen...less_terrible/

I started this thread to figure out which is the best workflow for tables inside an EPUB file.

If the EPUB format supports tables, I do really believe there should be a straightforward way to generate a document with tables that can be translated into an EPUB, in a clean way.

Right now, I use Ulysses for writing. When I need to write the table, I switch to Google Drive, create and populate the table, export as an image, and embed into Ulysses. Of course, when exporting to EPUB, the table shows.

But if I have to switch to a text editor to create the table, this is exactly what I do with Google Docs right now.

I have tried Typora, Zettlr, iA Writer and TableFlip to replace Drive, but if they support tables, they aren't able to export and vice versa.

Vellum neither Ulysses understand tables.
TableFlip and Marked understand tables, but they don't export to EPUB.

I don't want to use Google Drive, Word or OpenOffice.
I don't want to use images for tables (and maths formulas).
I want my EPUB file to have the lowest file size possible, as it is extended and contains lots of data.

I use Calibre to transfer the EPUB that generates Ulysses to my Kindle device. Sigil is new for me, but it seems a text editor.

Likewise, I'm confused about how Calibre and Sigil may help me, can you please elaborate a little more on that @Kalleen?

Many thanks!
Perhaps I'm misunderstanding something then.

How is it you expect to 'create a table' if not with an HTML editor like Sigil or Calibre? I'm unclear on what you're expecting. If you did use Word and exported to HTML, yes, you'd get an HTML table. Apparently, you don't wish to do that.

Word, for all its alleged issues (which are non-existent if you clean the file properly and use Styles and headings, I might add) is a perfectly straightforward way to make HTML tables. I don't know if Libre Office does the same thing, but others here will know. In Word, you (simply) export to HTML; remove some of the CSS cruft at the top of the HTML file, or all of it, depending upon your experience, open the HTML in Sigil, and make your ePUB. Badda-bing.

If you want an ePUB with the smallest file size, then you will use HTML tables, not images.

So, in short--you want/need HTML tables, but you seem to not want to use the tool that will export that, in HTML, to a file format that you can then use to make an ePUB.

Is that right?

Hitch
Hitch is offline   Reply With Quote
Old 12-06-2021, 01:15 PM   #12
jmurphy
Enthusiast
jmurphy began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Sep 2007
Device: ipaq
I'm over-simplifying and maybe you already know this, but an epub is just a bunch of html/xhtml/xml files in a zip file with the extension ".epub". Rename an epub so it has an extension of ".zip" and open it with your preferred zip tool.

Edit the appropriate html file and insert a HTML table. Zip it back up and you've editted an epub. Rename it back to .epub.

Calibre has a book editor that allows you to directly edit the content of an epub without manually renaming and unzipping, etc. Sigil is a program that essentially does the same as the Calibre editor tool. It can be run as a stand-alone program, or you can use it from inside Calibre if you prefer the Sigil editor to the Calibre editor, but still want to use Calibre for its other functionality.
jmurphy is offline   Reply With Quote
Old 12-06-2021, 01:18 PM   #13
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 9,552
Karma: 130607609
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by jmurphy View Post
I'm over-simplifying and maybe you already know this, but an epub is just a bunch of html/xhtml/xml files in a zip file with the extension ".epub". Rename an epub so it has an extension of ".zip" and open it with your preferred zip tool.

Edit the appropriate html file and insert a HTML table. Zip it back up and you've editted an epub. Rename it back to .epub.

Calibre has a book editor that allows you to directly edit the content of an epub without manually renaming and unzipping, etc. Sigil is a program that essentially does the same as the Calibre editor tool. It can be run as a stand-alone program, or you can use it from inside Calibre if you prefer the Sigil editor to the Calibre editor, but still want to use Calibre for its other functionality.

Yup. I clearly don't understand the issue here.

Hitch
Hitch is offline   Reply With Quote
Old 12-06-2021, 01:48 PM   #14
Artie
Junior Member
Artie began at the beginning.
 
Artie's Avatar
 
Posts: 8
Karma: 10
Join Date: Jun 2021
Device: Kindle Voyage
Smile

Quote:
Originally Posted by Hitch View Post

So, in short--you want/need HTML tables, but you seem to not want to use the tool that will export that, in HTML, to a file format that you can then use to make an ePUB.
I would prefer to use only one tool for writing everything, including tables and maths.

Apps like Ulysses, iA Writer, Obsidian, Typora or Zettlr allow me to get really focused when writing, divide my texts in short segments and reorder or connect them as I figure out. None of them support both table and EPUB export.

Now, I have chosen Ulysses because it is the more mature app of the ones I have mentioned.

Quote:
Originally Posted by jmurphy View Post
I'm over-simplifying and maybe you already know this, but an epub is just a bunch of html/xhtml/xml files in a zip file with the extension ".epub". Rename an epub so it has an extension of ".zip" and open it with your preferred zip tool.**

Edit the appropriate html file and insert a HTML* table. Zip it back up and you've editted an epub. Rename it back to .epub.

Calibre has a book editor that allows you to directly edit the content of an epub without manually renaming and unzipping, etc. Sigil is a program that essentially does the same as the Calibre editor tool. It can be run as a stand-alone program, or you can use it from inside Calibre if you prefer the Sigil editor to the Calibre editor, but still want to use Calibre for its other functionality.
Wow @jmurphy no, I didn't know that. This is what @Karellen was trying to explain to me, but I didn't figure out. You have been very explanatory.

In fact, I have tried exporting the EPUB format from Ulysses to Calibre, selected the file, clicked T and voilà! I have seen the editor. Only two apps involved.

Finally, my table is visible in my Kindle :-)

Very grateful, indeed.

And then just another question . Where can I get a very simple CSS for formatting tables for EPUB?

Many thanks!
Artie is offline   Reply With Quote
Old 12-06-2021, 02:48 PM   #15
Karellen
Addict
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 212
Karma: 872186
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by Artie View Post
Likewise, I'm confused about how Calibre and Sigil may help me, can you please elaborate a little more on that @Kalleen?
Its all in how I interpreted your first question. A simple question like "I kindly ask if it is possible to have tables in an ePub file." indicates a newbie editor that is still learning. So I pointed you in a direction to get started. You subsequently stated you have been working with html for years, which then makes your first question confusing.

Like @Hitch, I am still a bit confused about what you are after and your workflow seems overly-complicated by using numerous editors to try and create an ebook. Sometimes you just need to get your hands dirty and create the table from scratch.
Karellen is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moon Reader, ePub, and Tables RobFreundlich ePub 4 08-14-2015 08:58 AM
Weird tables in epub Psymon ePub 29 11-19-2014 02:40 PM
Tables in an epub? Section8 ePub 12 10-17-2013 07:53 AM
Tables in ePub: CSS virtual_ink ePub 5 02-23-2012 03:51 PM
ePub to Mobi issues with tables apastuszak Conversion 11 06-20-2011 10:19 PM


All times are GMT -4. The time now is 08:46 PM.


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