Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-23-2010, 12:35 AM   #1
droople
Connoisseur
droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.
 
droople's Avatar
 
Posts: 95
Karma: 388
Join Date: Jan 2010
Device: Nook,Nook Simple Touch, Nook Color
Question The ability to edit epub file from other software

Hi

I got some epub files made from Calibre. The format is not very nice, so I decide to modify them in Sigil.

I found that the format made by Calibre is too hard to be changed. I even can't change the title to align left. And I can't change the title to different font size.

Any suggestions?

Thanks in advance.
droople is offline   Reply With Quote
Old 09-23-2010, 10:23 AM   #2
schlonz
Enthusiast
schlonz began at the beginning.
 
schlonz's Avatar
 
Posts: 25
Karma: 10
Join Date: Jul 2010
Device: PSR-300
Hi

Quote:
Originally Posted by droople View Post
Hi

I found that the format made by Calibre is too hard to be changed. I even can't change the title to align left. And I can't change the title to different font size.

Any suggestions?

Thanks in advance.
Hmm, do you know that all the definitions in the epub files are stored in the Stylesheet file?
So if you want to change i.e. the font size, you only have to look in the HTML File which class you have to modify in the css file.

If you have in the HTML file f.e.

Code:
<p class="calibre3">HEADING</p>
go to the css file and search for the appropriate entry

Code:
calibre3 {
font-size: 1em;
text-indent: 0;
margin-bottom: 0.5 em;
}
and there you can change allmost everthing.

ru
schlonz is offline   Reply With Quote
Old 09-23-2010, 11:09 AM   #3
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,245
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by droople View Post
Hi

I got some epub files made from Calibre. The format is not very nice, so I decide to modify them in Sigil.

I found that the format made by Calibre is too hard to be changed. I even can't change the title to align left. And I can't change the title to different font size.

Any suggestions?

Thanks in advance.
Too hard!
Or not as simple as "PHD"?

Calibre is files are mostly "Converted files".
The GIGO rule applies.


