![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Mar 2013
Device: none
|
Epub creation - pasting word and preserving codes
I'm trying to take formatted text from Word (2010) (normal text view) and paste it into a WYSIWYG web page text box/text area so that the codes that are behind the scenes in word are preserved
Sigil did a great job of this - allowing the Word doc to be pasted in book view and then having all the embedded codes show in code view I need to get the normal word code, pasted into a web page but saved behind the scenes as the word "code" format - I'd like the styles to be preserved as well - class="MsoNormal" etc.. can anyone help please? thanks |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Yuk, why would you want that? You can save the word document as filtered HTML from Word itself. The styles would be preserved in that way.
If that is not what you want, I don't understand what you are looking for. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Have you tried just opening the word doc in a text editor like notepad++?
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Have you mrmikel? You really don't want that. A Word doc in the docx format is a container with all kinds of XML files (amongst other things), just like an ePUB is a container. Opening this in Notepad++ will not help...
I think he (she?) just needs the filtered HTML save option. |
![]() |
![]() |
![]() |
#5 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Don't know what they do want. You've given them the best advice they can get about it.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Exactly, the Crystal Ball is broken again.
|
![]() |
![]() |
![]() |
#7 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Whatever it is there is nothing wrong with doing a two step. Paste it into Sigil and then copy it into the Calibre editor or wherever else. Just because Sigil isn't being developed any more doesn't stop it from working.
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
No, but pasting in Sigil (or probably any editor) can seriously make a mess of everything. You know as well as I do that it is much better to work from the code.
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Mar 2013
Device: none
|
Hi All,
thanks for the input I'm taking documents - written in word, and converting them into epub files - initially I was using sigil - pasting word formatted text into sigil and the code that came over I managed to address correctly using the style sheet within sigil - having worked out thats how an epub file is created I have worked with a friend to create a site that can take the formatted text - as per the code view in sigil - into a file and then pumps out the .html page needed for the epub - at the moment I have to convert the word doc into html, view source then strategically cut the bit I need and paste into this text box on the site - it would be much easier for me to paste everything from word normal view into the site - so my question is, is there some way I can paste into comments/text box like the sigil page view that preserves the code as per the sigil code page... |
![]() |
![]() |
![]() |
#10 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
That is absolutely positively not how you create an EPUB.
You are doing a tremendous amount of work, to get broken output, when very easy options are available that already work perfectly. You create an EPUB by converting the document itself from .docx to EPUB. Either with calibre, or with Toxaris' Word Addon. |
![]() |
![]() |
![]() |
#11 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Given that Smashwords, Calibre and NookPress all already do that (along with a bunch of others like Draft2Digital, etc.), I'm not sure I understand where this is going if it's intended to be commercial. Moreover, although I haven't tried it, I've been told that you can kinda do what you want by just running a Word file through Calibre. {shrug}. This has the same issue that ALL conversions have: it's all great if the styling in Word or Word-equivalents is solid and simple. But if it isn't, and you have anything that you don't have in your stylesheet, well...that dog don't hunt. And all of us here already know that pasting BookView to BookView (essentially, from Word's WYSIWYG view to Sigil's Bookview) Does. Not. Work. And there's no "magic" way to extract the Word styles without exporting it to HTML in the first place. That's why almost all of the "convert your book to ePUB" websites use Calibre or the Calibre API. Because what you're trying to do, Mr. Pointy, doesn't work the way you want it to. "Just" pasting a Word file into some interface and getting an ePUB out is the silly Holy Grail of every converter who has never actually done a boatload of books, because, trust me: books are like fingerprints. No two are the same, and the "paste" idea ONLY works (from HTML) if the whole book is cleaned FIRST. The same hour you'd need to do it correctly via HTML in the first place, just to get to the basic HTML in an ePUB. So: why even bother with it? Why not just clean the HTML? ($5 to doughnuts to you, dearest Tox, if I haven't already guessed the answer...) Hitch |
|
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I don't dare saying anything anymore about the Calibre conversion of Word documents...
However, converting Word to HTML can be cumbersome and you have to sacrifice certain things. Most Word to HTML conversions don't deliver what you want or need. Copying between WYSIWYG programs usually deliver WYSIDNWYW (what you see is definitly not what you want). If you want to retain the styles, you are almost out of luck. I retain the stylenames, but not the styles formatting. |
![]() |
![]() |
![]() |
#13 | ||
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Copy and paste will never work UNLESS the ms is completely cleaned and styled FIRST. Someone can do that in Word, or do it in HTML. (With certain exceptions: for example, if you get a Pages-->Word file with italics, 99% of the time, that cannot be cleaned/fixed in Word and MUST be fixed in HTML.) {shrug}. SSDD. Hitch |
||
![]() |
![]() |
![]() |
#14 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
This is for ePub documents. It will make a HTML directly but it is messy with embedded styles in the document itself. Dale Last edited by DaleDe; 03-01-2014 at 09:30 PM. |
|
![]() |
![]() |
![]() |
#15 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Mar 2013
Device: none
|
Hi All,
thanks for the feedback - what I really need to know - is there a way to replicate what happens when you paste a word document into sigil - and get the code from word behind the scenes... ...into a web text box... what would be the web text box/box that the word text can be pasted into that would give the behind the scenes same output as sigil... I appreciate there are easier ways to do this and also that there are products out there that do this already, I just want to try and store the information in code view by posting the normal text from word on a website without having to bounce it through calibre or sigil first - or convert word to html then view source and surgically cut from the listed text |
![]() |
![]() |
![]() |
Tags |
paste preserved word code |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] Preserving Layout with epub | internolivia | Calibre | 9 | 06-04-2014 03:15 PM |
Conversion from MOBI to ePub and preserving footnote links | bloodfyr | Conversion | 0 | 01-31-2012 09:35 PM |
Creation of Complex Script E-Book Using Images for Every Word? | sungkhum | Conversion | 8 | 10-26-2011 04:20 PM |
Preserving format from ePub (Sigil) to Mobi | jeff47 | Calibre | 9 | 10-22-2010 10:17 PM |
Preserving <br /> on epub -> txt conversion | billingd | Calibre | 1 | 08-11-2010 06:24 AM |