Quantcast
Channel: MobileRead Forums - Sigil
Viewing all 3435 articles
Browse latest View live

FlightCrew validation error

$
0
0
Hello. I am a newbie, so please be patient with me. After validating my book, I receive the following 2 messages (among many others):
1. Warning OPF resource in manifest not reachable : This resource is present in the OPF <manifest>, but it's not reachable (it's unused). near column
2. Error OPF reachable resource not in manifest : This resource is reachable but not present in the OPF <manifest>. "Reachable" means that a reference of some kind that points to this resource exists in the epub. near column
Both of these are pointing to my css file. One points to the file location within Sigil, the other lists a path to Sigil's Temp Storage.
Any help would be appreciated.
Steve

Just lost a whole day's work with a Sigil crash

$
0
0
I've been formatting a novel all day. Saving regularly. Then I entered some code into a blank html page in Code View, forgetting to have the xml Doctype stuff up top. I got a message in the preview that something was wrong. I tried to X out but the screen was frozen. Then Sigil crashed. A window came up and I chose "Relaunch." But I got a window that said my file couldn't be found.

So I waited and started Sigil on its own and opened the file, but none of the work I'd done all day was there. I thought I'd opened the wrong file but it was the right one.

As freakiness would have it this was the one time I was saving the file in only one place. <shaking head>

I just tested the selfsame file to see if it is saving changes and it is.

Anybody know what might've happened? How this was even possible? (I must have saved it fifty times.)

Are there any Sigil Regex commands just for writers?

$
0
0
I was looking at the User's Manual today as I formatted my novel and saw the Regex links. I clicked on the 'Cheatesheet' link and couldln't even get the most simple searches to work. Then I clicked on the Mobilread 'examples' link and those are way more sophisticated than I need.

Yes, I could really learn Regex but I'm just a writer and don't need more than the most basic sort of stuff. So if somebody's got a 'cheatsheet' or a link with Sigil Regex commands that would help somebody like me I'd really appreciate it.

What I'm looking for is missing punctuation, redundant punctuation. Anything that will help clear up a novel. Thanks.

Seeking advice on avoiding style cruft

$
0
0
Hey, I've defined a stylesheet that I really like and want to use in my books. I want to use it pretty much for everything.

However, I've noticed that as I work on files in Book View, Sigil tends to add its own styles to my text. At best, this results in things like font-size attributes being added to <p> tags. Sometimes it adds spurious <span>s, looking like: <span style="font-size: 16px; line-height: 1.5em;">

These attributes generally match the ones in my stylesheet, so there's no problem in terms of display usually. But I don't want it to add them, it increases file size and makes it harder to work with the code! And sometimes it uses a <div> instead of a <p>, and I'd really like it not to do that.

What am I doing wrong? Is there some setting I can use to get it to use the simplest code possible? I scanned through the FAQ in the Sigil user guide and the first couple of pages of topics here in the forum and didn't see anything that applies to the issue, so my apologizes if this is something that's been covered before that everyone knows the answer to.

Change size of toolbar

$
0
0
Is it possible to change the size of the Clips toolbar?

It seems to be fixed at some arbitrary length and I would like it to be the width of the window.

PapaKilo

[Plugin] Backup

$
0
0
Backup: saves an epub snapshot

Current Version: "0.1"

This plugin allows you to save an epub snapshot to a folder of your choice. (The plugin will use the book title and a timestamp as the file name.)

System requirements

If you're using an older Sigil version, you'll need to install a Python 3.4.x interpreter (the plugin won't work with Python 2.7.x) and select its path in the Manage Plugins dialog box. You also might need to install beautifulsoup4 and lxml. macOS users also might need to install ActiveTCL.

Installation

1. Select Manage Plugins from the Plugins menu. In the Manage Plugins dialog box, select Use Bundled Python, if it isn't already selected. (If your Sigil version doesn't have a Use Bundled Python option, click the Python 3.4 button to detect the path or Set to manually select the Python interpreter path.)
2. Click Add Plugin and select Backup_v0.1.zip. This will install the plugin, which you can select via Plugins > Output > Backup.

