|
|
#1 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 111
Karma: 998
Join Date: Apr 2010
Device: Nook
|
Sigil Proper Case Setting
I had found a free "cut and paste" utility that would allow me within Sigil to change text case. Now I cannot find it and I am hoping someone here would remember it. I am not familiar with Regex everyone mentions. I have a book with lot of subheadings that are in Upper case and I wish to change them to upper and lower. The utility I referenced above would cut the text via control -x and then put in back with control -v, but now in proper case. Anyone remember or see that utility? Tom |
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,840
Karma: 23400772
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
|
Not really Sigil related, but perhaps it's one of the ones listed in this Best Free Clipboard Replacement Utility review site?.
__________________
“Politics: A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage.” |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 111
Karma: 998
Join Date: Apr 2010
Device: Nook
|
Thank you. I saw those, though it didn't seem any automatically would change the case, but instead would use an editor. I did find one that works rather well. CaseChanger.
|
|
|
|
|
|
#4 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,579
Karma: 6598484
Join Date: Feb 2010
Location: USA, 33.938556° N, -117.271334° W
Device: Kindle 2, Kindle Keyboard, Kindle Fire 2nd Gen, & Kindle PaperWhite
|
Quote:
|
|
|
|
|
|
|
#5 |
|
Antique Newbie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 308
Karma: 1531006
Join Date: May 2011
Location: JAPAN (us expatriate)
Device: Sony PRS-TI
|
I have a little autohotkey script I made that works in most any text editor, including Sigil (not in Word or any other app that has that feature built-in).
I wrote it to do Case changes on selected text with double-tap of CapsLock Key, use hotkeys to add curly quotes around selected text, add certain code tags around selected text, double-right-click to copy, triple-right-click to paste. (lots more too). It runs in the background, accessed from the system tray. I've only ever used it in XP SP3, but if anybody is interested, I can upload it. I can even compile it into a tiny exe file, if that is preferred. |
|
|
|
|
|
#6 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,091
Karma: 2701341
Join Date: Dec 2010
Device: Kindle 3
|
The Sigil PCRE library already supports conversion to upper case and lower case with \U, \u, \L and \l back references.
For example: Find: <p>(.*?)</p> Replace: <p>\U\1\E</p> Before: Code:
<p>This is a test sentence.</p> Code:
<p>THIS IS A TEST SENTENCE.</p>
Replace: <h3>\1\L\2 Before: Code:
<h3>CHAPTER 1</h3> Code:
<h3>Chapter 1</h3>
Replace: <p>\u\1</p> Before: Code:
<p>this is a test sentence.</p> Code:
<p>This is a test sentence</p>
Find: ([[:upper:]]{2,}) Replace: <i>\L\1\E</i> Before: Code:
<p>This should be in ITALICS.</p> Code:
<p>This should be in <i>italics</i>.</p>
Last edited by Doitsu; 09-26-2012 at 04:03 AM. |
|
|
|
|
|
#7 |
|
Jr. - Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 2000170
Join Date: Aug 2010
Location: East Texas
Device: DXG, K3, Jetbook(+Lite), eSlick, Nook, PRS350, PB301+, PB360
|
|
|
|
|
|
|
#8 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,091
Karma: 2701341
Join Date: Dec 2010
Device: Kindle 3
|
|
|
|
|
|
|
#9 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,840
Karma: 23400772
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
|
Quote:
Notice how your closing </p> tag was also capitalized in the initial example?
__________________
“Politics: A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage.” |
|
|
|
|
|
|
#10 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,091
Karma: 2701341
Join Date: Dec 2010
Device: Kindle 3
|
Nice catch. I updated the replace string in the first example. And yes, I know that the second search string isn't textbook either, but I wanted to keep it simple.
Last edited by Doitsu; 05-23-2012 at 03:53 PM. |
|
|
|
|
|
#11 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,840
Karma: 23400772
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
|
Quote:
__________________
“Politics: A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage.” |
|
|
|
|
|
|
#12 | |
|
Jr. - Junior Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 533
Karma: 2000170
Join Date: Aug 2010
Location: East Texas
Device: DXG, K3, Jetbook(+Lite), eSlick, Nook, PRS350, PB301+, PB360
|
Quote:
Just used it to change chapter headers from "CHAPTER ONE / CHAPTER THIRTY-FOUR" to "Chapter One / Chapter Thirty-Four". Three step process but fast and easy. This is what you call instant gratification. ![]() Regards - John |
|
|
|
|
|
|
#13 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Apr 2013
Device: Android Smartphone
|
how do I capitalise more than two words in a string
I have a very long list of words that are all in capitals and it is necessary to change them to title case. For instance:
Code:
<li>DOG HOUSE</li> Code:
<li class="small-caps">Dog House</li> Code:
<li>([A-Z])([A-Z]*)</li> Code:
<li>DOG</li> <li>CAT</li> <li>BIRD</li> Code:
<li class="small-caps">\1\L\2</li> |
|
|
|
|
|
#14 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,113
Karma: 958803
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
|
You can try:
search: <li>(.*?)</li> replace: <li class="small-caps">\1</li>
__________________
Creator and maintainer of the e-Book Tools Word add-in. Creator and maintainer of the Clean HTML macro for MS Word. |
|
|
|
|
|
#15 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,091
Karma: 2701341
Join Date: Dec 2010
Device: Kindle 3
|
Quote:
@dwlamb: You could try the following: search: <li>([[:upper:]| ]+)</li> replace: <li>\L\1</li> This will change all upper case list items to lower case, and if you're using a Webkit based ebook app (Kindle, iBooks etc.), you could fix the capitalization issue by applying a text-transform style to the <li> element and/or add text-transform: capitalize; to your small-caps style. Code:
li {text-transform: capitalize; font-variant: small-caps;}
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sigil 0.4.1 : unwanted span added by Sigil | Bertrand | Sigil | 0 | 09-02-2011 05:28 AM |
| Sigil 0.3.4 / Sigil 0.4.0 RC1 / Cover in Nook Color | Bertrand | Sigil | 13 | 08-06-2011 04:06 AM |
| Sigil 0.3.4 / Problème CSS entre Sigil et iPad | Grivels | Software | 10 | 07-03-2011 09:06 AM |
| Proper Use of Kobo?? | strawfordt | Kobo Reader | 7 | 06-03-2010 11:40 PM |
| A proper introduction | Seabound | Introduce Yourself | 6 | 09-26-2008 02:24 AM |