As to "Left Aligning the heading ", Very simple way, IMHO messy as it puts A style into every file (and they don't always have the same SGC#).

Locate the Heading,
Click somewhere ON it ( If it is existing and a recognized H#, the the Heading styler tool will change to the current setting. )
( do not select the text. Sigil 2.4 seems fussy on the order you perform some steps or it discards or forgets attributes )

Now set the Alignment (R/L/C)

Then SELECT the text and apply CHARACTER styling (Bold, Italic,Underline) ( see what I meant about fussy about the order performed?)

The cleaner way (and possibly simple if Heading # tags are not used except for the same purpose/style)
Open the stylesheet, add a entry to apply to that tag
Code:
h3 { text-align: left; font-size: 150%; }
(you get the picture All use of the h3 tag will have these attributes)

Trickier , but even finer control that will require switching to Code view, is to add a selector to the headings so that not all H# tags have the same style. A good use for S&R with care (don't use Replace All unless yo are ABSOLUTELY sure of everything )
theducks is online now   Reply With Quote
Old 09-24-2010, 01:23 AM   #4
droople
Connoisseur
droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.
 
droople's Avatar
 
Posts: 95
Karma: 388
Join Date: Jan 2010
Device: Nook,Nook Simple Touch, Nook Color
Thank you theducks.

Calibre is really a big headache for me.

It's the code for the title

<p class="calibre2"><span class="calibre3 italic bold calibre4">The</span> <span class="calibre3 bold calibre4">Year</span> <span class="calibre3 italic bold calibre4">of</span> <span class="calibre3 bold calibre4">Living Biblically</span></p>

I really want to build the file from scratch......
droople is offline   Reply With Quote
Old 09-24-2010, 10:36 AM   #5
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,245
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by droople View Post
Thank you theducks.

Calibre is really a big headache for me.

It's the code for the title

<p class="calibre2"><span class="calibre3 italic bold calibre4">The</span> <span class="calibre3 bold calibre4">Year</span> <span class="calibre3 italic bold calibre4">of</span> <span class="calibre3 bold calibre4">Living Biblically</span></p>

I really want to build the file from scratch......
OMG what a mess of styles (even without seeing the stylesheet(s).. A MUST to see what each selector is calling for.)

Code:
 /* in the stylesheet. VERY SIMPLE */
h1.chapter {
display: block;
font-size: 150%
font-weight: bold;
font-style: normal;
text-align: center;
margin-top: 1em;
margin-bottom: 2em;
}

h1.chapteritalic { /*assume that this adds/changes an additional property of the enclosing selector */
font-style: italic;
}


/* in the document */

<h1 class="chapter"><span class="chapteritalic">The </span> Year <span class="chapteritalic">of</span>  Living Biblically</h1>
This way you get a 1st level TOC entry automagically with Sigil

The ability to tune the look and feel (size, stroke, position), from a single place, the style sheet
theducks is online now   Reply With Quote
Old 09-25-2010, 03:44 AM   #6
droople
Connoisseur
droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.droople has a complete set of Star Wars action figures.
 
droople's Avatar
 
Posts: 95
Karma: 388
Join Date: Jan 2010
Device: Nook,Nook Simple Touch, Nook Color
Quote:
Originally Posted by theducks View Post
OMG what a mess of styles (even without seeing the stylesheet(s).. A MUST to see what each selector is calling for.)

Code:
 /* in the stylesheet. VERY SIMPLE */
h1.chapter {
display: block;
font-size: 150%
font-weight: bold;
font-style: normal;
text-align: center;
margin-top: 1em;
margin-bottom: 2em;
}

h1.chapteritalic { /*assume that this adds/changes an additional property of the enclosing selector */
font-style: italic;
}


/* in the document */

<h1 class="chapter"><span class="chapteritalic">The </span> Year <span class="chapteritalic">of</span>  Living Biblically</h1>
This way you get a 1st level TOC entry automagically with Sigil

The ability to tune the look and feel (size, stroke, position), from a single place, the style sheet
I really really dislike Calibre.....

This is the typical Calibre stylesheet

Code:
@namespace h "http://www.w3.org/1999/xhtml";
.bold {
    font-weight: bold
    }
.calibre {
    display: block;
    font-size: 1em;
    margin-bottom: 0;
    margin-left: 1pt;
    margin-right: 1pt;
    margin-top: 0;
    page-break-before: always
    }
.calibre1 {
    border-bottom: 0;
    border-top: 0;
    display: block;
    margin-bottom: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-indent: 1.5em
    }
.calibre10 {
    color: #F00
    }
.calibre11 {
    font-size: 0.75em;
    line-height: normal;
    vertical-align: super
    }
.calibre12 {
    font-size: 0.75em;
    line-height: normal;
    vertical-align: sub
    }
.calibre2 {
    border-bottom: 0;
    border-top: 0;
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    text-align: justify;
    text-indent: 1.5em
    }
.calibre3 {
    font-size: 1.66667em
    }
.calibre4 {
    color: #231F20
    }
.calibre5 {
    display: block
    }
.calibre6 {
    font-size: 1.83333em
    }
.calibre7 {
    height: auto;
    vertical-align: baseline;
    width: auto
    }
.calibre8 {
    font-size: 1.125em
    }
.calibre9 {
    color: blue;
    cursor: pointer;
    text-decoration: underline
    }
.italic {
    font-style: italic
    }
.mbppagebreak {
    border-bottom: 0;
    border-top: 0;
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-top: 0;
    page-break-after: always;
    text-indent: 1.5em
    }
And part of text code
Code:
<body class="calibre">
  <p class="calibre2"><span class="calibre4">For an hour, without pausing, he pontificates to this pretty blonde he's trying to pick up. She hears the following (as does everyone else):</span><br class="calibre5" />
  <span class="calibre4">"My one-man show</span> <span class="italic calibre4">Why Try</span> <span class="calibre4">is a dissertation on suicide," he announces. "It's very funny. I have a very funny mind. Death is funny. I haven't been to a funeral that I haven't laughed at."</span><br class="calibre5" />
droople is offline   Reply With Quote
Old 09-25-2010, 06:54 AM   #7
capidamonte
Not who you think I am...
capidamonte , Klaatu Barada Niktu!capidamonte , Klaatu Barada Niktu!capidamonte , Klaatu Barada Niktu!capidamonte , Klaatu Barada Niktu!capidamonte , Klaatu Barada Niktu!capidamonte , Klaatu Barada Niktu!capidamonte , Klaatu Barada Niktu!capidamonte , Klaatu Barada Niktu!capidamonte , Klaatu Barada Niktu!capidamonte , Klaatu Barada Niktu!capidamonte , Klaatu Barada Niktu!
 
capidamonte's Avatar
 
Posts: 343
Karma: 5337
Join Date: Jan 2010
Location: Honolulu
Device: Sony PRS-350
Dude,

Don't blame Calibre for that. Your source is junk. Calibre is NOT an ePub editor, it's a format converter and library manager. It is AWESOME at what it does, but it's not going to use human-intelligence to smartly lay out XHTML and CSS in a simple, elegant and consistent way.

It very cleverly does "good-enough" conversions for use in a casual manner -- and it is highly dependent on a good input source; garbage-in-garbage-out is a law of the universe. If you want beautiful books and elegant code you have to add that value.

Start from scratch with either simple HTML or a very good TXT and mark it up yourself, either in a text editor (go NoteTab or go home) or in Sigil, or one of the other ePub editors (Jutoh, Atlantis).

I recommend that you not trash Calibre for doing a very good job of making visually presentable ebooks, even if it uses complex and redundant XHTML and CSS. It's doing the best it can, (the very best, actually, of any program out there) in a way that is effective across an enormous number of use cases.

It is not a tool for professional or artistic work.
capidamonte is offline   Reply With Quote
Old 09-25-2010, 06:59 AM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,180
Karma: 17169472
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Check your source and see how it looks. If it looks rather poor, fix up the source and then convert.

Even if your source is a Mobipocket or MS Reader file, the code underneath the container can still be poor.
JSWolf is online now   Reply With Quote
Old 09-25-2010, 07:33 AM   #9
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,774
Karma: 12516053
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by droople View Post
I really really dislike Calibre.....
Disliking Calibre is like shooting the messenger when you receive bad news. Just doesn't make sense.

Quote:
Originally Posted by droople View Post
This is the typical Calibre stylesheet
Since calibre is not a book creator or editor it has no "typical Calibre stylesheet." Calibre simply converts whatever source file you or someone else used to export an epub. Calibre does not add or detract from the source except in very specific ways if you selected some conversion options. Calibre is not magic if the source file is garbage the internal code of the resultant epub will be too.
DoctorOhh is offline   Reply With Quote
Old 09-25-2010, 10:07 AM   #10
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,245
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
What they ALL said

Convert a clean plain text file that is either :
1) Tab indented Paragraphs or
2) hard returns only at paragraph ends.

The Stylesheet is Lean and fairly mean.

A great foundation to build upon for additional styles.

GIGO,

Calibre is not your Mother. It does not clean up your messes
theducks is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 11:21 AM.


MobileRead.com is a privately owned, operated and funded community.