Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #71659

Re: Searching for "fraction slash"

From Your Name <YourName@YourISP.com>
Newsgroups comp.sys.mac.system
Subject Re: Searching for "fraction slash"
Date 2015-03-20 18:22 +1200
Organization Aioe.org NNTP Server
Message-ID <200320151822558412%YourName@YourISP.com> (permalink)
References <isw-D2F299.20370819032015@news-roam.garlic.com>

Show all headers | View raw


In article <isw-D2F299.20370819032015@news-roam.garlic.com>, isw
<isw@witzend.com> wrote:
> 
> I collect recipes. I use a database app (MacGourmet) to index them, and 
> for that and other reasons, I like them to be very regular in 
> appearance. (Do you have any idea how many different ways there are to 
> abbreviate "tablespoons"?) I have a nifty AppleScript that runs through 
> a recipe and does a whole lot of substitutions to regularize things.
> 
> Of course, recipe amounts frequently include fractions -- "1/2 tsp.", 
> for example. Some of the recipes -- usually copied from web pages, where 
> they look just fine -- have a weird appearance when opened in something 
> like TextEdit where the three glyphs of the fraction run together and 
> overlap.
> 
> TextEdit displays the fractions as overlapping, but it is not possible 
> to select only the slash -- if you put the cursor over the slash of 
> "1/2" and move it one way you select the "1", and the other you select 
> the "2", but you can't highlight only the slash. Odd.
> 
> I opened one of the recipes with a hex editor, and found that the 
> location of the slash contains "\u8260 ". A search revealed that is 
> "&frasl" in HTML, which is evidently a "fraction slash". The Mac's 
> Character Viewer thinks that "fraction slash" is U+0066, for what that 
> is worth.
> 
> So all I want to do is find the thing so it can be replaced by a 
> "regular" slash, but I need to know what to tell the AppleScript to look 
> for, and I don't know how to do that.
> 
> Suggestions?

What happens if you select and then delete both the "1" and "2" ...
does the "/" stay behind?? If it does you may be able to then copy it
to paste into the AppleScript as what to find and replace with a normal
one.

If not, then you could simply copy the whole thing and find-replace it
with a normal version, although you then have to replace "1/2", "1/3",
1/4", "3/4", etc.


Another option might be to not copy the recipe. Instead use the
browser's Save As function. Firefox (or at least my ancient version)
has the option to save the page as plain text. That may give you normal
fractions or it may give you empty spaces / nonsense characters ...
although you will get a load of extra rubbish as well from the rest of
the webpage.


You could probably create a Terminal script to replace everything, but
it's not as easy as AppleScript if you don't already know what you're
doing.

Back to comp.sys.mac.system | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Searching for "fraction slash" isw <isw@witzend.com> - 2015-03-19 20:37 -0700
  Re: Searching for "fraction slash" Your Name <YourName@YourISP.com> - 2015-03-20 18:22 +1200
    Re: Searching for "fraction slash" isw <isw@witzend.com> - 2015-03-20 10:59 -0700
  Re: Searching for "fraction slash" Savageduck <savageduck1@{REMOVESPAM}me.com> - 2015-03-19 22:36 -0700
  Re: Searching for "fraction slash" Jolly Roger <jollyroger@pobox.com> - 2015-03-20 13:48 +0000
    Re: Searching for "fraction slash" -- solved isw <isw@witzend.com> - 2015-03-20 15:08 -0700
      Re: Searching for "fraction slash" -- solved Savageduck <savageduck1@{REMOVESPAM}me.com> - 2015-03-20 16:40 -0700
        Re: Searching for "fraction slash" -- solved Your Name <YourName@YourISP.com> - 2015-03-21 13:19 +1200
          Re: Searching for "fraction slash" -- solved Savageduck <savageduck1@{REMOVESPAM}me.com> - 2015-03-20 18:08 -0700
        Re: Searching for "fraction slash" -- solved isw <isw@witzend.com> - 2015-03-20 20:21 -0700
      Re: Searching for "fraction slash" -- solved Jolly Roger <jollyroger@pobox.com> - 2015-03-21 00:03 +0000
        Re: Searching for "fraction slash" -- solved isw <isw@witzend.com> - 2015-03-20 20:20 -0700
          Re: Searching for "fraction slash" -- solved Jolly Roger <jollyroger@pobox.com> - 2015-03-21 12:48 +0000
            Re: Searching for "fraction slash" -- solved isw <isw@witzend.com> - 2015-03-21 21:47 -0700
              Re: Searching for "fraction slash" -- solved Your Name <YourName@YourISP.com> - 2015-03-22 18:00 +1200
              Re: Searching for "fraction slash" -- solved Jolly Roger <jollyroger@pobox.com> - 2015-03-22 12:15 +0000
                Re: Searching for "fraction slash" -- solved Michelle Steiner <michelle@michelle.org> - 2015-03-22 08:39 -0700
                Re: Searching for "fraction slash" -- solved Jolly Roger <jollyroger@pobox.com> - 2015-03-22 15:47 +0000
                Re: Searching for "fraction slash" -- solved Lewis <g.kreme@gmail.com.dontsendmecopies> - 2015-03-23 02:54 +0000
                Re: Searching for "fraction slash" -- solved dempson@actrix.gen.nz (David Empson) - 2015-03-23 16:51 +1300
                Re: Searching for "fraction slash" -- solved Michelle Steiner <michelle@michelle.org> - 2015-03-22 21:42 -0700
                Re: Searching for "fraction slash" -- solved Jolly Roger <jollyroger@pobox.com> - 2015-03-23 13:25 +0000
                Re: Searching for "fraction slash" -- solved Jolly Roger <jollyroger@pobox.com> - 2015-03-23 13:23 +0000
                Re: Searching for "fraction slash" -- solved isw <isw@witzend.com> - 2015-03-22 21:27 -0700
      Re: Searching for "fraction slash" -- solved Your Name <YourName@YourISP.com> - 2015-03-21 13:19 +1200
        Re: Searching for "fraction slash" -- solved isw <isw@witzend.com> - 2015-03-20 20:16 -0700
          Re: Searching for "fraction slash" -- solved Jolly Roger <jollyroger@pobox.com> - 2015-03-21 12:40 +0000
          Re: Searching for "fraction slash" -- solved Your Name <YourName@YourISP.com> - 2015-03-22 09:57 +1200
            Re: Searching for "fraction slash" -- solved isw <isw@witzend.com> - 2015-03-21 22:09 -0700
              Re: Searching for "fraction slash" -- solved Your Name <YourName@YourISP.com> - 2015-03-22 19:19 +1200

csiph-web