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 12-12-2010, 02:10 PM   #1
mhikl
Enthusiast
mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.
 
mhikl's Avatar
 
Posts: 29
Karma: 1764
Join Date: Nov 2010
Location: Canada
Device: iPod touch
Sigil Centre Image confusion

I've done my work searching this forum and I went to
"http://code.google.com/p/sigil/wiki/ProofreadingWithSigil" but still the problem persists.
It looks as though the steps have changed as I don't get the same "Code" in my document as is shown in the page link above.

Code —class="sgc-1"— does not centre the image in my Sigil document. It puts it to the left on my Sigil page and the same on my Stanza iPtouch epub.
Centring the image seems to give a -5 which centres it in my Sigil document but not on the touch.

My title is centred but the image and what follows looks centred but ends up on the left in Stanza.

A picky point, but I do like my Stanza docs to look good.

I think I have worked out all the kinks I had in other parts of my Sigil docs but this one has given me a twitch in my left eye and the dog won't come near me when she sees me at the computer. Any help would be appreciated.

Namaste and working to stay mindful.

Oh, another point. The only way I could get my Title Page with picture image and author's name under the image was to make a previous page with the title followed by a SGF chapter marker and a Chapter Break. Then the First Title Page appears as a blank on my Touch but the Second Title Page (my original TP) and its image followed by Author shows up. This is all very confusing. It would be great if when the book opens up in Stanza, instead of getting a blank page (the First Title Page) it would open up to a Title Page that has the Title, Image and Author's name. This may be a quirk with Stanza but I am very willing to take lashes with the responsibility if it is my error.
mhikl is offline   Reply With Quote
Old 12-12-2010, 05:37 PM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,190
Karma: 7422141
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
For centering an image you could use somethin like:
Code:
<p><div align="center"><img ..../></div></p>
or
Code:
<p class="center"><img .../></p>
For the latter of course you have to enter the class center in your CSS stylesheet. Since Sigil changes a lot between version, I wouldn't be surprised that the sgc-1 doesn't work anymore. But Valloric could confirm if this is the case.

You're second point can be a problem of a too large image or hard-defined page-breaks. I do not know how stanza works, but you could try to fiddle with CSS elements like 'page-break-before: never' or alike.
Toxaris is offline   Reply With Quote
Old 12-12-2010, 07:51 PM   #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: 15,306
Karma: 6022735
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Toxaris View Post
For centering an image you could use somethin like:
Code:
<p><div align="center"><img ..../></div></p>
or
Code:
<p class="center"><img .../></p>
For the latter of course you have to enter the class center in your CSS stylesheet. Since Sigil changes a lot between version, I wouldn't be surprised that the sgc-1 doesn't work anymore. But Valloric could confirm if this is the case.

You're second point can be a problem of a too large image or hard-defined page-breaks. I do not know how stanza works, but you could try to fiddle with CSS elements like 'page-break-before: never' or alike.
AFAIK
SGC-x are not standardized assignments
and don't exist on the page until you press one of the styling buttons.
And THEN, it only exists for the PAGE that it was used upon at that time.
If you make some othe styling (combination) on a different Page before you use the "center text" style, that will get assigned SGC-1

SGC styles are added to the Page <head> section, not the stylesheet.

I found this out, because I styled the chapter headings on one page , and use S & R regex to change all the other "Chapter headings to habve the same 'code'. Only, none of the other pages worked, even though the Code was correct.
Turns out: SGC codes are not Global.
theducks is offline   Reply With Quote
Old 12-12-2010, 08:36 PM   #4
mhikl
Enthusiast
mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.
 
mhikl's Avatar
 
Posts: 29
Karma: 1764
Join Date: Nov 2010
Location: Canada
Device: iPod touch
I have decided to live with off centred images just as I have learned to accept never getting the exactly perfectly measure of cream in my coffee. My quibble days are over with Sigil. I am where I am and want (almost) to be, and Sigil works for me.

These suggestions, though appreciated, are not for the dumbfounded and that I bid I am. I can barely get through the English language and its basic punctuation but to add a “<“ or a “</“ or an “=“ is too much to ask this simple brain of mine.

I am so pleased that I have been able to go back to a Sigil epub previously made and executed as expected (pardoning off-centred images) and then to successfully add a further heading tweak, that I can live with this cup of imperfect coffee. In the near past, every time I tried to change or update or perfect my epub I worsened my situation but now I breeze through this programme with successes beyond my wildest hopes.

