09-23-2010, 12:35 AM | #1 |
Connoisseur
Posts: 95
Karma: 388
Join Date: Jan 2010
Device: Nook,Nook Simple Touch, Nook Color
|
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. |
09-23-2010, 10:23 AM | #2 | |
Enthusiast
Posts: 25
Karma: 10
Join Date: Jul 2010
Device: PSR-300
|
Hi
Quote:
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> Code:
calibre3 { font-size: 1em; text-indent: 0; margin-bottom: 0.5 em; } ru |
|
Advert | |
|
09-23-2010, 11:09 AM | #3 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
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%; } 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 ) |
|
09-24-2010, 01:23 AM | #4 |
Connoisseur
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...... |
09-24-2010, 10:36 AM | #5 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
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> The ability to tune the look and feel (size, stroke, position), from a single place, the style sheet |
|
Advert | |
|
09-25-2010, 03:44 AM | #6 | |
Connoisseur
Posts: 95
Karma: 388
Join Date: Jan 2010
Device: Nook,Nook Simple Touch, Nook Color
|
Quote:
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 } 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" /> |
|
09-25-2010, 06:54 AM | #7 |
Not who you think I am...
Posts: 374
Karma: 30283
Join Date: Jan 2010
Location: Honolulu
Device: PocketBook 360 -- Ivory
|
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. |
09-25-2010, 06:59 AM | #8 |
Resident Curmudgeon
Posts: 73,968
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
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. |
09-25-2010, 07:33 AM | #9 |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Disliking Calibre is like shooting the messenger when you receive bad news. Just doesn't make sense.
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. |
09-25-2010, 10:07 AM | #10 |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
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 |