|
|
#31 |
|
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,266
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
![]() The ability to search "just down" or "just up" is basically searching without wrapping. And as it happens the next version will have a wrap/no-wrap option for Find & Replace. There isn't any way to do counters in regex that I know of - but if there is I'd be glad to here about it. I've been wondering about a special search tool that could handle counters - but haven't worked out exactly what to do. Having specific examples of where something like this would be useful starting place. Usually the problem is that the counter needs to be updated identically in more than one place. I doubt it would do Roman numerals though ![]() But what are you actually doing with the changes. Just updating the heading ids? Updating the ids to match the heading text or title. Do you have some specific before and after examples?
__________________
See the Sigil User Guide and its tutorials for details about Sigil. |
|
|
|
|
|
#32 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 614
Karma: 2264556
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
|
Great news on the wrap/no wrap!
I suppose I could make a REALLY LONG saved group for the roman numerals.... ![]() I was inserting id's to match the heading text in a condensed format. "Ch_1" for "Chapter 1", "Pt_2" for "Part 2", etc. I thought that would provide a more intuitive meaning than a generic sequence number when I review links - especially in other files. example: original headings <h2>Part 1</h2> <h3>1</h3> <h3>2</h3> <h3>3</h3> <h2>Part 2</h2> <h3>1</h3> <h3>2</h3> <h3>3</h3> yadda, yadda Replace Part headers: Find <h2>Part (.*?)</h2> Replace <h2 id="Pt_\1">Part \1</h2> Replace Chapter headers: Find <h3>(.*?)</h3> Replace <h3 id="Ch_\1">\1</h3> gives <h2 id="Pt_1">Part 1</h2> <h3 id="Ch_3">Chapter 3</h3> This results in duplicate Chapter id's so I go to the beginning of each part and replace to the end (without wrap): Find id="Ch_(.*?)"> Replace "Ch_1-\1"> /* which changes ALL the chapter headings but still have duplicates. Then go to part 2 Find id="Ch_1-(.*?)"> Replace "Ch_2-\1"> /* which changes ALL the chapter remaining headings EXCEPT part 1 Then go to part 3 Find id="Ch_2-(.*?)"> Replace "Ch_3-\1"> /* which changes ALL the chapter remaining headings EXCEPT part 1 and part 2 etc, until the end of the file |
|
|
|
|
Enthusiast
|
|
|
|
#33 | |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,906
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
Quote:
Kind: Application (Intel) Size: 77.7MB [...] Version: 0.6.2
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Books I've read in 2013, 2012, 2011, 2010 |
|
|
|
|
|
|
#34 | |
|
eBook FANatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,044
Karma: 13086446
Join Date: Apr 2008
Location: Alabama, USA
Device: HP ipac RX5915 Wife's Kindle
|
Quote:
My editor (epp) has a counter which will number a list sequentially. <h2 id="Ch_%MATCH%"> Perhaps there is something similar in Sigil.
__________________
Charlie 'Bene legere saecla vincere'. 'To read well is to master the ages' [Prof. Issac Flagg] |
|
|
|
|
|
|
#35 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34,660
Karma: 14439052
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
|
Quote:
__________________
Last edited by Jellby; 02-01-2013 at 08:21 AM. Reason: fixed markup |
|
|
|
|
|
|
#36 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 614
Karma: 2264556
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
|
|
|
|
|
|
|
#37 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 614
Karma: 2264556
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
|
Doesn't Sigil automatically generate a sequenced id for any TOC entries that DON'T have an id??
|
|
|
|
|
|
#38 | |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,955
Karma: 2574555
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
Quote:
I use 1 chapter per file for my final save
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
|
|
|
|
|
|
|
#39 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 34,660
Karma: 14439052
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
|
I remove those too.
__________________
|
|
|
|
|
|
#40 |
|
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,266
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Interesting. Since Generate TOC points to the filename for headings near the top of a file it does not actually use the id in the TOC.
So there is no reason why we can't skip creating a Sigil-generating id for the heading if its not used by the TOC because its at the top of the file. We already skip creating an id if a heading is marked as not included in the TOC. And if you do want an id for the heading, you can always manually enter one. Its only the Sigil-generated ids that get removed when they aren't used.
__________________
See the Sigil User Guide and its tutorials for details about Sigil. |
|
|
|
|
|
#41 | |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 614
Karma: 2264556
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
|
I hadn't really thought of not putting id's in my chapter headers. I suppose that comes from making single page HTML For the last several years - its become a habit. But you are right. It certainly isn't needed.
Quote:
|
|
|
|
|
|
|
#42 | |
|
Connoisseur
![]() Posts: 88
Karma: 10
Join Date: Dec 2012
Device: Kindle
|
TOC / id=
Quote:
Last edited by Jellby; 02-01-2013 at 08:22 AM. Reason: fixed markup |
|
|
|
|
|
|
#43 | |
|
Staff to 4 Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,955
Karma: 2574555
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2,Black Astak PEz, K4NT(now Wifes)
|
Quote:
If you use id's, then use them all places. I know I when my REGEX fails to find some headings, only to discover some have a different orginazation: IN THE SAME BOOK.And since some folk like to 'Max out' file size before splitting: some will have many chapters, not just one
__________________
Using: Ubuntu(32 bit):Oneric,Precise and XPpro SP3, W7HP(64)- - Libre Office w/Writer2EPUB
|
|
|
|
|
|
|
#44 | |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 614
Karma: 2264556
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
|
Quote:
The link for going to the beginning of my Ch_4.html file is: href="Ch_4.html" If you had an id="Ch_4" for the header (or if you want to go to a sub-heading somewhere within the file) that link would look like href="Ch_4.html#Ch_4" or href="Ch_4.html#sub-head_3" Last edited by Jellby; 02-01-2013 at 08:22 AM. Reason: fixed markup |
|
|
|
|
|
|
#45 | |
|
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,266
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Quote:
Of course, if you add ids to any headings manually, then they'll still be there. And now if you want to link directly to the ids, you can just use the new Edit TOC function.
__________________
See the Sigil User Guide and its tutorials for details about Sigil. |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sigil 0.6.0 Released | user_none | Sigil | 93 | 11-24-2012 06:50 PM |
| Sigil 0.5.3 Released | user_none | Sigil | 85 | 05-13-2012 05:29 AM |
| Sigil 0.4.2 Released | user_none | Sigil | 41 | 10-26-2011 06:03 AM |
| Sigil 0.4.1 Released | user_none | Sigil | 50 | 09-01-2011 04:58 PM |
| Sigil 0.4.0 and FlightCrew 0.7.2 Released | user_none | Sigil | 13 | 08-23-2011 02:18 PM |