Usage

When you run the plugin for the first time, it'll ask you to select a backup folder, which'll be used for all subsequent backups. (To select a different folder, simply rename or delete the current backup folder and re-run the plugin. Advanced users can also simply delete/update Backup.json.)
If you find yourself using this plugin a lot, you might want to assign it to one of the 3 Plugin toolbar buttons (Plugins > Manage Plugins > Assign as Plugin1/2/3) and/or assign it a keyboard shortcut (Edit > Preferences > Keyboard Shortcuts > Run Plugin 1/2/3).

BTW, the Sigil plugin framework function that the plugin uses to create a copy of the epub won't generate a 1:1 copy, because it regenerates the .opf file. I.e., the .opf file will contain exactly the same information, but the manifest entries might be in a different order.

Disclaimer
I'm not a programmer and I won't be liable for any loss of data. Make sure to also save your ebook in regular intervals using the Save/Save as/Save a copy menu options.

Attached Files
File Type: zip Backup_v0.1.zip (1.8 KB)

Sigil Crashes when creating HTML ToC

$
0
0
I'm running Sigil 0.9.8 to format an epub 3.0 file that was created in InDesign CC. I've done this a dozen times, but this one book keeps crashing. I've got everything thing done, all the formatting, the TOC generated, but when I go to create the HTML table of contents, one of two things happens. Either the HTML TOC overwrites the entire file, so that I only have the TOC but no content, or Sigil just crashes. This has happened over a dozen times now.

Any clues as to what might be the problem?

container.xml problems

$
0
0
NOTE: This issue has been solved.

I don't know how the container.xml error popped up in the first place, but when I was first trying to fix the problem, I created a file named container.xml or container.xhmtl in the Text files folder, which I later forgot about. I simply created a new epub and imported all my files EXCEPT that one. I no longer get an error message and, even better, there's no longer a container.xml file anywhere in my epub. ;)

* * * * *

One of my epubs got zapped somehow. It no longer displayed a cover image, and I couldn't open it in iBooks. I traced the problem to a file I never even knew existed - container.xml.

I thought I had fixed it by simply creating a new container.xml file, but that just created a new problem(s).

So I created a brand new epub and imported my text files, style sheets and images from the original.

When I validate it, I got a warning that container.xml should have the extension .xhtml. I changed it to .xhtml, but that only spawned a new error. From the pages I've Googled, it looks like it's supposed to have the extension .xml, so I changed it back.

I now get a warning that container.xml should be container.xhtml, followed by the following error:

Error Code RSC-005:

Error while parsing file 'element "container" not allowed here; expected the element end-tag, text or element "ns1:switch"... (etc., etc.)

The error is on line 8, which is the second line below...

<meta name="Sigil version" content="0.9.8" />
<meta name="cover" content="cover.jpg" />
<meta property="dcterms:modified">2017-06-10T17:40:25Z</meta>

I noticed that the third line listed above ends with...

</meta>

...while the other two lines end with...

/>

So I fiddled with that but didn't fix anything.

Does anyone know what the solution is?

I'm also still trying to figure out why container.xml even exists in this project. There's no file named container.xml in my working epubs. When I create a new epub, the folder Misc is empty. So where did container.xml come from?

Is there a way to simply get rid of it? Deleting it only causes problems, but maybe there's some associated code in another file I need to delete.

Googling for "RSC-005" turned up some discussions that suggest...well, they're hard to understand. There are some suggestions that the problem is with Pagina epub checker; in other words, it may not be a valid error at all. But that still doesn't explain why container.xml even exists. Other references offer fixes for specific problems.

I'm confused!

Adding spaces after images and between paragraphs

$
0
0
Hi all,

Sorry if this has already been asked and answered; I wasn't able to find it!

I am trying to add spaces after images and between paragraphs. I have tried to add manually in epub view, but it doesn't translate when opening anywhere other than Sigil. I have also tried adding it in the code view, knowing theoretically that it should be:

<p><br/></p>

