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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 09-30-2010, 06:26 AM   #1
Shadowman123
Member
Shadowman123 doesn't litterShadowman123 doesn't litter
 
Posts: 11
Karma: 112
Join Date: Sep 2010
Device: prs-300
Tweak epub and Simple CSS Editor

Hello,

Maybe somebody can help with with the following question:
I have tried to use the new functionality "Tweak Epub" and opened the CSS file with Wordpad.
I would like to change some of the font sizes but I'm a bit confused with all the sections in the CSS and what they refer to in the "real" document.
It seems the sections are numbered. For example:

.calibre1 {
font-size: 1.125em
}
.calibre2 {
font-size: 1em
}
.calibre3 {
font-size: 0.75em
}
.calibre4 {
display: block;
page-break-before: always
}
.calibre5 {
color: windowtext;
display: none;
text-decoration: none
}

Is there a simple Editor with Preview where I can see the result of the changes I make in the CSS without having to rebuild the epub every time??

Thank you for your help.
Shadowman123 is offline   Reply With Quote
Old 09-30-2010, 06:44 AM   #2
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80446
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
I can't help you with your editor search, but I have to ask this: Why is everyone always using text processors like Wordpad or Word or something like that for editing text files like HTML, CSS sheets or such? It's better to use a text editor that doesn't support text formatting, like the built-in editor or some free alternative. (The reason being that text processors, as opposed to text editors, support text formatting and, if you're not very careful, want to save any formatting into the document, rendering it unusable in case of markup or programming languages.)
Manichean is offline   Reply With Quote
Old 09-30-2010, 07:14 AM   #3
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 637
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300, PW2
Tweak ePub is very handy if you are familiar with the structure of ePub documents and the types of files which they contain. If you are new to ePub then you may find it easier to use Sigil after generating your ePub with calibre. This is a WYSIWIG-style editor for ePubs and can also show you the 'raw' ePub data, which can be helpful in learning what calibre does with CSS. Changes made in the text edit mode of Sigil can be shown immediately in the WYSIWIG view. Once you are confident with ePubs you will be better prepared for Tweak ePub, at which point, (as Manichean says), you should not use a text-processing type editor but a plain text editor. Pick one that has good support for regular expressions and you will save yourself a lot of time. Most also have colour coding for different file types, (CSS, HTML etc.)
Agama is offline   Reply With Quote
Old 09-30-2010, 07:50 AM   #4
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: 13,632
Karma: 5126946
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Shadowman123 View Post
Hello,

Maybe somebody can help with with the following question:
I have tried to use the new functionality "Tweak Epub" and opened the CSS file with Wordpad.
I would like to change some of the font sizes but I'm a bit confused with all the sections in the CSS and what they refer to in the "real" document.
It seems the sections are numbered. For example:

.calibre1 {
font-size: 1.125em
}
.calibre2 {
font-size: 1em
}
.calibre3 {
font-size: 0.75em
}
.calibre4 {
display: block;
page-break-before: always
}
.calibre5 {
color: windowtext;
display: none;
text-decoration: none
}

Is there a simple Editor with Preview where I can see the result of the changes I make in the CSS without having to rebuild the epub every time??

Thank you for your help.
CSS is like paint by the numbers pictures.
You look at the picture, and find the number (or word. technically "string") attached (class=" string") to the text you want to modify.

Be reminded that the "C" in CSS stands for Cascade.. Your text "class" may be affected by changes on the layers surrounding you layer of interest , and there could possibly still be more inner layers that will be affected.
Going back to your original Stylesheet: (which did not show the standard outermost layer: "calibre", which sets the basic overall L+F of the "page".

3 font sizes called out. with no other attributes
No clues here.
theducks is offline   Reply With Quote
Old 09-30-2010, 08:38 AM   #5
Shadowman123
Member
Shadowman123 doesn't litterShadowman123 doesn't litter
 
Posts: 11
Karma: 112
Join Date: Sep 2010
Device: prs-300
First of all thank you all for your quick responses.

Maybe my question got kind of lost in all the explaining.

If I open the CSS with Notepad I can't even tell the different sections apart. (That's why I used Wordpad).

I realize that I shouldn't be using WordPad to edit the CSS that's why I'm asking for a different Editor.
Shadowman123 is offline   Reply With Quote
Old 09-30-2010, 08:43 AM   #6
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80446
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Well, if you don't want to use Sigil, use Notepad++. It has syntax highlighting and everything.
Manichean is offline   Reply With Quote
Old 09-30-2010, 08:57 AM   #7
Shadowman123
Member
Shadowman123 doesn't litterShadowman123 doesn't litter
 
