Prices formatting question

Learn / Forums / General InDesign Topics / Prices formatting question

Viewing 12 reply threads
  • Author
    Posts
    • #56924
      Roland
      Member

      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.

    • #56925

      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.)

    • #56926
      Roland
      Member

      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

    • #56927

      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.

      GREP styles for superscrcipt price

    • #56928
      Roland
      Member

      Sweet, that did the trick.

    • #62146
      nellbern
      Member

      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

    • #62150

      No expression needed, that would be

      1

      — and that's all!

    • #62153
      nellbern
      Member

      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. $119999

      5 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?
    • #62155

      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).

    • #62156
      nellbern
      Member

      Your suggestion is Brilliant! THANk U!

    • #88682

      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 ?

    • #92829

      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.

    • #92830

      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.

Viewing 12 reply threads
  • You must be logged in to reply to this topic.
>