but when I open the .epub anywhere else (reader, ADE) the spaces using that <p><br/></p> do not show up (i.e. the text is still directly below whatever I was trying to add space between). They do show up when I just use <br/>, but then of course it fails validation...and the spaces are removed again then I add the required <p></p>. I can't remember having this problem before!

:help:

"unused stylesheet class" is actually used

$
0
0
In this ePub I used this pair of style definitions:

Code:

.letter, .letter1 {
    display: block;
    margin-bottom: 0;
    margin-left: 2em;
    margin-right: 1em;
    margin-top: 0em;
    text-align: left;
    text-indent: 2em;
    }

 .letter1 {
    margin-top: 2em;
    text-indent: 0;
    }

And in the pages used them:

Code:

<p class="letter1">Dear Mr. Wells,</p>

  <p class="letter">Your attendance is requested in an investigation
of grave importance to the Royal Family of the Nederlands. Please
consult S. Holmes posthaste regarding your willingness to participate.</p>

  <p class="letter">Sec. to H.M. Emma of Waldeck-Pyrmont</p>


The idea being to have the first line of a letter with a top margin and no indent, otherwise the same as the "body" of the letter.

This looked as expected and validated with epubcheck.
But running Sigil's "Delete Unused Stylesheet Classes" and it includes "letter1" as unused.

Is this a bug in that function, or is this kind of CSS invalid?

Sigil does What!?!?

$
0
0
OMG - I was working on a book and was thinking how nice it would be to have the "Saved Searches" as a dock-able window...how cool would it be to have it readily available. Then my finger slipped on the mouse and hit the right mouse button...it just so happened the mouse was in the search field...and up popped a list of all of my saved searches to easily choose from!!!

It has probably been there this whole time and I just never noticed it. But it is pretty fun when you find new things that Sigil does to make life easier.

I wanted to post this to let the Sigil developers know how much I appreciate the hard work they do - and the great program they've provided that I use almost every day!

:thanks:

Help with Chapter seperators (lines underneath chapter headings)

$
0
0
Hi,

I can't figure out how to create bold lines beneath chapter headings.

I've spotted many kindlebooks that make use of these, but I have no idea how they do it!

I am able to use a simple underscore and run it along the page, but even when this is (h1 size) it doesn't look that bold.

I've spotted books that use fancy lines too. If anyone can help me with this, it would be much appreciated. Thanks! :help:

Sarah.

content.opf, toc.ncx

$
0
0
I am making a "sandbox" template from my most recent epub. If I simply delete the content.opf and toc.ncx, will Sigil re-create them as I generate the new TOC?

Page Up and Page Down fail in Book View

$
0
0
I'm using Sigil 0.9.8 on OS X 10.11.6. When I'm in Code View, the Page Up and Page Down keys work perfectly. Not so in Book View. Page Up jumps to the top of the page, just like pressing Home. Page Down also jumps to the top of the page.

Here's the weirder part. I created mouse click macros using QuicKeys 4. The macros click the top or bottom of the scroll bar and are triggered by pressing Page Up and Page Down. These macro mouse clicks exactly emulate how Page Up and Page Down should work. Weirder still, I created identical macros in Keyboard Maestro, and they didn't work.

Is my problem unique, or do others have problems with Page Up an Down?

Recreating Container.xhtml

$
0
0
Not long ago, I started a thread to discuss my Container.xml file, which had mysteriously vanished. I fixed the problem by creating a new epub and importing all the files from the damaged epub into it.

I then found a second thread discussing the same problem @
https://www.mobileread.com/forums/sh...d.php?t=225261

My understanding is that Sigil automatically recreates the file when you open it.

Well, the same thing just happened - my file Container.xml just vanished. I closed the epub and reopened it, but it's still missing. I then shut down Sigil and reopened it. But my images still don't display, and when I validate my epub in Epub-Checker, I get the error message "ERROR RSC-001 Geobop3.0.epub File 'META-INF/container.xml' could not be found."

So is there some way to manually create this file? Actually, the first problem is finding it; it's apparently invisible.