Posts: 11
Karma: 112
Join Date: Sep 2010
Device: prs-300
Thank you, I will try that.

BTW, It's not that I don't want to use Sigil. I just thought there was quick way through "Tweak epub" to edit the CSS and change the font size (and see what I'm doing).
Shadowman123 is offline   Reply With Quote
Old 09-30-2010, 08:59 AM   #8
Manichean
Wizard
Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!Manichean My eyes! My eyes! The light is just too bright!
 
Manichean's Avatar
 
Posts: 3,130
Karma: 80446
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
Quote:
Originally Posted by Shadowman123 View Post
Thank you, I will try that.

BTW, It's not that I don't want to use Sigil. I just thought there was quick way through "Tweak epub" to edit the CSS and change the font size
Yes and yes...

Quote:
Originally Posted by Shadowman123 View Post
(and see what I'm doing).
... and, to my knowledge, no- at least not with Sigil.
Manichean is offline   Reply With Quote
Old 09-30-2010, 09:01 AM   #9
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: 13,632
Karma: 5126946
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Shadowman123 View Post

If I open the CSS with Notepad I can't even tell the different sections apart. (That's why I used Wordpad).
You did not see a CSS like the example you showed?
Just 1 long line? "Unix line end format
Notepad++. will fix that. It can convert between Unix,Dos,Mac line ends (which does not hurt the file).


I tried to explain about matching the Class names in your document to the stylesheet
theducks is offline   Reply With Quote
Old 09-30-2010, 09:46 AM   #10
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 637
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300, PW2
Quote:
Originally Posted by Shadowman123 View Post
Thank you, I will try that.

BTW, It's not that I don't want to use Sigil. I just thought there was quick way through "Tweak epub" to edit the CSS and change the font size (and see what I'm doing).
Tweak ePub keeps it within calibre, (Notepad++ is great here), but you can only see the results when you rebuild the ePub. Sigil will let you change CSS font size and see the results immediately - but it's outside of calibre.

Notepad++ will convert your end of line format or let you display a long line in wrapped mode. It will also colour code your CSS.

Maybe we need another option in Tweak ePub: "Tweak ePub in Sigil"!

Last edited by Agama; 09-30-2010 at 09:55 AM.
Agama is offline   Reply With Quote
Old 09-30-2010, 10:02 AM   #11
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,465
Karma: 402333
Join Date: Mar 2009
Device: iPad
There's actually another previewing approach with Tweak ePub.

If you make a change to the CSS file and save it, then open the HTML file using the native browser, it will render the file with the adjusted CSS.

- Explode ePub
- Edit CSS
- Open an HTML file with default application (IE, Safari, Firefox, etc)
- Make further edits on CSS until satisfied/bored/frustrated, refreshing browser window after each CSS edit
- Rebuild ePub

G
GRiker is offline   Reply With Quote
Old 09-30-2010, 10:07 AM   #12
Shadowman123
Member
Shadowman123 doesn't litterShadowman123 doesn't litter
 
Posts: 11
Karma: 112
Join Date: Sep 2010
Device: prs-300
Again thank you all.

I have tried notepad++ and I think I found a way:

- Tweak epub
- open CSS with notepad++
- open one of the "document files" with notepad++
(this gives me two tabs and I can find the correct CSS-class)
- change CSS values (and save)
- open document file with Firefox
- repeat and refresh as necessary.

I know it's not the best but it works.

BTW I found out that there is a Plug-in for notepad++ called CSS-eXplorer that might do
what I'm looking for. The plug-in is not working at the moment but I'll keep checking.

And yes Agama: keeping it within calibre is what I like.

Sorry GRiker: I took so long writing my post that I missed yours. But I guess that shows that I'm on the right track. Thank you

Last edited by Shadowman123; 09-30-2010 at 10:14 AM.
Shadowman123 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Tweak ePub - new feature (0.7.20) GRiker Calibre 35 03-07-2012 08:56 AM
looking for simple metadata editor jdh Workshop 5 06-01-2011 06:27 AM
Possibility of Installing a Simple Text Editor luqmaninbmore PocketBook 1 11-24-2009 12:11 PM
Is there a simple small metadata editor? fairuza LRF 1 08-17-2009 08:32 AM


All times are GMT -4. The time now is 01:36 AM.


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