Forum Replies Created
-
AuthorPosts
-
John Tierney
MemberYou are right. So if you hide something the only way to get it back is to unhide everything that is hidden, including the things that have been hidden via the Layers palette. I would have thought that layers that were hidden would be different to items that were hidden via the Hide selection (command + 3) command. That’s a bit deadly.
December 13, 2017 at 7:12 pm in reply to: Using GREP in paragraph style to format only the first occurrence of a phrase #100326John Tierney
MemberI love your Grep Ninjitsu Graham. That is exactly what I was trying to get. Thanks very much.
December 12, 2017 at 8:35 pm in reply to: Using GREP in paragraph style to format only the first occurrence of a phrase #100304John Tierney
MemberThanks for your help but still doesn’t seem to be working. I tried those three GREP ideas but they don’t cover every instance. You see sometime it will say something like:
Product name and description $12.00 • Made from a durable unobtanium™ Metal Frame® • Lightweight and folds flat for easy storage • choose from jute or black polyester bag $120.00 per 10 • Made in China. $12.00 ea.
Sometimes:
Product name and description $12.00 • Made from a durable unobtanium™ Metal Frame® • Lightweight and folds flat for easy storage. $12.00.
There may be many different ways for a price to appear within the body of the paragraph after the first bullet point.
EDIT: And, yes, you are right of course about the formatting of the second price. That is exactly the point. I want to be able to format the second price if I want to but just leave it unformatted if I choose to. I want the second price to only format if it has the word “per” as part of the price string. Getting that bit was easy the problem was that it was formatting even without the word “per” in it. The price always formats just like it does in the first instance. I thought it would have been an easy thing to work out but clearly not.
December 12, 2017 at 7:21 pm in reply to: Using Object Styles and GREP to create an easier catalog price point. #100302John Tierney
MemberHere is the styling information (I hope it is understandable. The names of the styles are preceded by a bullet point)
PARAGRAPH STYLES
• RRP
Basic Character Formats
Font Style: Bold
Size: 8 pt
Leading: 9 pt
Tracking: -15Indent and Spacing
Alignment: Center
Right indent: 2mmCharacter Color: Paper
Underline Options
Weight: 9.5 pt
Offset: -.2.8 pt• $&¢1
Basic Character Formats
Font Style: Bold
Size: 28.9 pt
Leading: 28 pt
Tracking: -15GREP Style
Apply Style: $¢1 – $
To Text: \$Apply Style: $¢1 – $
To Text: \d\d(?=)Apply Style: Tighten
To Text: (?<=[\$\d+])Apply Style: ea
To Text: (?<=).+Apply Style: Character Style 1
To Text: \d\d$• Product Name
Basic Character Formats
Font Style: Regular
Size: 7 pt
Leading: 8 ptIndents and Spacing
Alignment: Center
Space Before: 1mm
• Unit price
Basic Character Formats
Font Style: Bold
Size: 8 pt
Leading: 9 ptIndents and Spacing
Alignment: Center
Space Before: 1mm
CHARACTER STYLES (Used int he GREP styling above)
• $&¢1 – $
Basic Character Formats
Size: 14.875 ptAdvanced Character Formats:
Baseline Shift: 9pt• Tighten
Basic Character Formats
Size: 21 pt
Tracking: -960• ea
Basic Character Formats
Size: 6.8 pt• Character Style 1
Basic Character Formats
Size: 6.8 ptNESTED PARAGRAPH STYLE ORDER (just in case it wasn’t apparent)
• RRP
• $&¢1
• Product Name
• Unit priceDecember 12, 2017 at 6:42 pm in reply to: Using GREP in paragraph style to format only the first occurrence of a phrase #100300John Tierney
Member“This example is not the same as your original request.”
Yes Graham, you are right, the example isn’t the same as my first post but I just tried to keep it as simple as possible. I thought there would be some obvious way of finding only the first price in a paragraph.
December 12, 2017 at 6:37 pm in reply to: Using GREP in paragraph style to format only the first occurrence of a phrase #100299John Tierney
MemberThat is the thing. That last price with the “ea” after it might be there, it might not. The “ea” might be there, it might not. I am trying to make the paragraph style and the GREP in particular as flexible as possible. Ideally being able limit the GREP style to the first occurrence of the “$” would be great.
December 12, 2017 at 4:07 pm in reply to: Using GREP in paragraph style to format only the first occurrence of a phrase #100290John Tierney
MemberI have tried those suggestions. They didn’t seem to work for me.
However, here is a link to an Imgur post that lays out the problem.
December 11, 2017 at 3:42 pm in reply to: Using GREP in paragraph style to format only the first occurrence of a phrase #100260John Tierney
MemberThanks for that. I am going to try those out and I will post a picture of the result on imgur.
December 7, 2017 at 9:45 pm in reply to: Using GREP in paragraph style to format only the first occurrence of a phrase #100177John Tierney
MemberIs there a way of posting an image into these forum discussions?
December 7, 2017 at 8:59 pm in reply to: Using GREP in paragraph style to format only the first occurrence of a phrase #100171John Tierney
MemberIs there a way of using a positive look behind to find the beginning of a paragraph and then any letter or space character in the text preceding the first price? The second price would have space characters, letter characters and digit characters preceding it. The first appearance of the “$” will never have digits preceding it. I am not sure how to write it. I have tried:
(?<=^[\u.]+) to find any letter or space after the beginning of the paragraph and before the first “$”.
I end up with
(?<=^[\u.]+)(\$[\d\.]+) which I thought would find only the first price of any paragraph.
But it doesn’t seem to work.
December 7, 2017 at 8:03 pm in reply to: Using GREP in paragraph style to format only the first occurrence of a phrase #100170John Tierney
MemberIs there a logic to the second instance of the price?
If there is you can create a second GREP
Eg
First – set the format for the first number
(\$\S+)
Then – set this one to the NORMAL format so this over rides the above format
(\$\S+ ea)Thanks for that suggestion Graham.
That is how I am getting around the problem at the moment but it just seems like an inelegant solution to me. I just thought there would be an easier way of doing it and that I must have been missing something that a GREP egg head would see straight away. There is no guarantee that there will always be a logic to the second price instance so there is the possibility that something could go wrong.
December 7, 2017 at 7:54 pm in reply to: Using GREP in paragraph style to format only the first occurrence of a phrase #100168John Tierney
MemberThanks for working through the problem for me. Looks like I am going to have to find another way of doing it.
John Tierney
MemberRight this is what I have done in the “Find and Replace” dialog.
Find:
(?<=\r\r)(^.{3,60}$)
This allows me to find a short paragraph which is preceded by two paragraph breaks (which is how I am indicating the start of a subhead in my raw text). In my style sheet box I have set “Body text” so it will ignore any heads which have set themselves automatically when I have used Object styling.
Replace:
$1
With style sheet set to “Subhead”.
I then go back at the end and replace my double paragraph breaks with single paragraph breaks.
Simples.
Thanks.
John Tierney
MemberThank you very much. I will give that a go.
John Tierney
MemberWorking perfectly now. Must have been doing something wrong with GREP order.
-
AuthorPosts
