Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-27-2018, 05:12 AM   #1
wlashack
Member
wlashack began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Mar 2018
Device: none
Question Working with text color in Sigil?

Hello,
I use Sigil to create my ebooks and there is one thing I do not know how to perform - I need to mark parts of text and assign it a color. Is there a better way to do it in Sigil than to edit the code every time manually? Thanks.
wlashack is offline   Reply With Quote
Old 03-27-2018, 07:08 AM   #2
Maui
Connoisseur
Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.Maui ought to be getting tired of karma fortunes by now.
 
Maui's Avatar
 
Posts: 57
Karma: 600000
Join Date: Jan 2018
Device: Galaxy Tab S2
Well just create a CSS Rule for this and embed the words in a span. To be honest i don't know what you mean with "every time in sigil", once you did it and saved it is persistent. Or do you mean you have always the same words to be colored?

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="../Styles/Style0001.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<p>test <span class="red">test</span> test</p>
</body>
</html>
with stylesheet STYLE0001.CSS

Code:
.red {
  color: #ff0000;
}

Last edited by Maui; 03-27-2018 at 07:12 AM.
Maui is offline   Reply With Quote
Advert
Old 03-27-2018, 07:43 AM   #3
Doitsu
Grand Sorcerer
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: 5,683
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
IMHO, the best way to do this is to create different styles and matching clips for each color:

1. Create a red style, as Maui suggested.
2. Open the Clip Editor (CTRL+ALT+C) and create a clip with Red as the name value and <span class="red">\1</span> as the text value. (\1 is a placeholder for selected text.)
3. Display the Clip Bar toolbar.
4. Select text and click the Red button in the Clip Bar.
Doitsu is offline   Reply With Quote
Old 03-27-2018, 08:24 AM   #4
wlashack
Member
wlashack began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Mar 2018
Device: none
THIS IS IT! Thanks a lot, CLIPS is the tool I was looking for.

Thanks both for advice and help!
wlashack is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Text color and background color almost the same larrymohr Kobo Tablets 2 11-20-2011 06:59 PM
Sigil 0.3.4 / Sigil 0.4.0 RC1 / Cover in Nook Color Bertrand Sigil 13 08-06-2011 04:06 AM
Different color for headings in Sigil Alda Sigil 1 01-24-2011 04:19 PM
Can Sigil be downloaded and used in the Nook Color? gatorman Sigil 1 01-08-2011 06:18 AM
Sigil 0.1.2 for Mac not working AprilHare Sigil 6 02-10-2010 09:25 AM


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


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