03-15-2017, 12:50 PM | #1 |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
How to convert ''Headings'' to ''HEADINGS''?
Yesterday you helped me to solve a remotely similar issue! But try&error (with superficial knowledge) isn't the right approach to something serious like that, I think! How to convert 'fully wrapped' headings to upper case? Please consider the richness of German: that is the existence of äöüß (apart from »«!? plus digits). Code:
<h3 id="uoiDbz7uDaeECwRVEqYwYE5"><a href="Inhalt.html#Die 9 »weißen« Städte!">Die 9 »weißen« Städte!»</a></h3>
Last edited by chaot; 03-16-2017 at 11:11 AM. Reason: add: Wanted |
03-15-2017, 01:35 PM | #2 |
Interested in the matter
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
Using the predefined function (in the editor of Calibre): Upper-case text (ignore tags)
Search: <h3.+</h3> Last edited by jbacelar; 03-15-2017 at 01:40 PM. |
03-15-2017, 01:35 PM | #3 |
A Hairy Wizard
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
try a search and replace:
search:<h3(.*?)><a(.*?)>(.*?)</a></h3> replace:<h3\1><a\2>\U\3\E</a></h3> |
03-15-2017, 06:37 PM | #4 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
You can also do this via css without changing the actual xhtml:
h3 { text-transform: uppercase; } |
03-15-2017, 06:57 PM | #5 |
Interested in the matter
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
|
03-16-2017, 12:14 PM | #6 | ||
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Quote:
Quote:
error: incomplete escape \U at position 14 Spoiler:
@jhowell & @ jbacelar: The non-rendering of text-transform I experienced already practically & unpleasantly enough. Therefore I look now for other solutions. Issues removed Off topic!
Last edited by chaot; 03-17-2017 at 03:05 PM. Reason: add: :) correcting code: ">Immer seltener... / Issues removed/Off topic! |
||
03-16-2017, 12:58 PM | #7 |
Interested in the matter
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
With your sample code:
Code:
<h3 id="uCmGQHCT4I2zAoOwD2nYQT3"><a href="Inhalt.html#Immer seltener werden in dieser Welt ... (undat.)>Immer seltener werden in dieser Welt ...</a></h3> <h3.+</h3> And Regex-Function: Upper-case text (ignore tags) I get: Code:
<h3 id="uCmGQHCT4I2zAoOwD2nYQT3"><a href="Inhalt.html#Immer seltener werden in dieser Welt ... (undat.)>IMMER SELTENER WERDEN IN DIESER WELT ...</a></h3> |
03-16-2017, 01:23 PM | #8 |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Funny! Here not. As I described: Find marks & Replace deletes the whole heading.
|
03-16-2017, 01:24 PM | #9 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
With Turtle91's regex expressions you'll end up with the following in Sigil: Code:
<h3 id="uoiDbz7uDaeECwRVEqYwYE5"><a href="Inhalt.html#Die 9 »weißen« Städte!">DIE 9 »WEISSEN« STÄDTE!»</a></h3> BTW, your fragment URL (Inhalt.html#Die 9 »weißen« Städte!) is invalid because it contains spaces and non-ASCII characters. Last edited by Doitsu; 03-16-2017 at 06:38 PM. |
|
03-16-2017, 01:38 PM | #10 | ||
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Quote:
I will not do that again. It's silly! Quote:
OK! I will now try to load the book in sigil to let the capitalisation done there. Last edited by chaot; 03-16-2017 at 01:45 PM. Reason: result→by-product |
||
03-16-2017, 01:51 PM | #11 |
Interested in the matter
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
Does your search box have the same settings as the image?
|
03-16-2017, 02:17 PM | #12 |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
@Doitsu Quick and easy! My first attempt ever (or seriosly nearly ever) to sigil. I got it.
@Turtle91 regex (#3) functions (in sigil). @jbacelar Sorry! That ... weisse Städte ... example doesn't exist anymore. It's already configured. Please let me give you two ''real'' examples (which doesn't function → as described in #6). Code:
<h3 id="uocwg8XafqRu2zVi8aZ2TH6">Rechts und Links</h3> Code:
<h3 id="uwSzW8DWUPEK6RzzmX5nCi4"><a href="Inhalt.html#u2BtpeVxwIEyIFtCSZ7oQU6">Golkonda</a></h3> Last edited by chaot; 03-17-2017 at 11:38 AM. Reason: add: → as described in #6 add: in (sigil) |
03-16-2017, 02:43 PM | #13 |
Interested in the matter
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
Luck and to the bull!
|
03-16-2017, 03:32 PM | #14 |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Last edited by chaot; 03-16-2017 at 03:38 PM. Reason: upgrading image |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Headings Hyperlinked? | PhotonJohn | ePub | 5 | 04-05-2013 10:18 AM |
Headings going awry | MikeMJ | Conversion | 7 | 04-26-2012 04:19 PM |
Chapter Headings | Paxman53 | Conversion | 3 | 10-12-2011 12:31 PM |
Why H1 and H2 Chapter Headings? | Ransom | Calibre | 11 | 08-10-2011 04:29 PM |
Different font for headings | bremler | ePub | 4 | 03-11-2010 06:03 AM |