|
|
#1 |
|
Member
![]() Posts: 12
Karma: 10
Join Date: Jul 2015
Device: none
|
Hello, when pasting a table and keeping format from a Word document, the coding has many errors. Am I doing something wrong or just table pasting is not the way to go (because the result looked great even in other epub viewers)
|
|
|
|
|
|
#2 |
|
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
A faster reply could be possible if more information was given. "There are many coding errors" isnt very helpful.
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,915
Karma: 207182180
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Pasting formatted content from Word into Book View will work--as you've found out. But that doesn't mean the code that results will automatically be epub-spec valid. You've not mentioned what the errors were, by the way, so I'm assuming they're validation errors/warnings of some kind and not, in fact, well-formed errors.
I'm admittedly biased on the subject of Book View editing, so I would definitely say that table-pasting from Word into Book View is not the way to go. Others' mileage may vary, of course. I would suggest saving the entire Word document as filtered html and importing that into a Sigil epub--or better yet, using Toxaris' Word add-in--rather than copy/pasting formatted data from Word to Sigil. |
|
|
|
|
|
#4 | ||
|
Member
![]() Posts: 12
Karma: 10
Join Date: Jul 2015
Device: none
|
Quote:
Quote:
attribute 'align' is not declared for element 'p' attribute 'width' is not declared for element 'td' I'll try those 2 suggestions DiapDealer thank you |
||
|
|
|
|
|
#5 |
|
Member
![]() Posts: 12
Karma: 10
Join Date: Jul 2015
Device: none
|
The 1st method (importing filtered html code) had the same results with an additional error
attribute 'type' is not declared for element 'ui' |
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
|
epub is XHTML with a subset from CSS 2. If you paste code outside these specifications its completely normal that you get errors.
|
|
|
|
|
|
#7 |
|
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,093
Karma: 6404930
Join Date: Nov 2009
Device: many
|
Depending on what version of epubcheck you are using width is not longer a legal attribute on a table td tag. Instead the spec calls for using css either as inline styes or in an external css file.
Here is one approach to fixing this by example: Code:
<table width="100%">
<tr>
<td width="80%">Foo</td>
<td width="20%">Bar</td>
</tr>
</table>
Code:
<table style="width:100%;">
<tr>
<td style="width:80%;">Foo</td>
<td style="width:20%;">Bar</td>
</tr>
</table>
The correct way to handle this for html5 is: Code:
<p style="text-align:right"> Last edited by KevinH; 12-29-2015 at 01:37 PM. |
|
|
|
|
|
#8 |
|
Member
![]() Posts: 12
Karma: 10
Join Date: Jul 2015
Device: none
|
Thanx Kevin! That really helped since Im new to this.
The problem was when pasting a table, the width attribute appeared twice in the code (example): Code:
<td width="130" valign="top" style="width:97.55pt;border:solid white 1.0pt;...etc While with align I got (example): Code:
<p class="MsoNormal" align="left"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";...etc |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Copy PAste | Fizzyfi | Calibre | 2 | 04-10-2015 03:55 PM |
| Copy/Paste | PalingB | Sigil | 10 | 10-15-2014 04:17 PM |
| Copy and Paste | JDavid | Sigil | 4 | 08-23-2012 05:02 PM |
| Copy Paste | giosa | Sony Reader Dev Corner | 0 | 03-24-2012 07:17 PM |
| Copy and Paste | Gunnerp245 | enTourage eDGe | 1 | 04-03-2010 03:45 PM |