Prices formatting question
Learn / Forums / General InDesign Topics / Prices formatting question
- This topic has 12 replies, 5 voices, and was last updated 7 years, 1 month ago by Niels JÌürgen Pedersen.
-
AuthorPosts
-
-
September 5, 2010 at 11:55 am #56924RolandMember
Is there any way to auto format prices so the cents value is located above the decimal indicator? So € 5,99 would have the 99 smaller and off to the left so it's above the comma rather than just superscripted.
-
September 5, 2010 at 1:18 pm #56925Theunis De JongMember
https://carijansen.com/2009/07/…..9/tip-091/ !
(I must admit I'm not sure about the 'above the comma' part — perhaps you need an additional GREP that applies a huge negative kern over a comma which has a digit to its left and no more than two at its right.)
-
September 5, 2010 at 1:28 pm #56926RolandMember
I have the “custom superscripted” numbers, have had that pretty much since GREP styles were added to InDesign, but getting them above the comma is what I can't get. I'm looking for a setup like they use in the folders for Makro. An example can be found here: https://www.metro-mcc.nl/conten…..nu_No=1304
-
September 6, 2010 at 1:55 am #56927Theunis De JongMember
Yeah, that's exactly what I meant — although I shouldn't have said 'kerning', because you cannot get that (easily) into a Character Style. It's totally do-able with some negative tracking, though, and with the same net effect.
Apply a character style with a huge value (about -350) to the following
.(?=ddb)The tracking value depends on where you want the cents to line up, so first create and apply the style, then change the amount of tracking in the Character Style with Preview enabled.
-
September 6, 2010 at 3:19 am #56928RolandMember
Sweet, that did the trick.
-
May 7, 2012 at 2:27 pm #62146nellbernMember
My question is related to this post but not exactly.
I'm using Helvetiva Neue 75 bold for the prices. The $ symbol needs to be superscritpt & the last digits of a price (would like to insert an image but I dont have an URL). Also I don't the like the spacing (tracking) before or after that Helvetica leaves when a number “1” is used. So I created 2 different character styles:
- The $ symbol (superscritpt)
- If a number “1” used it will adjust the tracking to minus -50
Example $1999 or $11199. The $ symbol & the last 2 digits need to be superscritpt. There is no . (periods) in the price
I'm applying the following grep style in the paragraph style:
$ will apply the character style called $symbol (which is superscritpt)
I dont know what is the xpresion to find any instances number “1” and adjust the tracking to minus -50 & how to superscritpt the last 2 digits of the price.
I tried d{1} to find any instances of the number “1” but it is not the correct one. Grep is really powerfull but only when you know what xpresion to use.
Thanks
-
May 8, 2012 at 1:32 am #62150Theunis De JongMember
No expression needed, that would be
1
— and that's all!
-
May 8, 2012 at 9:53 am #62153nellbernMember
thanks Jongware but how do I superscritpt the last 2 digits of the price if there no decimal point to identified them. The prices info is poured from a database system & the designers have to manually superscript the cents amount based information provided by the vendors.
Do I have to add a period to the price so grep can identified everything after the decimal point?
Or I was thinking something like:
after $ symbol is there is 6 digits then superscript the last 2. $1199995 digits then superscript the last 2. $50299
4 digits then superscript the last 2. $3150
3 digits then superscript the last 2. $678
(The digit amount is never going to be more than 6)Is that possible? -
May 8, 2012 at 10:17 am #62155Theunis De JongMember
Look at it from another angle — or rather, direction. It's always the last two digits!
Try this:
dd(?!d)
which will match two digits and which are not followed by another digit (the test in parentheses).
-
May 8, 2012 at 10:49 am #62156nellbernMember
Your suggestion is Brilliant! THANk U!
-
September 27, 2016 at 9:06 am #88682Sebastien GauthierMember
Bringing this back to life !
Let’s say I also have other numbers on page that would match \d\d(?!\d) and they shouldn’t change.
I try making sure there is a $ sign before the digit sequence as such (?<=\$\d)\d\d(?!\d)Now it works for $2<sup>99</sup> but for some reason I don’t understand adding (one or more) (?<=\$\d+)\d\d(?!\d) won’t get anything… I would have thought $2<sup>99</sup> and $20<sup>99</sup> would have been caught.
Any idea ?
-
March 13, 2017 at 8:00 am #92829Niels JÌürgen PedersenParticipant
Hi – i have a pris on a seperate line. I want the last two digits to have a caracter style, but how do i do that?? I tryed to insert the grep style into my Paragraf Style for the price, but nothing happends.
I only need to open my Patragraf Style, go to “GREP style”, and insert “dd(?!d)” in the field
“Apply (My caracter Style)”
“To Text: dd(?!d).. and then it should work, or ….. ? But it dont.
-
March 13, 2017 at 8:00 am #92830Niels JÌürgen PedersenParticipant
Hi – i have a pris on a seperate line. I want the last two digits to have a caracter style, but how do i do that?? I tryed to insert the grep style into my Paragraf Style for the price, but nothing happends.
I only need to open my Paragraf Style, go to “GREP style”, and insert “dd(?!d)” in the field
“Apply (My caracter Style)”
“To Text: dd(?!d).. and then it should work, or ….. ? But it dont.
-
-
AuthorPosts
- You must be logged in to reply to this topic.