Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-29-2014, 09:17 PM   #1
rosshalde
Zealot
rosshalde began at the beginning.
 
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
How do I adjust my css to do.....?

I have a book that is mostly simple text requiring no indentation at all, which is great.

But, there is an introduction that does require normal English rules of paragraph layout, with the first word of the beginning of a paragraph indented.

What do I need to do differently to make this work?
In the code, the text in the forward and the text in the main book have the same labeling, so I don't want to mess with that. Do I need to give the paragraph different labeling and then define the values in the css?
rosshalde is offline   Reply With Quote
Old 10-29-2014, 09:59 PM   #2
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,166
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Why wouldn't you just add a new css class indent
Code:
.indent {text-indent: 1cm }
and then you would do
Code:
<p class="indent">Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Nulla sit amet diam vestibulum, aliquam erat eget, vestibulum
eros. Cras tempus ante sed sagittis rhoncus. Morbi volutpat, massa
vitae porta sollicitudin, mi felis gravida lacus, nec fringilla diam nulla
nec ligula. Pellentesque erat elit, malesuada quis consectetur vulputate,
elementum vel eros. Vivamus porta eros enim, at pretium felis maximus in.
Ut consequat vitae massa at egestas. Mauris dictum nec odio at faucibus.</p>

<p>Curabitur congue turpis id purus fermentum, ut euismod libero luctus.
In hac habitasse platea dictumst. Nam elit nisi, ullamcorper eu condimentum
in, fringilla vel augue. Aenean sodales velit massa, ac bibendum quam lacinia
et. Nulla ut quam nec sem facilisis aliquet. Sed tristique, odio ut accumsan
lobortis, ex elit commodo nisl, sit amet feugiat sem lectus quis nunc. Fusce
vehicula laoreet aliquam.</p>
PeterT is offline   Reply With Quote
Advert
Old 10-29-2014, 10:02 PM   #3
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,166
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Have you looked at any of the guides people have made available on creatng ePubs?

See for instance these resources from Pablo:

My Quick and Dirty ePub Tutorial (version 3 covering Sigil 0.7.1 now available, in pdf and ePub format)
My Quick and Dirty ePub Tutorial in the Wiki
PeterT is offline   Reply With Quote
Old 10-29-2014, 10:58 PM   #4
rosshalde
Zealot
rosshalde began at the beginning.
 
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
Thank you. I went through the Sigil tutorial and user guide.
That helped a lot.
I think I basically did what you suggested, just with different terms.
I defined a new paragraph type in the css and then labeled the text in the forward under that type. I left everything the same in the definition except I added the indent.
Thanks for your help. I will look into the other guides as well
rosshalde is offline   Reply With Quote
Old 10-31-2014, 10:56 AM   #5
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
Apply this stylesheet to the introduction chapter, or embed it in the header. It tells a standard paragraph to have no indent, but a paragraph following another paragraph to take one. Using em rather than an absolute value allows for reader-changed text size.
Note the spaces before and after +

To keep the whole book using the same stylesheet, replace p with .p1 (or whatever) and use <p class="p1"> in that chapter. More work, though.

p{
text-indent:0;
}

p + p {
text-indent:1.8em;
}

Last edited by exaltedwombat; 10-31-2014 at 11:00 AM.
exaltedwombat is offline   Reply With Quote
Advert
Old 11-02-2014, 04:45 PM   #6
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: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by rosshalde View Post
Thank you. I went through the Sigil tutorial and user guide.
That helped a lot.
I think I basically did what you suggested, just with different terms.
I defined a new paragraph type in the css and then labeled the text in the forward under that type. I left everything the same in the definition except I added the indent.
Thanks for your help. I will look into the other guides as well
There is a large difference between reading the Sigil tutorial, and/or Pablo's Guide, and understanding HTML and CSS. From your rather numerous questions here, frankly, it seems that you have almost no HTML/CSS knowledge. Is that right? If it is, you are pushing a chain up a hill. You should at the very least take the CSS and HTML "courses" at w3schools.com http://www.w3schools.com/html/ .

Otherwise, you will make very little, if any, forward progress. This will sound "grouchy" and it is not meant as such, but this forum is for how to make SIGIL do something; it's not how to make ePUBs, or how to code books. You should take some of the more fundamental questions to the Workshop forum, which is aimed more to beginners; most of your questions are really utterly unrelated to Sigil itself.

Hitch
Hitch is offline   Reply With Quote
Old 11-02-2014, 10:11 PM   #7
rosshalde
Zealot
rosshalde began at the beginning.
 
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
Thanks Hitch. Yes, I know zero code. Thankfully, I have pieced together a nice looking ebook with lots of pics. That was thanks to the user guide, people generously helping me here and also the w3school you mentioned. That also helped with some css issues I was having. I will check the workshop forum as well.
rosshalde is offline   Reply With Quote
Old 11-03-2014, 04:05 PM   #8
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: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by rosshalde View Post
Thanks Hitch. Yes, I know zero code. Thankfully, I have pieced together a nice looking ebook with lots of pics. That was thanks to the user guide, people generously helping me here and also the w3school you mentioned. That also helped with some css issues I was having. I will check the workshop forum as well.
@Rosshalde:

Also, even though it's a bit out of date, you may wish to consider buying Liz Castro's excellent "ePUB: Straight to the Point." It's a very good guide to the inner workings fo ePUBs; what does what, for example, like "what's an OPF," versus "What's an NCX," and the like. Granted, it invests a LOT of time in InDesign, but you can ignore that entire bit, and go straight for the ePUB-stuff.

Hope that helps.
Hitch
Hitch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to adjust text from ebook mdamsma Kobo Reader 15 03-31-2013 07:17 PM
Touch Can't adjust line spacing biscuitbear Kobo Reader 10 02-17-2012 01:59 PM
css pseudo elements and adjacent combinators in extra css? ldolse Calibre 2 12-21-2010 05:09 PM
Could we adjust the time-out values? Darqref Feedback 9 01-04-2010 02:43 PM
possible to adjust margins? la3541 Bookeen 1 06-10-2008 01:02 AM


All times are GMT -4. The time now is 09:50 PM.


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