03-14-2017, 01:52 PM | #1 |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
How to covert integers to roman numerals?
I just don't know what exactly I really need! Either a) a python code (to install in Regex-Function and convert with S&R any marked text) - here I may ask you how I specify/mark just these incidences: id="toc.html">1< or b) a 'normal' regex for to change integers to roman numerals. So the expressions look: Code:
<h4 class="roman" id="toc.html">1</h4>
Last edited by chaot; 03-14-2017 at 03:25 PM. Reason: trivia |
03-14-2017, 03:07 PM | #2 | |
Interested in the matter
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
jbacelar 25-12-14 in: MobileRead Forums > E-Book Software > Calibre > Editor > regex-function convert roman numerals.
Quote:
|
|
03-14-2017, 04:06 PM | #3 |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
Important is to follow the instructions precisely (also with regard to the use of parentheses).
To convert integer 1 to I the search expression is (in my example) (html">)(\d+)(</h4>) Reinforced by this sense of achievement I can go to bed now. very much! Last edited by chaot; 03-15-2017 at 11:30 AM. Reason: [strike] should be clear, it's code! |
03-14-2017, 06:06 PM | #4 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
When you need to count in Roman numerals the following may help.
<style> ol {list-style-type: upper-roman;} ol ol {list-style-type: upper-alpha;} ol ol ol {list-style-type: lower-roman;} ol ol ol ol {list-style-type: lower-alpha;} ol ol ol ol ol {list-style-type: decimal;} ol ol ol ol ol ol {list-style-type: lower-alpha;} </style> Dale Last edited by DaleDe; 03-14-2017 at 06:10 PM. |
03-17-2017, 01:21 PM | #5 |
Head of lunatic asylum
Posts: 349
Karma: 77620
Join Date: Jun 2012
Location: UTC +1
Device: Tolino Vision 3HD
|
@DaleDe Advantageously to know what all is possible.
BTW: "list-style" is shortcut for "list-style-type"! HTML Spoiler:
CSS (item + 4 subitems) Spoiler:
List (test) Last edited by chaot; 03-17-2017 at 01:29 PM. Reason: updating code & image |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using Roman Numerals in Chapter Titles | navyo | Editor | 5 | 06-30-2016 06:24 AM |
Chapter detection for roman numerals?? | g25 | Conversion | 6 | 09-08-2015 10:28 AM |
Disabling roman numerals in series display? | MelBr | Calibre | 2 | 09-19-2013 10:49 PM |
Convert Roman numerals to Arabic? | Peter W | Sigil | 2 | 04-09-2012 11:55 AM |
regex search for roman numerals | Blurr | Calibre | 2 | 12-16-2009 05:55 PM |