Jump to content

Use of exposant


Olivier

Recommended Posts

Hi friends,

I need to create a rule to have the € symbol as an exposant and the cents just below, like in the screenshot attached.

http://forums.printable.com/attachment.php?attachmentid=980&stc=1&d=1392991025

How can we do that using a rule in FP 9.1 ?

Thanks for your help !

Olivier from France.

Capturede769cran2014-02-21a76810_21_40.png.07cc727e7c39a376f43aedf5eaba0f9b.png

Link to comment
Share on other sites

There are a few ways you can accomplish this. Probably the simplest is to use multiple text frames. The Euro symbol can be in a frame by itself. Then the numbers can either be in one or two frames. To put them in a single frame, you can do something like this:

var price = StringToNumber(Field("price"));
return '<z newsize=20>' + Math.floor(price) + '<z newsize=10>' +
       String(Round(price - Math.floor(price), 2)).replace(/^0/,'');

And right-align that in the frame. You will need to modify the numbers in the <z newsize=***> tags to get the point sizes you want.

 

P.S. There's no such word "exposant" in English. I think the equivalent English word is "exponent," although in typographic terms, I would call this superscript.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...