Hi there,
I am wondering if there is a way to use GREP styles to apply brackets around a number. I am looking for it to be a grep style (within the paragraph style) and not a find and replace.
This will be used in an automated table of contents where the page number will be in brackets. (Is this something I can specify in TOC settings?)
Like such:
Contents
Chapter One [3]
Chapter Two [10]
Chapter Three [15]
Again, it needs to be part of the paragraph style (or TOC settigns) so the brackets are automatically applied to numbers when the associated paragraph style is used.
Hope someone can help me out!
Thanks!
Try this:-
Go to Edit-->Table of Cotents
in the Tabke of Content dialog box , click on "more options" to have the complete options (by default some are hidden)
In the Table of Content dialog box , look for "Between Entry and Number" , there would be text "^t" (basically this is the tab character) , after this type "[" , so the
complete text in "Between Entry and Number" will look like "^t["
Then Update your table of content , and every entry in your table of content will have the "[" infront of it....now it will much easire to run "GREP"
-----------------------------------------------------
Go to Edit-->Find/change
go to GREP tab
In "Find what" put:- \[\d+
In "Change to" :- $0]
now , click on the "find next' to see the entry of the Table of content and "Change' to change the entry to like [3], [4] etc
Drawback of this workflow:-- Every entry in the document will be serached not only the TOC hence if incase your document has entry of kind :- [356 , [34 , they will be searched and changed so be cautious for that
There is no particular advantage to adding the bracket before the number in the TOC since you have to run the find/change anyway.
You can search for \t(\d+) and chage to [$1] and get the same thing without adding the bracket first.
Also, there is no need to search the entire document. Set the scope of the search to Story and only the TOC will be affected (TOC must always be a self-contained story).
Think in this way, Glyphs is not defined set , every font has its on Glyph sets
and in that set every glyph has its own Unicode , which is Unique.....to include it in the GREP , we have to make the GREP font dependent ......and GREP will loose its basic functionality because it will not be able to serach the document just the fonts.
Hence including Glyphs in GREP will screw up the things
North America
Europe, Middle East and Africa
Asia Pacific