![]() |
#1 |
Enthusiast
![]() Posts: 34
Karma: 10
Join Date: Mar 2019
Device: epub
|
Merge two html files
Hi all, I find myself with an epub file that once converted from word to epub the h1 titles are placed alone in an html page and the rest of the page with paragraph character is placed in the following html file.
With sigil is it possible to merge the two html files so that the h1 title and text are in the same html file? |
![]() |
![]() |
![]() |
#2 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,887
Karma: 18274621
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
|
In general you can merge files by right-clicking in the book browser on the file(s) to merge and selecting 'merge'. If you only select one html file it will merge with the file directly above it in the book browser.
In your case that wouldn't help very much. I'm assuming each <h1> has a unique title...?? If so, I think you will need to manually copy/paste the <h1> tag from the list to the individual html files. If the <h1>s are a simple list of chapter numbers then you can use the ReworkChapteHeads plugin to add chapter headers to each page. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 34
Karma: 10
Join Date: Mar 2019
Device: epub
|
But by copying h1 and pasting it in the file with the text, then the validator shows a lot of errors, which weren't there before, any ideas to solve the problem?
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 34
Karma: 10
Join Date: Mar 2019
Device: epub
|
I just tried also with the "merge" method as you suggested, and it works fine, but the validator reports errors, which otherwise wouldn't be there, is it possible to avoid this problem?
Thank you. |
![]() |
![]() |
![]() |
#5 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,887
Karma: 18274621
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
|
I can't really give details without seeing an example of the actual code. I don't know what "lots of errors" means...
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,156
Karma: 4567890
Join Date: Nov 2009
Device: many
|
After using file merge from BookBrowser, please post the exact error message from the validator so we know what it is objecting to.
If both html files were valid before merging they generally should be after merging. Perhaps running Mend on the file might help if the errors are structural. Last edited by KevinH; 06-03-2023 at 09:33 AM. |
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() Posts: 34
Karma: 10
Join Date: Mar 2019
Device: epub
|
The OEBPS/Text/untitled-04.html resource was not found in the EPUB container
|
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() Posts: 34
Karma: 10
Join Date: Mar 2019
Device: epub
|
How to use Mend?
|
![]() |
![]() |
![]() |
#9 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,887
Karma: 18274621
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
|
What is the href in your respective link?
What is the full path/filename (hover your mouse over the file in the bookbrowser) that you are trying to point to?? Select "Tools/Reports" and then "Links" on the left side to see if the links are pointing to the correct location. |
![]() |
![]() |
![]() |
#10 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,887
Karma: 18274621
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
|
Right-click in the code view area. Select "Reformat HTML".
How familiar are you with using Sigil?? It may be beneficial to read through the User's Guide. |
![]() |
![]() |
![]() |
#11 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,156
Karma: 4567890
Join Date: Nov 2009
Device: many
|
Quote:
What version of Sigil are you using? As suggested, reading Sigil's User Guide to get down the basics would certainly help. Last edited by KevinH; 06-03-2023 at 09:53 AM. |
|
![]() |
![]() |
![]() |
#12 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,887
Karma: 18274621
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2 & Air/Surface Pro/Kindle PW
|
It will also be helpful to see the actual code that you are using... it should look something like:
<h1><a href="untitled-04.html">Some title text</a></h1> Can you take a snapshot of the page, or copy/paste a section so we can see what the actual problem could be??? All of our suggestions are just shooting in the dark without some actual code. |
![]() |
![]() |
![]() |
#13 |
Enthusiast
![]() Posts: 34
Karma: 10
Join Date: Mar 2019
Device: epub
|
file 04 is gone, it was merged with 5, so now files go from 03 to 05
|
![]() |
![]() |
![]() |
#14 |
Enthusiast
![]() Posts: 34
Karma: 10
Join Date: Mar 2019
Device: epub
|
The validator says the problem is on line 45 of the toc.ncx file
<content src="Text/untitled-04.html#navPoint_4"/> |
![]() |
![]() |
![]() |
#15 |
Enthusiast
![]() Posts: 34
Karma: 10
Join Date: Mar 2019
Device: epub
|
I didn't understand what code I should post, the validator points the problem to the toc.ncx file, and the 04 html file no longer exists.
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
In an epub, how to merge 2 html into a single html | alegriadelarte | Editor | 3 | 03-15-2023 04:32 PM |
Access to local HTML files and content, HTML ebooks, annotation on HTML ebooks | leo315 | enTourage Archive | 2 | 05-10-2010 02:40 PM |
How to merge Mobi files? | King Mook Mook | Kindle Formats | 1 | 12-26-2009 05:07 AM |
PRS-500 HTML merge tool needed | sic | Sony Reader Dev Corner | 14 | 11-07-2007 06:04 PM |
Is there a way to merge lrf files? | Tom Swift | Sony Reader | 14 | 09-24-2007 07:13 PM |