1 person found this helpful
Styles cannot add or remove characters, only change the formatting. You need to use Find/Change instead.
The following GREP query should work:
Find: (?<=\d)<your space character here> (you can use \s instead of the particualr space you have, but it will find all whitespace, and that may not be as useful)
If the space in your text is an ordinary space, hit the spacebar to add it inthe find field, or use the code for any of the various fixed-width or non-breaking spaces (you'll find them in the dropdown next to the find field). Don't forget to set the tab stop in the style you apply to the listings.
I changed the paragraph style to remove the tab so that the coding is ^1.^#^. and ^1.^2.^#^. and so on. I then searched using your instructions:
And it worked. Is there a way that I can write that into a GREP style? Or are GREP styles like para styles that can only apply formatting?
The reason I ask is that as the "Tab" is inserted some of my entries in the TOC change from one line to two, and this affects the page numbers within the TOC but when I 'update' the TOC the tabs disappear and the entires revert back to one line.
Message was edited by: HSGROW_HK
GREP styles simply apply a character style to the text that matches the query string, they can't insert or remove characters.
Thanks for that. Such a pity that it cannot be acheived by a style. Your solution is the next best thing though! Thanks.
For the blue example inserting an em-space seems more useful than a tab...
Hi F vd Geest,
You are right, an em-dash would provide a certain consistency of space between the numbers and the text following, however when the second line follows it auto-tabs to a certain position see example in text below.
1. Heading (Level 1) is used as an example
of how one should use a first line heading
Also the alignment changes with the addition of double digit numbers i.e. 1.10 or 1.1.17 Any Ideas on how to provide consistency without tabs for this? As I said, I am a bit out of my depth as a novice.