This reminds me of another problem I've had - vanishing images. I fixed that by backing up all my images. So if the images in an ePub disappear, I just reimport them from my backup folder.

But I don't know how to recreate Container.xml. Any ideas?

Thanks.

'Nuther N00Bie Question

$
0
0
I have a question regarding a test epub I created. I was interested in using embedded fonts, and found I could catch all the fish in the Atlantic Ocean with the can of worms that I opened.

First off, I declared the font as such:

@font-face {
font-family: "jour-nal";
font-style: normal;
src: url(../Fonts/blahblahblah.ttf);
}
.journal {
font-family: jour-nal;
font-size: .95em;
}

Then I used the "journal" class in a <div>, and all seemed to be okay--at least in Sigil and Gitden Reader, and also (somewhat) in Calibre. It also verified fine in both FlightCrew as well as EpubCheck.

Now, Calibre didn't like me giving the font-family a name other than the name embedded in the font, and offered to change it; but it wanted to use the same name for the embedded bold font as well as the italic version. So anyway, after checking with W3Cschools, whose example of an embedded font clearly illustrates a font-family name different from the embedded font, I left it alone for now.

Calibre also had a different opinion about the nomenclature in the OPF file, saying,

"The file OEBPS/Fonts/blahblahblah.ttf has its mimetype specified as application/x-font-ttf in the OPF file. The recommended mimetype for files with the extension "ttf" is application/x-font-truetype. You should change either the file extension or the mimetype in the OPF.

Change the mimetype for this file in the OPF to application/x-font-truetype"


So if I make the change, then re-run FlightCrew on the modified file, it says just the opposite:

The element's "media-type" attribute has value of "application/x-font-truetype" but the file's media type is "application/x-font-ttf"

Difference of opinion, or fatal error?

Then, I decided to go out to W3C and ask their opinion. Whoop-whoop-whoop! Danger Will Robinson! "Property font-family doesn't exist in CSS level 2.1 but exists in [css1, css2, css3]".

So I ran the verification check in W3C using the direct upload method from their main webpage--and life came back as rainbows and unicorns. Of course, that validated at CSS level 3, whereas running the check from within Sigil checked it at CSS level 2.1.

Should I just take my bat and ball and go home, never ever again attempting to create a book with any tool more sophisticated than a quill pen?

Toldja it was a N00B question. Thanks for your input, and please be gentle.

Sigil not saving media as part of EPUB

$
0
0
I have an HTML file in one folder, incorporating media files which are in another folder.

When I open the HTML file with Sigil (or Firefox), everything works fine and the files (audio or images) show up where and as expected. However, when I save the file as an EPUB (or EPUB3), the resulting EPUB seems to include only the HTML part, and doesn't incorporate the media files. I can reopen it correctly in Sigil, but if I want to use a copy of the EPUB in, for example, my Android tablet, the media files are, obviously, missing.

There must be a simple solution to this, but my searches came up with nothing.

Thanks.

[Plugin] FootnoteLinker Sigil plugin

$
0
0
Updated: July 1, 2017
Current Version: "0.2.0"

This very simple plugin will automatically generate links to endnotes and backlinks to footnote anchors.
By default, it'll look for footnote anchors with a noteanchor class attribute (e.g. <sup class="noteanchor">1</sup>) and endnote defintions with a note class attribute (e.g. <p class="note">1. Footnote definition...</p>).
You'll also need to right-click the endnotes file and select Add Semantics... > Notes/Footnotes. (For an example, see the test file.)

Please make sure to make a backup copy before running this plugin!


Credits: roger64 for beta testing and feedback.

Installation:

1. Select Manage Plugins from the Plugins menu and select Use Bundled Python, if it isn't already selected.
2. Click Add Plugin and select FootnoteLinker_v0.2.0.zip. This will install the FootnoteLinker plugin, which you can select via Plugins > Edit > FootnoteLinker.

Attached Files
File Type: epub FNLTest.epub (2.7 KB)
File Type: zip FootnoteLinker_v0.2.0.zip (5.6 KB)

[Plugin] CustomCleanerPlus

