MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Questions from a Newb (https://www.mobileread.com/forums/showthread.php?t=59954)

MerLock 10-21-2009 12:50 AM

Questions from a Newb
 
I was a bit intimidated to use Sigil since I know next to nothing about HTML coding but I love it so far.

I have a few questions that hopefully someone can walk me through. Since I'm new to this, I think there are only three things that I would want to be able to do. Perhaps they are more complicated then I think but here are my questions.

Q1: Is there anyway of removing lines between paragraphs or is this some sort of standard?

<Never mind. I was copying and pasting from a word document and replacing the paragraph marks with manual page breaks fixed this>

Q2: I'm also trying to make a table of contents. The text in the book is

Chapter 1
Blah

I got a TOC working and displaying this in adobe digital editions it shows Chapter 1 with a + sign. Once I click on the + sign it then displays the word blah. Is there anyway to make the actual Table of Contents show "Chapter 1: Blah" instead of splitting the 2nd line into a "sublink"?

<Never mind as well. Decided to choose the same heading for both the "Chapter 1" and "Blah" fixed this. I initially wanted "Chapter 1" and "Blah" to be different font sizes but I guess it can be coded in. Just got to figure out how>

Q3: How do you add margins to the text?

Many thanks and great program.

Valloric 10-21-2009 09:00 AM

Quote:

Originally Posted by MerLock (Post 632043)
I initially wanted "Chapter 1" and "Blah" to be different font sizes but I guess it can be coded in. Just got to figure out how

You can easily do this. Switch to Code View, then find your heading. Change this:
Code:

<h1>Chapter 1: Blah</h1>
to this:

Code:

<h1>Chapter 1: <span style="font-size: 150%">Blah</span></h1>
I'm assuming you'r using H1 for your heading, but it works just as well with any other heading level (or any other tag for that matter). The <span> will change the size of the text inside it. Feel free to use a different percentage.

BTW Sigil will move that inline style property to a proper CSS class when you change views. I'm writing it inline here for the sake of brevity.

Quote:

Originally Posted by MerLock (Post 632043)
Q3: How do you add margins to the text?

Add this to the CSS code (the yellow color text in the Code View). The values are of course completely arbitrary:

Code:

body {
  margin-left: 2em;
  margin-right: 2em;
}

That will give you left and right margins. Look here for more details on CSS margins. Feel free to explore other CSS resources. CSS in general is pretty simple and straightforward.

DaleDe 10-21-2009 02:04 PM

Quote:

Originally Posted by Valloric (Post 632325)
You can easily do this. Switch to Code View, then find your heading. Change this:
Code:

<h1>Chapter 1: Blah</h1>
to this:

Code:

<h1>Chapter 1: <span style="font-size: 150%">Blah</span></h1>
I'm assuming you'r using H1 for your heading, but it works just as well with any other heading level (or any other tag for that matter). The <span> will change the size of the text inside it. Feel free to use a different percentage.

And if you want

chapter 1
Blah

as in your original example you can use the <br> tag to split the line. Since it is not a new paragraph Sigil will assemble it into one line in the TOC even though it is two in the document.

Dale

MerLock 10-21-2009 11:18 PM

Thanks so much. I'll give those a try right now.

I really love the program and was initially scared about it since there were so many warnings about bugs/kinks along with my unfamiliarity with HTML. However, I'm finding it to be really stable so far and intuitive to navigate through.

Just one more question regarding the spacing between paragraphs. Since I'm mostly copying and pasting from word documents, it's been introducing a lot of lines showing up in between paragraphs by default. I think calibre has an option to automatically remove those lines during conversion. Does Sigil have anything like that or planned for in the future?

Thanks again for the help and thanks Valloric for taking the time to design such a helpful and wonderful program.

Valloric 10-22-2009 09:14 AM

Quote:

Originally Posted by MerLock (Post 633353)
Since I'm mostly copying and pasting from word documents...

Don't copy/paste. Export to (filtered) HTML from Word, then import that HTML into Sigil. When you import, a lot of transformations are made on the input so it loads correctly. Pasting overrides that and is mostly a bad idea.

Quote:

Originally Posted by MerLock (Post 633353)
... it's been introducing a lot of lines showing up in between paragraphs by default. I think calibre has an option to automatically remove those lines during conversion. Does Sigil have anything like that or planned for in the future?

What do you mean by "those lines"? Do you mean the vertical white space between paragraphs? That's controlled by CSS. You could add this to the bottom of the CSS and see if that will fix it for you:

Code:

p {margin: 0; padding: 0;}

MerLock 10-22-2009 12:28 PM

When I copy and paste from a word document into Sigil, I get these blank lines between paragraphs. The only way I've found to remove them was to go back to the word document and change the special paragraph marks and make them into manual line breaks and then copy that over to Sigil.

So after and copying into Sigil, I see the following:
<Indent>Paragraph1
<Blank Line>
<Indent>Paragraph2
<Blank Line> ......

while in the actual word document it's
<Indent>Paragraph1
<Indent>Paragraph2



I'll first try to use your suggestion of exporting it to filtered HTML from word and see if that solves the problem.

If that doesn't work, I'll try your other suggestion of inserting "p {margin: 0; padding: 0;}" into the bottom of the css.

MerLock 02-03-2010 11:41 AM

<indent>I'm still loving Sigil but I recently encountered a few weird occurances. I recently opened an epub book with Sigil in the hopes of just editing the Meta data. After resaving the ebook, the ebook looses paragraph indents.
<indent>Could the problem be with that the original epub was not formatted correctly?

For example, the above paragraphs would display as:

I'm still loving Sigil but I recently encountered a few weird occurances. I recently opened an epub book with Sigil in the hopes of just editing the Meta data. After resaving the ebook, the ebook looses paragraph indents.
Could the problem be with that the original epub was not formatted correctly?

Again, the only thing I changed was use the meta editor to change the meta data before resaving.


I encounted an unrelated problem with another epub. The original epub has a TOC but after doing the samething as above, changing the metadata and resaving, the TOC no longer exists. Could this again be caused by an incorrectly formatted epub to begin with?

I'm sort of scared now to open an epub file and resaving since I'm unsure what changes resaving will do.

Valloric 02-03-2010 01:10 PM

Quote:

Originally Posted by MerLock (Post 771121)
I recently opened an epub book with Sigil in the hopes of just editing the Meta data. After resaving the ebook, the ebook looses paragraph indents.

The book probably had some flow-specific CSS. This is currently removed, but will be preserved from 0.2.0 onwards.

Quote:

Originally Posted by MerLock (Post 771121)
I encounted an unrelated problem with another epub. The original epub has a TOC but after doing the samething as above, changing the metadata and resaving, the TOC no longer exists.

Sigil rebuilds the TOC after the book is loaded. The original NCX file is not preserved, and currently can't be for technical reasons. I don't think it's possible to preserve the original NCX and still have an intuitive TOC Editor, since the NCX deals with XHTML filenames and fragment identifiers. A TOC editor that would preserve the whole expressiveness of the syntax would require from the user advanced knowledge of the NCX specification, URL's, identifiers and XML.

It's precisely why I've gone with the standard practice of a TOC that follows the heading elements in the OPS docs. It's simple, user-friendly, easily understandable and I dare say intuitive.

But it does require that the original TOC be discarded. In the vast majority of the cases, this is not a problem since the original TOC usually follows the headings as well.

I plan on giving this matter more thought after 0.2.0 (but much later, there are more pressing matters). Maybe I can come up with something better, but I just don't see it now.

MerLock 02-03-2010 01:33 PM

Thanks again for the great explanation and for the continued development of a great program.

theducks 02-03-2010 01:47 PM

Quote:

Originally Posted by Valloric (Post 771268)
I don't think it's possible to preserve the original NCX and still have an intuitive TOC Editor, since the NCX deals with XHTML filenames and fragment identifiers.

:wall: Intuitive?
All I see is tick boxes (Win XP or Ubuntu) next to the TOC names.
No controls. No ability to edit of those names.
What am I missing here.. :blink:

I would love to be able to mark some text or Location: "Make a TOC entry"
And be able to drag/arrow it to its proper location in the list, even indent/outdent.

Sigil is pretty cool, I just want more :p
:thanks:

Valloric 02-03-2010 02:34 PM

Quote:

Originally Posted by theducks (Post 771349)
:wall: Intuitive?
All I see is tick boxes (Win XP or Ubuntu) next to the TOC names.
No controls.

For what it does, controls are unnecessary. The check boxes let you include/exclude an item from the TOC. The item text is editable.

You cannot reorder the items since they depend on the positions in your document. Open Word 2007 (or Open Office Writer for that matter) and try to reorder the items in the generated TOC: you can't, since the TOC depends on the headings you used in the document.

If you could reorder them, then how should the headings change position? Or the text below them?

Quote:

Originally Posted by theducks (Post 771349)
No ability to edit of those names.
What am I missing here.. :blink:

Have you tried double-clicking the text field? Or pressing F2? These are standard GUI conventions. I'm not inventing anything new here.

Quote:

Originally Posted by theducks (Post 771349)
I would love to be able to mark some text or Location: "Make a TOC entry"

Use a heading. It will automatically appear in the TOC. This is standard practice: see Word or OO Writer.

Quote:

Originally Posted by theducks (Post 771349)
And be able to drag/arrow it to its proper location in the list, even indent/outdent.

See first response about reordering.

theducks 02-03-2010 02:48 PM

I must be doing something really wrong :/ , will try (double click) again.

:bulb2: Had existing headings present. I was trying to make them into TOC entries. I will try to remake the existing heading.
:thanks:

theducks 02-03-2010 05:27 PM

:) I got adding TOC entries working on Windows (it is snail slow on a P4 with loads of RAM).

MerLock 02-03-2010 08:02 PM

Quote:

Originally Posted by Valloric (Post 771268)
It's precisely why I've gone with the standard practice of a TOC that follows the heading elements in the OPS docs. It's simple, user-friendly, easily understandable and I dare say intuitive.

But it does require that the original TOC be discarded. In the vast majority of the cases, this is not a problem since the original TOC usually follows the headings as well.

Could there be a possibility to let the user decide to either preserve the original TOC or not? For example, the ability to retain the original TOC if all I do is insert a new cover image or edit the meta data.

MerLock 02-03-2010 08:03 PM

Quote:

Originally Posted by theducks (Post 771678)
:) I got adding TOC entries working on Windows (it is snail slow on a P4 with loads of RAM).

Same here. I forgot what version of Sigil it was, but after one version, the program started running really slow. I heard that things will improve in 0.2.0, which should be out in a couple of weeks.


All times are GMT -4. The time now is 06:36 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.