Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-13-2010, 04:17 AM   #16
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
jackie_w,
I don't use Word at all, can you create a new text file in notepad, and paste the following and save as 'dummy.txt', load it into Word, and type the word 'Dummy' by hand, into the body, then save from word as whatever format you'd usually use, then open that file from notepad again and paste back it's contents.

Code:
<html><head><title>Dummy</title></head>
<body>
</body>
</html>
Thanks
Perkin is offline   Reply With Quote
Old 10-13-2010, 09:06 AM   #17
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@Perkin,

What you have asked for is to create a piece of simple HTML as a .txt file and use Word as a text editor to change it and re-save as a txt file.

In these circumstances I would not just be typing the word Dummy I would also be typing the surrounding <p>...</p> paragraph tags. Here are the contents of dummy_out.txt

Code:
<html><head><title>Dummy</title></head>
<body>
<p>Dummy</p>
</body>
</html>
I have also attached a picture of what I see in Word during the edit.

If I rename dummy_out.txt to dummy_out.htm it opens in my browser.

I'm not really sure what prompted your request but there are very few circumstances when I would use Word as my 1st-choice text editor for editing HTML files. I find Notepad++ easier to use. I do however use Word heavily to generate the initial HTML from a .doc WYSIWYG file, in the first place.

In these circumstances I would:
Open a brand new blank Word .doc file
Type the word Dummy
Apply the built-in style Normal(Web)
Save-as webpage_filtered to Dummy2.htm

The resulting piece of HTML (Dummy2.htm) would have quite a lot more in it (I've attached a screenshot of what it looks like in Notepad++) but would look the same as dummy_out.htm when opened in a browser.Click image for larger version

Name:	dummy_out.jpg
Views:	243
Size:	63.6 KB
ID:	59763 Click image for larger version

Name:	dummy2.jpg
Views:	197
Size:	125.9 KB
ID:	59764
jackie_w is offline   Reply With Quote
Advert
Old 10-13-2010, 01:58 PM   #18
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by jackie_w View Post
...I think there's something in the CSS Word doesn't like. This doesn't altogether surprise me as I was able to control the styling much better with manually created CSS than with the Word auto-generated stuff. If I have time tomorrow I'll try and track down which CSS it's complaining about (maybe the DropCaps?).
@sergio, (sorry to have to quote myself above)
...not the DropCaps after all. I've investigated further, the thing Word doesn't like in the CSS file seems to be the 4 occurrences of:
Code:
page-break-inside:avoid;
If you remove them from the CSS file then the HTML file should open in Word WYSIWYG mode without an error. I only included these recently to try to avoid things like single poetry verses splitting across pages on the reader.

Of course I can't guarantee anything as we're using different Word versions.

There are a few cautionary notes if you are intending to do multiple open/save cycles of the .htm file in Word WYSIWYG mode. I'll elaborate further if it becomes necessary.

You should not have these problems if you are only ever going to open the HTML file in Word text-editor mode, however this has its own challenges with non-ascii chars as you may discover soon enough.

Anyway, enough for now.
jackie_w is offline   Reply With Quote
Old 10-13-2010, 05:24 PM   #19
Perkin
Guru
Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.Perkin calls his or her ebook reader Vera.
 
Perkin's Avatar
 
Posts: 655
Karma: 64171
Join Date: Sep 2010
Location: Kent, England, Sol 3, ZZ9 plural Z Alpha
Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin)
Quote:
Originally Posted by jackie_w View Post
@Perkin,

I'm not really sure what prompted your request but there are very few circumstances when I would use Word as my 1st-choice text editor for editing HTML files. I find Notepad++ easier to use. I do however use Word heavily to generate the initial HTML from a .doc WYSIWYG file, in the first place.
As I stated, I don't use Word, I was curious about the output, I though output would have then had all the extrea 'crap', but I suppose it can save it as raw txt.

Thanks for setting my thinking straight.
Perkin is offline   Reply With Quote
Old 10-13-2010, 07:40 PM   #20
sergio blum
Member
sergio blum began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2009
Device: SONY READER
Changes in fonts seen in Caliber/Sigil veiwers. Not in Sony reader.

@jackie_w

Hi.

I am leaving the Word Macro and the entire workflow to be completed in the week-end.

Meanwhile... (another hurdle)
I am now attaching a very small EPUBto this post. Only two paragraphs in it: one sans-serif, the other monospace. Any font size, color, weight etc changes made in the CSS in Sigil are not reflected when epub opened in Reader-- although they show excatly as expected both in Caliber and Sigil viewers.

I have no idea whats going on. I am making so many tentatives that I'm not sure what effectively made some difference. I think I managed to at least get sans-serif bold (previously) showing repeatedly as serif when I added the following to Extra CSS option in Calibre's Look & Feel conversion box.

I am not sure if this is correct syntax for the Extra CSS.
{font-family: monospace;
color: black;
font-weight: bold
}
{
font-family: sans-serif;
color: black;
font-weight: bold;
}

Not once I succeded to get monospace rendered as black and bold (it always shows as grey and not bold) and always at a constant small size.
Would you have a look?
Please.

Sergio
Attached Files
File Type: rar SMALL EPUB.rar (12.5 KB, 168 views)
sergio blum is offline   Reply With Quote
Advert
Old 10-13-2010, 07:51 PM   #21
sergio blum
Member
sergio blum began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2009
Device: SONY READER
@jackie_w

