MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   ePub (https://www.mobileread.com/forums/forumdisplay.php?f=179)
-   -   Sigil style and page break (https://www.mobileread.com/forums/showthread.php?t=234201)

antalj 02-18-2014 05:18 PM

Sigil style and page break
 
Hi Guys!

I have just formatted my forst epub in Sigil, it is a great program I can say :)
1. I have a couple of things I dont get, where can I check the default style sheet (if I do not add a new one to styles) and modify it?
2. where could I get a full style css with all of the parameters which are necessary for a html section?
3. how could I insert page breaks inside chapters?


Thx
Cheers

Doitsu 02-19-2014 01:23 AM

Quote:

Originally Posted by antalj (Post 2767487)
1. [...] where can I check the default style sheet (if I do not add a new one to styles) and modify it?

There is no default stylesheet. You'll have to add one yourself to the Styles folder and link it to the .html file(s).

Quote:

Originally Posted by antalj (Post 2767487)
2. where could I get a full style css with all of the parameters which are necessary for a html section?

You can take it from any book whose layout you like. Just extract the stylesheet, add it to Sigil and link it to the .html file(s). (You'll also need to add class attributes to the elements that you want to apply the style to.)

Quote:

Originally Posted by antalj (Post 2767487)
3. how could I insert page breaks inside chapters?

Since ebooks are dynamically displayed page breaks are usually not required. However, you can force page breaks by assigning a style that contains the page-break-before or page-break-after properties.

Toxaris 02-19-2014 03:39 AM

Quote:

Originally Posted by antalj (Post 2767487)
3. how could I insert page breaks inside chapters?

The general consensus is that it would be better to have each chapter as a seperate XHTML file. You can easily split a file in Sigil.
Each XHTML file will start on a new page while reading and makes editing a lot easier. Also, older readers have a XHTML filesize limit of around 285k. Above that number the file will not load.

Tex2002ans 02-19-2014 05:34 AM

Quote:

Originally Posted by Toxaris (Post 2767757)
The general consensus is that it would be better to have each chapter as a seperate XHTML file. You can easily split a file in Sigil.

Here is the Sigil Manual on how to split a file:

http://web.sigil.googlecode.com/git/...d_merging.html

faltradl 02-19-2014 07:08 AM

Quote:

Originally Posted by antalj (Post 2767487)
3. how could I insert page breaks inside chapters

Why inside a chapter?

You must forget the most things about paper printed texts. Ebooks are dynamik. You don't know the size of the chosen font, and not the sitze of the display. So you don't know how the text looks in the realitiy. (Your personal reader with the current configuration is not the whole world.)

Obligatory page brakes between paragraphs are in ebooks a no go.

(Wo don't speak about page breaks between chapters.)

mrmikel 02-19-2014 07:22 AM

If you must have fixed layout and exact page breaks, then epubs are not for you. You need a different format.

antalj 02-19-2014 07:27 AM

Thx guys, I will do css thing


The pages break is needed cause e.g. usually at the beggining of the book there is the title, several data like isbn etc, introduction, couple of recommendations from differetnt people and things like that.
I want to have this on different pages, currently they are just one after the other and this way the first couple of sides are a bit "crowded". Or shall I place these things also in different files?

Toxaris 02-19-2014 07:38 AM

I usually put that in different files, just be consistent.

faltradl 02-19-2014 12:54 PM

Quote:

Originally Posted by antalj (Post 2767833)
The pages break is needed cause e.g. usually at the beggining of the book there is the title, several data like isbn etc, introduction, couple of recommendations from differetnt people and things like that.

Ah, that's nothing with paragraphs and chapters, we thought of.

This special pages (cover, titlepage etc.) at the beginning of a book are standard. It's the same as in printed books. And yes, most ebooks use extra files for them. It's easyer to handle, when you seperate the metainformations and the text part.

Hint:
Take an ebook you realy like (the layout) an open it with the editor. So you can see how it works.

antalj 02-19-2014 03:35 PM

Actually currently I do not understand something again.
I have the ebook's style like this for every html page:
Quote:

<p style="text-align: center; font-family: 'Times New Roman', serif; margin: 0pt; text-indent: 0pt; line-height: 12pt;"><br /></p>

<p style="font-family: 'Times New Roman', serif; margin: 0pt; text-indent: 0pt; padding-left: 31pt; text-align: center;">ISBN 978 963 254 413 7</p>

<p style="font-family: 'Times New Roman', serif; margin: 0pt; text-indent: 0pt; padding-top: 2pt; padding-left: 120pt;">Méltatások <i>A Megmentőről</i></p>

<p style="font-family: 'Times New Roman', serif; margin: 0pt; text-indent: 0pt; line-height: 12pt;"><br /></p>

<p style="font-family: 'Times New Roman', serif; margin: 0pt; padding-left: 5pt; text-indent: 14pt; text-align: justify;">„Frei Tamás klasszikus bestsellert írt. ahogy az a nagy könyvben meg van írva. A részben valós, részben fiktív tényeket és személyeket Frei úgy gyúrja össze, hogy az európai olajpolitikában kevésbé jártas olvasó abszolút valószerűnek gondolhatja a regény konspirációit.”</p>

<p class="s4" style="font-family: 'Times New Roman', serif; font-style: italic; margin: 0pt; text-indent: 0pt; padding-left: 195pt;">Varga Betti, [origo] Kötve-fűzve</p>

Is this okay or is it better if I have a style sheet? Cause this was it is really not needed.

mrmikel 02-19-2014 04:37 PM

There is nothing wrong with doing it that way, but it is easier to look at and type if you make a class in your stylesheet something like

.parastyle {font-family: 'Times New Roman', serif; font-style: italic; margin: 0pt; text-indent: 0pt; padding-left: 195pt;"}

and call up with <p class="parastyle">

If this is what you do for every paragraph, you can redefine paragraph in the stylesheet and then you just need <p>.

If this is for your private use, then specifying Times New Roman is fine. If it is not just for you, then Times New Roman is a proprietary font for which you could pay a lot of money to use, and which is not found on every e-reader.

antalj 02-19-2014 04:47 PM

ah thx for the additional times new roman info :)


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

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