But I have a Dream. I should like to write a quick history of my travails to the state I now find myself with Sigil to aid the path of the dumbfounded past, present and future, or for those, who like I, can learn to live with skewed images.

Namaste,
mhikl

On second thought, I'm going to try the tricks supplied. How it bugs me my image stands askew.

Last edited by mhikl; 12-13-2010 at 02:11 AM. Reason: Second thoughts.
mhikl is offline   Reply With Quote
Old 12-13-2010, 04:21 AM   #5
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,190
Karma: 7422141
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
It is really not that hard. This is just basic (x)html and css. You should see the stuff others come up with sometimes...
Toxaris is offline   Reply With Quote
Old 12-13-2010, 11:25 AM   #6
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,327
Karma: 4964183
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Toxaris View Post
For centering an image you could use somethin like:
Code:
<p><div align="center"><img ..../></div></p>
Not that. A <p> element cannot contain other block-level elements (<div>, <p>, <blockquote>...)
Jellby is offline   Reply With Quote
Old 12-13-2010, 01:46 PM   #7
mhikl
Enthusiast
mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.
 
mhikl's Avatar
 
Posts: 29
Karma: 1764
Join Date: Nov 2010
Location: Canada
Device: iPod touch
That's easy for Jellby and Toxaris and theducks to say. You guys think in rhymes beyond my comprehension. But thanks to copy and paste I shall find time to make this thing work and what once was dreary, when understood, becomes a beacon to success. And then shall I scale my Opus Sigil for my dumbfounded brethren. I am not too proud for staples and tape.

(sorry for the poetrics but after a night of pleasant dreams I am still inspired from writing my rhyme in the poetry section of this fair forum.)

Namaste,
mhikl

Last edited by mhikl; 12-13-2010 at 01:48 PM. Reason: forgot theducks
mhikl is offline   Reply With Quote
Old 12-13-2010, 04:03 PM   #8
mhikl
Enthusiast
mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.
 
mhikl's Avatar
 
Posts: 29
Karma: 1764
Join Date: Nov 2010
Location: Canada
Device: iPod touch
I stand stymied. Here is what I have tried. It looks good on the Sigil page, but not on my iPtouch.

<body>
<h1 class="sgc-1" id="heading_id_2">This Front</h1>

<p class="center sgc-1 sgc-4"><img alt="" src="../Images/Infinite%20Life.jpg" /><br /></p>

I really need it spelt out like what you see above. xhtml may be obvious to ye poets of the xhtml either, but I am planet bound.

sgc-4 or -1 doesn’t seem effective as I wish. I tried all suggestions (the "center" command I thought nice and obvious), so, nicely Sigil ‘fixes’ or does what it does to not blow up changing or fixing the strange language to what it wants.

In my real ebook that works, I used spaces to centre the image and author successfully, but what a bothersome work-round.

Like why does the header nicely centre. I tried copy-paste its?placement parameters. Ha! To the left she jumps.

Doesn’t seem to me that this should be rocket science. Wife says “Do dishes” and I do the dishes. Why won’t Sigil be so compliant. Must be a lady of her own mind.

Namaste,
mhikl

I've just had a sudden enlightenment, an Eureka moment.
What if Sigil provided a template; a simple .epub with a Title page including a centred image and author and other neat stuff; An introductory Chapter or Part with a nice centred Heading. Nothing simple. Just the bare working essentials. Then one could open the template, view its structure, exchange their own image, author etc and commence with the rest of their work? I shall Post the Sigil Professor immediately. Life is so simple in my universe; sometimes.