I forgot to say this: I have included the code in the CSS Extra by converting EPUB to EPUB. Does it make sense?

Sergio
sergio blum is offline   Reply With Quote
Old 10-13-2010, 08:33 PM   #22
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Hi Sergio, It's too late here in the UK to start experimenting now, I'll have a look at your epub on my Sony tomorrow. By the way which Sony model do you have?

One thing which immediately stands out with your Extra CSS is that you seem to be missing the bit which tells calibre which html element(s) to apply the CSS changes to i.e. I'd expect to see something like

Code:
body {font-family: monospace; color: black; font-weight: bold}

or 

p {font-family: sans-serif; color: black; font-weight: bold;}
You probably don't need color:black; as it is the default.

I seem to remember that my Sony's default monospace font used for epubs was a bit wishy-washy so I customised it. More on this tomorrow.

I have to tell you that I've never used Sigil so can't offer any advice on that. I put most of my efforts into getting the raw HTML/CSS right, do a simple convert to EPUB in Calibre and then just tweak (if necessary) with the appropriately named, Tweak-Epub utility.

It is perfectly OK to convert EPUB to EPUB in Calibre, for all sorts of reasons, but I'm not sure what happens when you convert a Sigil epub to a Calibre epub or edit a Calibre epub in Sigil. I vaguely thought I'd read somewhere that there are some differences with how the epub is constructed. The TOC springs to mind. Perhaps someone more knowledgeable will drop by.

Anyway it's 01:30am, I must go.
jackie_w is offline   Reply With Quote
Old 10-13-2010, 10:10 PM   #23
theducks
Well trained by Cats
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: 29,802
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:
Originally Posted by jackie_w View Post
Hi Sergio, It's too late here in the UK to start experimenting now, I'll have a look at your epub on my Sony tomorrow. By the way which Sony model do you have?

One thing which immediately stands out with your Extra CSS is that you seem to be missing the bit which tells calibre which html element(s) to apply the CSS changes to i.e. I'd expect to see something like

Code:
body {font-family: monospace; color: black; font-weight: bold}

or 

p {font-family: sans-serif; color: black; font-weight: bold;}
You probably don't need color:black; as it is the default.

I seem to remember that my Sony's default monospace font used for epubs was a bit wishy-washy so I customised it. More on this tomorrow.

I have to tell you that I've never used Sigil so can't offer any advice on that. I put most of my efforts into getting the raw HTML/CSS right, do a simple convert to EPUB in Calibre and then just tweak (if necessary) with the appropriately named, Tweak-Epub utility.

It is perfectly OK to convert EPUB to EPUB in Calibre, for all sorts of reasons, but I'm not sure what happens when you convert a Sigil epub to a Calibre epub or edit a Calibre epub in Sigil. I vaguely thought I'd read somewhere that there are some differences with how the epub is constructed. The TOC springs to mind. Perhaps someone more knowledgeable will drop by.

Anyway it's 01:30am, I must go.
Sigil just lets you get at the pieces easily and usually see what happens
What you don't get to see is reader specific deficiencies.



Another line that you might want to add.
font-size: 1.2em < the number affects the relative size (I use 1.2 on my PEz at mid zoom (3) level

(if you original css does not have this defined, the base is (default pt = 1em)
theducks is offline   Reply With Quote
Old 10-14-2010, 12:49 AM   #24
sergio blum
Member
sergio blum began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2009
Device: SONY READER
( All Chilean miners already rescued by the BBC and i am stilll stuck in the EPUB cave.)

@jackie_w & @theducks
Yes, I read your most recent/helpful posts. But impossible to reply now. It is finally 01h30 here too. I will be able to return to these efforts only Saturday.

I am learning a lot, though. Today, I even learnt that when a font name contains a space it must be enclose by quotes !!!

Thanks for not leaving me alone in the dark.

sergio
sergio blum is offline   Reply With Quote
Old 10-14-2010, 08:07 PM   #25
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
@sergio,
I've had a look at your small_fry epub. The attached screenshot is what I see on my PRS-505 when I view it using the factory-set Sony epub fonts at the smallest zoom-level.

I can confirm that text and code are already set to font-weight:bold and color:black within the epub.

Before going any further, when you have time, please can you tell me:-
  • Does the screenshot match what you see on your Sony reader?

  • Did you intend to have the code section wrapped as seen below or did you mean to preserve the indents as are visible when viewing the XHTML file contained inside the epub?

  • Did you really intend all the text to be this large?

  • What is it about the appearance (as seen below) that you want to change?
Attached Thumbnails
Click image for larger version

Name:	small_fry.jpg
Views:	219
Size:	65.0 KB
ID:	59797  
jackie_w is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
pdfreflow: reflow text PDFs Pranananda PDF 45 11-03-2011 09:32 AM
What is the best reader read real reflow PDF ( not refow text ) ? familyhandh Which one should I buy? 1 08-05-2010 08:44 AM
Help with reflow text file siulayhumga Workshop 9 07-31-2010 06:36 PM
epub reflow problem with 0.6.7 NASCARaddicted Calibre 6 08-17-2009 01:09 AM
80-column text reflow - Hanlin V3 elewton Other formats 1 02-10-2009 05:00 AM


All times are GMT -4. The time now is 07:53 PM.


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