Copy link to clipboard
Copied
Dear all,
I am working on a book which contains lots of table. I am looking for a Grep String for applying a specific stylesheet for tables using GREP Style please help me into this.
Copy link to clipboard
Copied
What do you mean with GREP styles for tables? GREP styles are part of paragraph styles. You can use Paragraph Styles as part of Cell Styles and those as part of table styles. All is available on your hand.
Copy link to clipboard
Copied
GREP uses a special text string for describing a search pattern, and GREP styles allow you to locate a pattern and change it. For example, you might need to locate each occurrence of 4 digits appearing at the beginning of a paragraph and then format them as red.
This won't help you format a table, although it could be used to format the text within the tables. What we think you might be thinking about (or perhaps should be thinking about) are nested styles. In InDesign you can set up a table style. Within the table style, you can nest cell styles to control the heading rows, the body rows, the left and the right columns. Within the cell styles you can next paragraph styles to format the paragraphs within the cells. Within paragraph styles you can nest character styles and/or GREP styles to format text within the paragraphs. Set up correctly, one can format an entire table with a single click.
Copy link to clipboard
Copied
It's like "Inception," but with styles!
Copy link to clipboard
Copied
exactly!
Copy link to clipboard
Copied
Can you give an example of exactly what you are trying to accomplish? Then we can help you discover the best solution for your problem. A screen shot is helpful.
Copy link to clipboard
Copied
I mean to say as we do find and replace for Paragraph and Character styles. can we apply same for Tables too.
The Part highlighted in Red is whats coming now, and what I am looking for is the part highlighted in Blues which i have created using table and cell style and want to same style all across the book using find and replace.
Copy link to clipboard
Copied
I am able to find tables using unicode <0016> but, I cant replace it, cause its deleting my table.
And i am unable to find it through Grep.
Copy link to clipboard
Copied
If you correctly define a "table style" you will call "X", using corresponding "cell styles", just do it with this one-line JS code, so just 1 click!
app.activeDocument.stories.everyItem().tables.everyItem().appliedTableStyle = "X"; // (^/)
[I've simplified!]
(^/)