Last edited by mhikl; 12-13-2010 at 04:20 PM. Reason: Sudden Enlightenment
mhikl is offline   Reply With Quote
Old 12-13-2010, 05:25 PM   #9
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
If separate css styles are a bit much what about something like this (I don't know your device):
Code:
<p style="text-align:center"><img alt="" src="../Images/Infinite%20Life.jpg" /><br /></p>
kiwidude is offline   Reply With Quote
Old 12-13-2010, 06:56 PM   #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: 15,306
Karma: 6022735
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by mhikl View Post
I stand stymied. Here is what I have tried. It looks good on the Sigil page, but not on my iPtouch.

<body>
<h1 class="sgc-1" id="heading_id_2">This Front</h1>
You are working way too hard.

In book view (BV)
single click ON the Heading (Paragraph,image)line you want centered.

Do Not select text (or image)

Click the "center text" icon
Note Set Heading level first, again single click the line. Note this clears previous styles, which is why I said FIRST.
theducks is offline   Reply With Quote
Old 12-14-2010, 03:58 AM   #11
mhikl
Enthusiast
mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.mhikl once ate a cherry pie in a record 7 seconds.
 
mhikl's Avatar
 
Posts: 29
Karma: 1764
Join Date: Nov 2010
Location: Canada
Device: iPod touch
It's a conundrum, theducks. Did as you instructed and no luck. The image and a trial line (The End) at the end of my practice epub refuse to centre. My headings do centre, however.

Tomorrow I will try another practice book from start to finish: TextEdit-.xhtml-epub all with: Title page with Heading, image and author name; a couple of chapters with Headings and a few lines of pain text; the final chapter finishing with "The End" and centred.

I like a good challenge but this is a little frustrating and I may just be making some simple wrong move I can't deduce. Clear head and a new project may work out. We'll see.

I appreciate your help. (This is the best forum I have come across with members who take the time and patience to help.)

Namaste,
mhikl
mhikl is offline   Reply With Quote
Old 12-14-2010, 06:32 AM   #12
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,737
Karma: 15513561
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
I know I'll regret getting in the scrum, but, @mhikl, two things:
  1. If you are using an i-anything, and viewing the epub in iBooks, there's nearly always a problem with centering, FWIW, and,
  2. In case that isn't it, although I want to whip myself with a wet CSS guide for saying this, insert your image, in BV, and then {sigh}, put your cursor to the left, LEFT of your image, and THEN hit the center text icon.

And to learn how to get around the dreaded Jobsian i-Anything centering problem, if #2 doesn't work, you'll have to break down and learn CSS. It's not that hard, but the cascading part can bite you in the a$$.

Lastly: despite Valloric's Herculean efforts, no matter what anyone tells you, Sigil isn't a "WYSIWYG" editor for epubs. It really isn't. There ain't no such thing, although you might want to try Jutoh (Hitch slaps self in head). It's not elegant, and it's not very...well, techie...but if you can write a little html, you can make decent books with Jutoh. Not great; not elegant; but serviceable. And you don't need to know a word of CSS--so to speak. Jutoh might be a better match for you at this stage...not to dissuade you or encourage you NOT to learn the good meaty stuff, but if you want to make it NOW, that might be a better way to go, today. Just a thought.

HTH,

Hitch
Hitch is offline   Reply With Quote
Old 12-14-2010, 08:48 AM   #13
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,190
Karma: 7422141
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Quote:
Originally Posted by Jellby View Post
Not that. A <p> element cannot contain other block-level elements (<div>, <p>, <blockquote>...)
Oeps... That comes from writing things from the head. I would never try it this way anyway. I solve this in CSS myself. Of course you are right, silly me.
Toxaris is offline   Reply With Quote
Old 12-14-2010, 08:50 AM   #14
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 3,190
Karma: 7422141
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Quote:
Originally Posted by mhikl View Post
<p class="center sgc-1 sgc-4"><img alt="" src="../Images/Infinite%20Life.jpg" /><br /></p>
Perhaps a silly question, but there is a class in CSS named 'center' is there? Otherwise this will do nothing at all...

Last edited by Jellby; 12-14-2010 at 11:43 AM. Reason: fixed markup
Toxaris is offline   Reply With Quote
Old 12-14-2010, 11:12 AM   #15
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: 15,306
Karma: 6022735
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Toxaris View Post
Quote:
Originally Posted by mhikl View Post
<p class="center sgc-1 sgc-4"><img alt="" src="../Images/Infinite%20Life.jpg" /><br /></p>
Perhaps a silly question, but there is a class in CSS named 'center' is there? Otherwise this will do nothing at all...
Good point
There might be clashing styles.

what do SGC1 and SGC4 do?
If center is really a Center. PUT IT LAST:

styles apply in order:
center -> sgc-1 -> sgc-4

Last edited by Jellby; 12-14-2010 at 11:43 AM. Reason: fixed markup
theducks 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
How do I centre a horizontal rule? AlexBell ePub 12 10-06-2010 04:09 AM
Where is the Canadian service centre for 302s? guyanonymous PocketBook 3 09-27-2010 04:37 PM
PRS-600 New Price, Sony Store Toronto Eaton Centre edlauzon Sony Reader 1 07-18-2010 11:22 AM
Comment créer un tableau centré dans un Ebook avec sigil ? agronomia Software 7 05-06-2010 07:26 AM
UK's Printed Electronics Technology Centre (PETEC) and the Flexible Display Centre ( Dulin's Books News 0 02-18-2010 03:30 PM


All times are GMT -4. The time now is 08:34 AM.


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