$
0
0
CustomCleanerPlus: A custom cleanup utility for both epubs and imported html docs.

Requirements
Plugin Type: Edit
Minimum Sigil requirement: v0.9.3 or higher
Python Requirements: Python 3.4+ (Bundled or External)
OS Requirements: Windows 7, 8, 10 or Linux
*** Tested on Windows 7, 8 & 10 and Ubuntu ***
*** Untested on OSX ***
Current Version: "0.1.1"

Installation
* Select Manage Plugins from the Plugins menu. In the dialog box, select either the Bundled Python or the External Python(Python 3.4+ should be installed on your computer to run this plugin externally).
* Click Add Plugin and select CustomCleanerPlus_vXXX.zip. This will load and install the plugin into Sigil, which you can then select and run using Plugins > Edit > CustomCleanerPlus

Description
This plugin cleaner is an edit plugin that can be used to clean-up both epubs and imported html docs. It also transforms html code to help ensure proper xhtml compliance to epub 2 format.

For epubs, this plugin cleaner is best used after using an epub converter to remove any dross or non-compliant proprietary data still remaining in the epub html and stylesheet.

For those folks who prefer crafting their epubs from an html doc imported into Sigil as their start point, this plugin should also prove useful. You should use html documents with this plugin that are only derived from the following doctypes: Word doc and docx(html filtered only), ODT(OO and LO docs only), GoogleDoc(as html, zipped) and AbiWord.

To load an html doc into Sigil, first open Sigil and go to Edit > Tools > Preferences > General Settings > Mend XHTML Source Code On: and set this to Open and then save it(you only have to do this once). Now you can load the html file in the normal way using File > Open(ensure File Types is set to html).

Features

Automatic Tasks(applied to both epubs and imported html docs)
-- Thoroughly cleans out and reformats all html files
-- Removes or changes all unneeded or non-compliant proprietary data in the html
-- Trims the epub stylesheet(s) - removes any unneeded or redundant class properties from the css
-- Ensures that all ebook image formatting is epub 2 compliant
-- Adds CSS globals and presets both for compliance and to help avoid KDP Look Inside issues
-- Removes all hard line breaks(blank lines) caused by the enter key
-- Removes all html tags that are empty or that contain just spaces
-- Removes all tabs

Cleanup Options(via dialog):
-- Convert all <i>, <b>, <em>, <u>, <s> and <strong> tags to span tag styling
-- Convert all ebook text and headings to default serif throughout
-- Reformat ebook images using percentage screen values to help normalize smaller image sizes across all ereaders.
-- Remove all internet link formatting
-- Remove all internal link formatting (will not remove Sigil-generated TOC link formatting in epubs)
-- Remove all bookmarks
-- Remove all <div> tags

Plugin Run
First load your epub or html doc into Sigil and then just run this plugin. For epubs also ensure, before you run this plugin, that your epub is fully formed and contains the appropriate ebook cover, html files, xml files, stylesheet(s), images etc. After running the plugin it would also perhaps be advisable to run several passes of Sigil's Tool > Delete Unused Stylesheet Classes to mop up any empty or unused classes in your epub's stylesheet(s) after the clean up.

Caveats
Don't use SVG wrappers for ebook images in your epub with this plugin because it will cause problems. Unfortunately, due to a quirk with the Tidy module, these SVG problems can't be resolved. Also avoid using fake smallcaps in you doc headings as this can cause nested <font> tag problems. Best to add the fake smallcaps to your epub styling in Sigil after running this plugin. You will normally get best results by using only paragraph style formatting for all text, headers and spacing in your doc. Do not use tables or captions in your html doc with this plugin.

Changes

Spoiler:

v0.1.1
-- Added checks to ensure epub 2.0 only documents are used with this plugin. My thanks to DiapDealer & Doitsu.

v0.1.0
-- Initial release

Attached Files
File Type: zip CustomCleanerPlus_v011.zip (965.1 KB)

Collapse and expand code in Sigil

$
0
0
Hi Everyone
How to Collapse and expand code in Sigil
:help:
Viewing all 3435 articles
Browse latest View live


Latest Images