Sample screenshot please!
Regret (1) delay in answering due to preoccupation with getting book to press and (2) a little mystification how a screen-shot can help here.
The pages in question always consist of a two-page spread. A special TOC has been trained on a style appearing on some pages. When present in a spread, it is always on the left (odd) page of the spread. Although I could duplicate. That information on the RH page, it would look strange to have double entries in the TOC.
I can make a special style for those cases where an entry appears on the spread, and simply add it to the list of styles for that TOC. What I would like is for the TOC to indicate not just the page number (p.) where that style appears, but also to follow that with "-[p.+1]".
IOW, when the TOC generator encounters that style, I would like it to add a hyphen plus the number of the RH page, after the number of the LH page (where that style appears).
The reason why this would be so helpful is that, during the life of the document, changes in content frequently occur, resulting in changes in page numbers (although the spread-pairs always remain together). What I would like is for page numbers "p-p+1" to update automatically, every time the TOC is re-generated.
If I understand well, you have a TOC with some paras that could be defined by a specific para style so that you can treat them to finally have:
ss ssss ssss…………………26-27
Tu parles Français, n’est-çe pas?
Would you please tell me, ‘en-Anglais’, the name of the search-replace dialog in your latest screen-shot, and/or the steps I need to take, to get to it?
Salut vous 3,
Voici un lien pour récupérer cette petite pépite écrite en 2009 par Steve Wareham : NumberAdjuster.jsx
Peter Kahrel en a écrit une version différente mais l'intéressant, ici, est la possibilité d'inclure une regex.
Ce qui fait que ta question peut être traitée de façon très cool en une première regex + l'utilisation de ce script [tout est indiqué dans les captures d'écran].
OK, mille Pardons!
I was misled by the French syntax at first, but now “I think I’ve got it” (pace Henry Higgins): this is nothing but the search-and-replace dialog in different colors (mine is dark gray), as well as in French.
A more general question: could one of you please (point me to a place to) translate the meaning of \d+$ and $0-$0 within the context of this thread.
Believe that \d$ is somehow related to a special style and page number, and $0-$0 will create the desired p.-p.1, but not at all sure of myself here.
Or maybe this is something I should just try this on my document (after creating the special para. style) and see what happens?
IOW, I’m not quite certain how to apply this search-and-replace method to my use-case.
Finally, I used to know what “GREP” was, but that was long, long ago . . . (MSDOS, perhaps?).