Jump to content

Fractions in a text field?


This topic is 6447 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Can someone tell me how to enter fractions in a text field so that they look like actual fractions? I have address data (e.g. 1234 1/2 1st St.) that looks awkward that way - it would be much better if the numerrator were superscript and the denominator were subscript. Is there a way to do this?

TIA,

John Chamberlain

Link to comment
Share on other sites

Hi John, I've attached a file I use called Fonts. It holds wingdings and such so I can quickly view the symbols I'm looking for. I added 3 symbols to the end from character map - 1/4, 1/2 and 3/4.

I added a text field which converts to those symbols. Type anything into the text field to see the conversion work. However, any other fractions and you might be in trouble ... I can't seem to find any more other than these three so 1/16 will remain 1/16. Look at the auto-enter (replace) on field called text.

Copying these symbols from Character Map wasn't a problem but I can't figure out how to specify within a calculation the font equiv to use to produce them on the fly. Wingdings is one thing ... character map doesn't appear to follow those same rules. I have no keystroke which can produce them. But storing a copy of them within the calc or a field appears to work just fine.

fonts.zip

Link to comment
Share on other sites

I like this approach as well, Bob. I could have just posted the auto-enter calc instead of my file but I wasn't sure how the symbols would translate. There must be an easier way to utilize character map (do Macs even have character map - they probably have something better)?

I plan on pulling these characters into my file as well. We should be able to specify the font name/font script right within a Textfont calc but I can't see how it can be done. :wink2:

Character Map says if you know the Unicode equiv, "then, with NUM LOCK on, hold down the ALT key while using the number pad keys to type the Unicode character value. " But I'm unsure that can still help within a calc.

Link to comment
Share on other sites

I just wanted to see if this would read on the forum, and posted it in error. These are fonts characters for the Mac.

1 ⅓ 2 ⅔ 3 ⅕ 4 ⅖ 5 ⅗ 6 ⅘ 7 ⅙ 8 ⅚ 9 ⅛ 10 ⅜ 11 ⅝ 12 ⅞

There were some files on fmfiles.com that show how to do this, if I remember them right, you had to have a separate calculation for each part of the fraction.

HTH

Lee

[color:red]p.s.

They show they are using v 5.

Edited by Guest
p.s.
Link to comment
Share on other sites

vs. 5 yikes, thanks Lee! Forget the auto-enter (replace) or text formatting functions then - manually changing the data is your only option (as Bob's demo indicates). And by using (however Lee got the additional fractions), create more buttons if you wish for the other fractions.

Link to comment
Share on other sites

Oops, I didn't notice the fp5 bit either. So, that makes it considerably more difficult. fp5 is not unicode compatible so there are no fraction characters, and to create them requires the use of superscript and subscript styles which can't be inserted by calculation.

Here's an fp5 version of the button idea. Unfortunately, it will always insert at the end of the current text regardless of where the cursor is. Don't know how well it will work on Windows because it uses the fraction slash rather than the regular slash, which may be a Mac only thing.

InsertFraction.fp5.zip

Link to comment
Share on other sites

This topic is 6447 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.