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 03-30-2014, 01:11 PM   #1
kuvera
Junior Member
kuvera began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2012
Device: Nook Simple Touch
Adding class attributes in bulk

Hi,

If I want to apply styles to consecutive paragraphs, how do I do that without going to code editor and adding/editing the class attribute to each one of them manually? Is there a way to select a range of tags/paragraphs and select a style to add?

thanks,
Laszlo
kuvera is offline   Reply With Quote
Old 03-30-2014, 05:17 PM   #2
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,086
Karma: 1444487
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
Put the styles you want in a .style1 statement for paragraph 1 and .style2 statement for paragraph 2 in the stylesheet. Then <p class="style1"> or <p style="style2"> at the head of each paragraph, or have I missed something?

These are two items I use for two types of captions:

.capt {
margin-left: 15%;
margin-right: 15%;
font-size: 90%;
text-align: justify;
text-indent: 0;
font-weight: bold;
}
.smcapt {
margin-left: 15%;
margin-right: 15%;
font-size: 90%;
text-align: center;
text-indent: 0;
font-weight: bold;
}

Last edited by mrmikel; 03-30-2014 at 07:13 PM.
mrmikel is offline   Reply With Quote
 
Advertisement
Old 03-30-2014, 07:10 PM   #3
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 2,049
Karma: 4836606
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by kuvera View Post
Is there a way to select a range of tags/paragraphs and select a style to add?
To apply paragraph styles to a limited number of paragraphs:

1. Press F2 to switch to Code View mode.
2. Select a couple of paragraphs with the mouse.
3. Right-click the selected paragraphs and select Mark Selected Text.
4. Search and replace the initial paragraph tag. For example:
Find:<p>
Replace:<p class="myclass">

You can also change the style of a number of paragraphs, by inserting a <div class="myclass"> tag before the first paragraph and a </div> after the last paragrah.

You'll obviously need to define myclass in a stylesheet and link it to the .html file(s).
Doitsu is offline   Reply With Quote
Old 03-31-2014, 02:52 AM   #4
kuvera
Junior Member
kuvera began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2012
Device: Nook Simple Touch
Thank you, guys.
So it's html editing only. I was hoping for GUI support for what you achieve with addClass in jQuery, but on static html text.
kuvera is offline   Reply With Quote
Old 03-31-2014, 07:36 AM   #5
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,086
Karma: 1444487
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
The point at which to apply styling, which has priority, etc I am sure created more issues than John wanted to deal with. If it happened to work the way you wanted, I am sure there would be another faction asserting how nonsensical it was!
mrmikel 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
Problem: Sigil Auto-adding Attributes to <p>'s drummerboy Sigil 7 08-19-2012 11:50 AM
Bulk Metadata + Adding Covers Josieb1 Library Management 2 07-31-2012 01:46 PM
bulk convert without adding to library or resorting my books blort Conversion 2 01-24-2012 02:10 AM
Possible to change author name format when bulk adding or importing? himitsuhieki Library Management 6 08-19-2011 10:58 PM
Adding in Bulk to Library nikoleinox Library Management 3 06-13-2011 12:50 PM


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


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