Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-26-2014, 04:13 PM   #1
Mr Pointy
Junior Member
Mr Pointy began at the beginning.
 
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
Mr Pointy is offline   Reply With Quote
Old 02-27-2014, 02:44 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Advert
Old 02-27-2014, 06:32 AM   #3
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
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++?
mrmikel is offline   Reply With Quote
Old 02-27-2014, 07:44 AM   #4
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 02-27-2014, 02:25 PM   #5
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
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.
mrmikel is offline   Reply With Quote
Advert
Old 02-28-2014, 02:18 AM   #6
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 02-28-2014, 06:48 AM   #7
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
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.
mrmikel is offline   Reply With Quote
Old 02-28-2014, 08:00 AM   #8
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 02-28-2014, 01:16 PM   #9
Mr Pointy
Junior Member
Mr Pointy began at the beginning.
 
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...
Mr Pointy is offline   Reply With Quote
Old 02-28-2014, 02:31 PM   #10
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
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.
eschwartz is offline   Reply With Quote
Old 03-01-2014, 03:54 AM   #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: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by eschwartz View Post
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.
He seems to be trying to develop a "DIY" website (he said he developed a "site" along with a friend) somewhat like...Smashwords, I guess. Paste your Word file in here, and it comes out as an ePUB there. (It's the "ePUB-liarmuss" spell, again!)

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
Hitch is offline   Reply With Quote
Old 03-01-2014, 02:00 PM   #12
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
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.
Toxaris is offline   Reply With Quote
Old 03-01-2014, 02:51 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: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Toxaris View Post
I don't dare saying anything anymore about the Calibre conversion of Word documents...
Actually, I was somewhat saying that for this TYPE of "want," e.g., "I wanna paste from WYSIWYG in Word and not have to know anything," Calibre is likely the best candidate. You and I and many others prefer the more finite control over named styles, but this person does not seem to want to do that.

Quote:
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.
It's actually a bit beyond "cumbersome." I mean, trust me; we've tried EVERYTHING here to make it more..."cookie-cutter," but as I said, books=fingerprints. No two are the same. No two people create a manuscript the same way. (We had one in here in the last 10 days in which the typist actually hit the SPACE BAR to wrap around to start a new paragraph. You can't make this s**t up.)

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
Hitch is offline   Reply With Quote
Old 03-01-2014, 09:26 PM   #14
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
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:
Originally Posted by Toxaris View Post
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.
Atlantis is the other way around. It retains the styles (converted to CSS) but changes the stylenames. It also creates new stylenames for paragraphs in which the user modifies the settings for the paragraph but does not make a new style (If the user does this to several paragraphs it will collect them together to make a new style for the set.)

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.
DaleDe is offline   Reply With Quote
Old 03-05-2014, 02:15 PM   #15
Mr Pointy
Junior Member
Mr Pointy began at the beginning.
 
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
Mr Pointy is offline   Reply With Quote
Reply

Tags
paste preserved word code


Forum Jump

Similar Threads
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


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


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