![]() |
#1 |
Book Concocter
![]() Posts: 59
Karma: 10
Join Date: Jun 2010
Location: China
Device: Sony Reader
|
How do I transfer a .xhtml from one Sigil project to another?
If I have a successful epub I like very much, for instance a cover image with a coloured background I produced by using OpenOffice in combination with writer2epub, I can open it with Sigil. I can then do some more editing on the cover, also add new xhtml's to continue the story following the cover. However, if I want to incorporate this epub containing the nice cover in another Sigil project -- as an afterthought rather than a starting point -- I'm stumped. The writer2epub output usually has a stylesheet attached, so there is an xhtml as well as a css that must somehow be copied or transferred to the other Sigil project. How do I copy xhtml's from one Sigil project to another?
|
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
An ePUB is essentially a special zip file. You can just open it with any archiving program like 7-zip, winrar, winzip, etc.
That being said, don't create an ePUB by just packing some files in a zip and calling it an ePUB. That will almost never work, since it is a special type of ePUB. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
You cam right click on any file in the book browser to save as and then add an additional file to the other epub. You can copy text from one to the other, using the clipboard. Lots of us have .css files on our hard drives and add them to epubs we are creating, so we are sure we have the items we want, named as we are familiar with them. Stylesheets from a given program are likely to be much the same, so if they are from the same program, likely the references in the work would be ok if you combined two of them.
I think though you want them to be magically integrated. There isn't any way to do that since it would require a lot of guessing by the program, as to which stylesheet to use, where does text go, etc. Save copies with different names and have it and see what happens. So long as you are only working with copies you are merely wasting a little time if it doesn't work. |
![]() |
![]() |
![]() |
#4 |
Book Concocter
![]() Posts: 59
Karma: 10
Join Date: Jun 2010
Location: China
Device: Sony Reader
|
I am over the worst of my initial cluelessness regarding Sigil, although I have not learned all there is to know and can't encode html's yet. I'll work on that later. At this point, I just need some simple, practical "how do I?" pieces of advice. This will help me to make progress, even if I go in the wrong direction, temporarily, with such advice I got. Mr. Mirkel helped me to find the answer to my question, thanks very much.
The answer is as follows: Right-click on the .xhtml (or .css) you want to use in another Sigil project. Click on "Save as". Give a new name to the file as you save it to an appropriate folder, for instance experiment.xhtml. Now go to the other Sigil project. Right-click on the Text folder icon in the Book Browser (because you are going to paste a .xhtml). Click on "Add existing files". Double-click on experiment.xhtml in the folder where you saved it. This will, in effect, transfer the .xhtml from the first Sigil project to the new Sigil project. What happens next -- if the pasted .xhtml will work in its new setting -- remains to be seen or worked on. All I can say is that if you started a Sigil project by opening a writer2epub-produced ePub containing a cover with a background, footnotes, pictures with correct text wrapping, and so on, you should be able to add a .xhtml from another, similar Sigil project without a problem. I guess this is partly because the necessary .css and other auxiliary files are available in the project from the start. Also, if you start a Sigil project by opening a writer2epub-produced ePub, you can develop this extensively within Sigil with good results when you finally compile and read the compilation with your eReader. I'm working on an ePub with many bells and whistles built up without personally encoding html's, displaying correctly on my Sony eReader. I will post this here when its ready, in case someone might be willing to test it on other devices. In the mean time, I just need some practical help, ![]() |
![]() |
![]() |
![]() |
#5 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
The Sony is pretty standard reader, though they all have their peculiarities.
You should probably be ok bringing them over, but without seeing the files it can be hard to say for sure. Just keep copies at each step and when it goes caflooey, you just go back a step and try again, probably wishing you had taken up model railroading or some other hobby. If both books rely on stylesheets, then you can compare them and bring over anything that is missing from your final one's stylesheet. It is when you don't use stylesheets that you will spend forever fixing each instance of your styling. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Book Concocter
![]() Posts: 59
Karma: 10
Join Date: Jun 2010
Location: China
Device: Sony Reader
|
Mr Mikel, I've been quite successful transferring .xhtml's from an ePub produced with writer2epub to an epub-in-the-making using Sigil.
If you start the Sigil project by opening the writer2epub-produced epub, the stylesheet on which the latter depends is already added and part of the new Sigil project. After that, you simply need to bring all auxiliary files associated with a .xhtml in the writer2epub-produced epub over to the Sigil project, preferably before transferring the xhtml itself. For example, if you want to transfer a .xhtml containing a picture with text nicely wrapped, you have to transfer that picture as well -- to the Images folder of the Sigil project -- making sure the filename remains as it was in the writer2epub-produced epub. Some neat-looking distance between the picture and the wrapped text -- when the project is viewed with an eReader -- is easily "faked" by adding a white border on the one side of the picture, with your picture editor. I've had many pleasant surprizes. The experimental Sigil-project I'm working on looks as if I know some HTML encoding, but its all "fake" - I nab the editing/formatting effects from writer2epub. I'm quite curious what WordPerfect's own epub add-on can add to the bag of tricks afforded by writer2epub. The advantage of doing it like this, is that you can do more before you have passed through the arduous school or learning to encode HTML's -- although you have to do that some time, I know that full well. You can do I few things you know how to do with your word processor, but not yet with Sigil. |
![]() |
![]() |
![]() |
#7 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
Quote:
I see so much of this sort of thing going on when I'm wearing my other hat as a musician. Tracks are recorded in the way that seems "easy", then enormous energy expended on remedial work. There's a preference for using and modifing a pre-recorded "loop" or "beat" rather than playing exactly what is wanted in the first place. They want to make music without learning HOW to make music. START in Sigil. Conversion from page-based layout programs may seem easier, but brings nothing but trouble. |
|
![]() |
![]() |
![]() |
#8 |
Book Concocter
![]() Posts: 59
Karma: 10
Join Date: Jun 2010
Location: China
Device: Sony Reader
|
No doubt you are right, but could you please post (attach) an ePub you have produced encoding html's? I would love to see it.
|
![]() |
![]() |
![]() |
#9 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
Here's a fragment of a directly-created epub. First the xhtml, then the associated style-sheet. It has a header style for chapter headers (which Sigl's TOC-generator will pick up) then just standard book styling - an un-indented first paragraph, no paragraph spacing, and a style for a section break. That's all you need for the average novel.
Compare this code with the sort of mess you get from a "conversion" :-) <?xml version="1.0" encoding="UTF-8" standalone="no" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <title/> <link href="../Styles/Style0001.css" rel="stylesheet" type="text/css"/></head> <body> <h1>Stuff to do</h1> <p>I hope you are both well. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah</p> <p>I wonder if we could make a few changes to the Oaks website. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah</p> <p>Initial page flyer: could you please take off Easter dates at the bottom. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah</p> <p>Replace the prospectus application forms for holidays (<i>Stepping Stones</i> and <i>Activity Centre</i> can have the same) with the ones attached - e.g. no Easter but Summer and Half Term</p> <p class="p1">Thanks Jane</p> </body> </html> <<<<<<<<<<<<<<<and now the stylesheet>>>>>>>>>>>>>>>>>>>>>>>> p { text-indent: 1.4em; margin: 0; } h1 + p { text-indent: 0; } .p1 { margin: 1em 0 0 0; text-indent: 0; } |
![]() |
![]() |
![]() |
#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:
Bravo to you! And how foolish of us! ![]() Hitch |
|
![]() |
![]() |
![]() |
#12 |
Book Concocter
![]() Posts: 59
Karma: 10
Join Date: Jun 2010
Location: China
Device: Sony Reader
|
Thanks, Mr Exaltedwombat, but how do I launch the coded text you sent, using Sigil, so that it becomes a readable ePub? I copied it into the editing window (Codes View) and then saved the ePub file. But this must be wrong because I simply got the same coded text back on my eReader. It would be helpful to me to know how to use your coded text and/or to see the ePub you produce with it yourself.
I now have a fairly "fancy" ePub produced with Sigil, without touching encoded HTML. HTML codes and Codes View I have not studied yet. I used writer2ePub as in-between ePub editor to create certain .xhtml's. The experiment reads well on my Sony eReader. It would be interesting to me to get your analysis of where the problems lurk, the problems that I cannot see on my Sony eReader. However, it seems from the other comments here that submitting such an experimental ePub is not tolerated in this forum. Last edited by ecbritz; 04-28-2013 at 10:51 PM. |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,511
Karma: 78910202
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Here it is
|
![]() |
![]() |
![]() |
#14 |
Book Concocter
![]() Posts: 59
Karma: 10
Join Date: Jun 2010
Location: China
Device: Sony Reader
|
Thanks, I could read the posted epub and see the indented paragraphs. The problem is I don't know precisely what you did in Sigil to get from the coded text copied by exaltedwombat to the epub you saved. I can work all or most of the menu's, tools etc in Sigil, and can use various roundabouts to get the effects I want. But encoding HTML's and applying personally encoded HTML's (or other people's codes) is still beyond me.
|
![]() |
![]() |
![]() |
#15 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,348
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Try this Sigil video tutorial.
And then try HTML/CSS tutorial. Then there are multiple epubs you can look at in the mobile read library. I hope that helps! |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there a way to export .xhtml files from Sigil? | Derek R | Sigil | 13 | 03-28-2013 07:28 AM |
Can I use custom xhtml tags in Sigil? | Doitsu | Sigil | 2 | 09-21-2012 07:51 AM |
When Calibre Goes to Sigil in HTML *and* XHTML | Tulpana | Sigil | 6 | 07-09-2012 10:03 AM |
Sigil 0.3.4 / Problème CSS entre Sigil et iPad | Grivels | Software | 10 | 07-03-2011 09:06 AM |
Importing "big" XHTML files in Sigil | paulpeer | Sigil | 8 | 03-19-2010 05:00 AM |