Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.mac.system > #71655 > unrolled thread
| Started by | isw <isw@witzend.com> |
|---|---|
| First post | 2015-03-19 20:37 -0700 |
| Last post | 2015-03-22 19:19 +1200 |
| Articles | 20 on this page of 30 — 7 participants |
Back to article view | Back to comp.sys.mac.system
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
Page 1 of 2 [1] 2 Next page →
| From | isw <isw@witzend.com> |
|---|---|
| Date | 2015-03-19 20:37 -0700 |
| Subject | Searching for "fraction slash" |
| Message-ID | <isw-D2F299.20370819032015@news-roam.garlic.com> |
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? Isaac
[toc] | [next] | [standalone]
| From | Your Name <YourName@YourISP.com> |
|---|---|
| Date | 2015-03-20 18:22 +1200 |
| Message-ID | <200320151822558412%YourName@YourISP.com> |
| In reply to | #71655 |
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.
[toc] | [prev] | [next] | [standalone]
| From | isw <isw@witzend.com> |
|---|---|
| Date | 2015-03-20 10:59 -0700 |
| Message-ID | <isw-76CB1C.10593720032015@news-roam.garlic.com> |
| In reply to | #71659 |
In article <200320151822558412%YourName@YourISP.com>, Your Name <YourName@YourISP.com> wrote: > 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. Selecting the whole fraction works -- it can be copied and pasted. Once it's in the "find" cartouche of TextEdit, the individual glyphs can be selected and deleted. Note that this does now work in the main text window. Odd. > 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. If necessary, but that would add a number of lines to an already large script. > Another option might be to not copy the recipe. Instead use the > browser's Save As function. The database app (MacGourmet) has a capture feature -- highlight the desired text, and copy it in as a "proto-recipe" ready for editing. Very nice because it ignores a lot of stuff that gets highlighted on a web page when all you want it the text. Isaac
[toc] | [prev] | [next] | [standalone]
| From | Savageduck <savageduck1@{REMOVESPAM}me.com> |
|---|---|
| Date | 2015-03-19 22:36 -0700 |
| Message-ID | <2015031922360580145-savageduck1@REMOVESPAMme.com> |
| In reply to | #71655 |
On 2015-03-20 03:37:08 +0000, isw said: > 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? > > Isaac In System Preferences Keyboard->Text there are options to set some fractions. On my Mac "1"+"/"+"2" will print ½ the same goes for ¼. For a keystroke fraction slash rather than a forward slash "/" use option-shift+1 to give you a " ⁄ ", and thus 1⁄2, 3⁄4, 3⁄8 etc. instead of 3/4, 3/8. The difference is subtle with slight compression between the numerals and the slash. It is hardly worth the effort. -- Regards, Savageduck
[toc] | [prev] | [next] | [standalone]
| From | Jolly Roger <jollyroger@pobox.com> |
|---|---|
| Date | 2015-03-20 13:48 +0000 |
| Message-ID | <cn2mppFg7j0U6@mid.individual.net> |
| In reply to | #71655 |
On 2015-03-20, isw <isw@witzend.com> wrote: [Followups set to alt.comp.lang.applescript] > 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. 8260 decimal is 2044 hexadecimal. In AppleScript, you can use the «data utxt» formatter to work with Unicode characters. To get the fraction slash character, you can use: «data utxt2044» as Unicode text > 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. This seems to work for me: -- begin script property bunchOfText : "this ⁄ is a test of the emergency ⁄ broadcast system please stay ⁄ calm and bring ⁄ your towel" property searchCharacter : «data utxt2044» as Unicode text set newText to my SearchReplace(bunchOfText, searchCharacter, "/") return my SearchReplace(newText, searchCharacter, "***") on SearchReplace(sourceStr, searchString, replaceString) -- replace <searchString> with <replaceString> in <sourceStr> set searchStr to (searchString as text) set replaceStr to (replaceString as text) set sourceStr to (sourceStr as text) set saveDelims to AppleScript's text item delimiters set AppleScript's text item delimiters to (searchString) set theList to (every text item of sourceStr) set AppleScript's text item delimiters to (replaceString) set theString to theList as string set AppleScript's text item delimiters to saveDelims return theString end SearchReplace -- end script The "bunchOfText" property is a string with the Unicode 2044 characters in it (added directly from the keyboard by typing Option-Shift-1. I used the «data utxt» formatter to set the "searchCharacter" property to the single Unicode 2044 character so I can search for it. I typed the « and » characters on the keyboard with Option-\ and Option-Shift-\, respectively. The SearchReplace handler uses an AppleScript text item delimiter trick to locate the substring and replace it. -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR
[toc] | [prev] | [next] | [standalone]
| From | isw <isw@witzend.com> |
|---|---|
| Date | 2015-03-20 15:08 -0700 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <isw-E13919.15083720032015@news-roam.garlic.com> |
| In reply to | #71673 |
In article <cn2mppFg7j0U6@mid.individual.net>,
Jolly Roger <jollyroger@pobox.com> wrote:
> On 2015-03-20, isw <isw@witzend.com> wrote:
>
> [Followups set to alt.comp.lang.applescript]
I thought about that, but decided that the problem concerning the
"fraction slash" was more of a global issue rather than something that
just concerned AppleScript, since even TextEdit had problems with it
(and see the last two paragraphs).
> 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.
So after I posted my question, I fiddled around some more with TextEdit
and discovered that, while it is not possible to select only the
fraction slash character, it *is* possible to place the cursor ahead of
the entire fraction ("1/2") and then to selectively delete both the
numerals, leaving the fraction slash standing alone. Go figure.
That was the clue I needed. I did the same thing, copying the entire
fraction, pasting it into the proper part of my AppleScript, and then
deleting both the numerals.
Jolly's solution looks good, but my whole AppleScript is built around a
*long* list of text replacement operations, so isolating the character
gave me a solution that involved adding only one short line to the
script.
But an underlying problem is that the Mac badly renders text which
includes a fraction slash -- at least in the typefaces I use for my
recipe collection. If it hadn't looked so bad, I wouldn't haven't cared
(or even noticed) that the character was not just an ordinary slash.
Interestingly, the Language & Text/Text option to automatically replace
"big" fractions with "small" ones (multiple characters with a single
one) *does not work* if the fraction uses a fraction slash.
Isaac
[toc] | [prev] | [next] | [standalone]
| From | Savageduck <savageduck1@{REMOVESPAM}me.com> |
|---|---|
| Date | 2015-03-20 16:40 -0700 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <201503201640397308-savageduck1@REMOVESPAMme.com> |
| In reply to | #71694 |
On 2015-03-20 22:08:37 +0000, isw said:
> In article <cn2mppFg7j0U6@mid.individual.net>,
> Jolly Roger <jollyroger@pobox.com> wrote:
>
>> On 2015-03-20, isw <isw@witzend.com> wrote:
>>
>> [Followups set to alt.comp.lang.applescript]
>
> I thought about that, but decided that the problem concerning the
> "fraction slash" was more of a global issue rather than something that
> just concerned AppleScript, since even TextEdit had problems with it
> (and see the last two paragraphs).
>
>> 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.
>
> So after I posted my question, I fiddled around some more with TextEdit
> and discovered that, while it is not possible to select only the
> fraction slash character, it *is* possible to place the cursor ahead of
> the entire fraction ("1/2") and then to selectively delete both the
> numerals, leaving the fraction slash standing alone. Go figure.
>
> That was the clue I needed. I did the same thing, copying the entire
> fraction, pasting it into the proper part of my AppleScript, and then
> deleting both the numerals.
>
> Jolly's solution looks good, but my whole AppleScript is built around a
> *long* list of text replacement operations, so isolating the character
> gave me a solution that involved adding only one short line to the
> script.
>
> But an underlying problem is that the Mac badly renders text which
> includes a fraction slash -- at least in the typefaces I use for my
> recipe collection. If it hadn't looked so bad, I wouldn't haven't cared
> (or even noticed) that the character was not just an ordinary slash.
>
> Interestingly, the Language & Text/Text option to automatically replace
> "big" fractions with "small" ones (multiple characters with a single
> one) *does not work* if the fraction uses a fraction slash.
>
> Isaac
Have you actually tried option-shift+1 which gives you "⁄" vs the
standard forward slash "/"?
Note the subtle difference in spacing.
Then there are always ½ & ¼, rather than 1/2 or 1/4.
--
Regards,
Savageduck
[toc] | [prev] | [next] | [standalone]
| From | Your Name <YourName@YourISP.com> |
|---|---|
| Date | 2015-03-21 13:19 +1200 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <210320151319170193%YourName@YourISP.com> |
| In reply to | #71698 |
In article <201503201640397308-savageduck1@REMOVESPAMme.com>,
Savageduck <savageduck1@{REMOVESPAM}me.com> wrote:
> On 2015-03-20 22:08:37 +0000, isw said:
> >
> > In article <cn2mppFg7j0U6@mid.individual.net>,
> > Jolly Roger <jollyroger@pobox.com> wrote:
> >
> >> On 2015-03-20, isw <isw@witzend.com> wrote:
> >>
> >> [Followups set to alt.comp.lang.applescript]
> >
> > I thought about that, but decided that the problem concerning the
> > "fraction slash" was more of a global issue rather than something that
> > just concerned AppleScript, since even TextEdit had problems with it
> > (and see the last two paragraphs).
> >
> >> 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.
> >
> > So after I posted my question, I fiddled around some more with TextEdit
> > and discovered that, while it is not possible to select only the
> > fraction slash character, it *is* possible to place the cursor ahead of
> > the entire fraction ("1/2") and then to selectively delete both the
> > numerals, leaving the fraction slash standing alone. Go figure.
> >
> > That was the clue I needed. I did the same thing, copying the entire
> > fraction, pasting it into the proper part of my AppleScript, and then
> > deleting both the numerals.
> >
> > Jolly's solution looks good, but my whole AppleScript is built around a
> > *long* list of text replacement operations, so isolating the character
> > gave me a solution that involved adding only one short line to the
> > script.
> >
> > But an underlying problem is that the Mac badly renders text which
> > includes a fraction slash -- at least in the typefaces I use for my
> > recipe collection. If it hadn't looked so bad, I wouldn't haven't cared
> > (or even noticed) that the character was not just an ordinary slash.
> >
> > Interestingly, the Language & Text/Text option to automatically replace
> > "big" fractions with "small" ones (multiple characters with a single
> > one) *does not work* if the fraction uses a fraction slash.
> >
> > Isaac
>
> Have you actually tried option-shift+1 which gives you "Ž" vs the
> standard forward slash "/"?
> Note the subtle difference in spacing.
>
> Then there are always ? & ?, rather than 1/2 or 1/4.
I vaguely recall reading somewhere long ago that "officially" fractions
should always be written as a stacked vertical tower (number at top,
horizontal bar, number at bottom) rather than spread out sideways with
a diagonal slash ... but I don't know how official that definition
actually was.
[toc] | [prev] | [next] | [standalone]
| From | Savageduck <savageduck1@{REMOVESPAM}me.com> |
|---|---|
| Date | 2015-03-20 18:08 -0700 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <2015032018083311320-savageduck1@REMOVESPAMme.com> |
| In reply to | #71704 |
On 2015-03-21 01:19:17 +0000, Your Name said:
> In article <201503201640397308-savageduck1@REMOVESPAMme.com>,
> Savageduck <savageduck1@{REMOVESPAM}me.com> wrote:
<<Le Snip>>
>> Have you actually tried option-shift+1 which gives you "" vs the
>> standard forward slash "/"?
>> Note the subtle difference in spacing.
>>
>> Then there are always ? & ?, rather than 1/2 or 1/4.
>
> I vaguely recall reading somewhere long ago that "officially" fractions
> should always be written as a stacked vertical tower (number at top,
> horizontal bar, number at bottom) rather than spread out sideways with
> a diagonal slash ... but I don't know how official that definition
> actually was.
I see that you are using Throth, so no Unicode(UTF8) to deal with the
option-shift+1 = ⁄, or the system generated ½ or ¼.
--
Regards,
Savageduck
[toc] | [prev] | [next] | [standalone]
| From | isw <isw@witzend.com> |
|---|---|
| Date | 2015-03-20 20:21 -0700 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <isw-B11657.20214520032015@news-roam.garlic.com> |
| In reply to | #71698 |
In article <201503201640397308-savageduck1@REMOVESPAMme.com>,
Savageduck <savageduck1@{REMOVESPAM}me.com> wrote:
> On 2015-03-20 22:08:37 +0000, isw said:
>
> > In article <cn2mppFg7j0U6@mid.individual.net>,
> > Jolly Roger <jollyroger@pobox.com> wrote:
> >
> >> On 2015-03-20, isw <isw@witzend.com> wrote:
> >>
> >> [Followups set to alt.comp.lang.applescript]
> >
> > I thought about that, but decided that the problem concerning the
> > "fraction slash" was more of a global issue rather than something that
> > just concerned AppleScript, since even TextEdit had problems with it
> > (and see the last two paragraphs).
> >
> >> 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.
> >
> > So after I posted my question, I fiddled around some more with TextEdit
> > and discovered that, while it is not possible to select only the
> > fraction slash character, it *is* possible to place the cursor ahead of
> > the entire fraction ("1/2") and then to selectively delete both the
> > numerals, leaving the fraction slash standing alone. Go figure.
> >
> > That was the clue I needed. I did the same thing, copying the entire
> > fraction, pasting it into the proper part of my AppleScript, and then
> > deleting both the numerals.
> >
> > Jolly's solution looks good, but my whole AppleScript is built around a
> > *long* list of text replacement operations, so isolating the character
> > gave me a solution that involved adding only one short line to the
> > script.
> >
> > But an underlying problem is that the Mac badly renders text which
> > includes a fraction slash -- at least in the typefaces I use for my
> > recipe collection. If it hadn't looked so bad, I wouldn't haven't cared
> > (or even noticed) that the character was not just an ordinary slash.
> >
> > Interestingly, the Language & Text/Text option to automatically replace
> > "big" fractions with "small" ones (multiple characters with a single
> > one) *does not work* if the fraction uses a fraction slash.
> >
> > Isaac
>
> Have you actually tried option-shift+1 which gives you "⁄" vs the
> standard forward slash "/"?
> Note the subtle difference in spacing.
>
> Then there are always 1⁄2 & 1⁄4, rather than 1/2 or 1/4.
I don't want to *use* it; I want to get rid of it.
Isaac
[toc] | [prev] | [next] | [standalone]
| From | Jolly Roger <jollyroger@pobox.com> |
|---|---|
| Date | 2015-03-21 00:03 +0000 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <cn3qqpFqcqnU1@mid.individual.net> |
| In reply to | #71694 |
On 2015-03-20, isw <isw@witzend.com> wrote:
> In article <cn2mppFg7j0U6@mid.individual.net>,
> Jolly Roger <jollyroger@pobox.com> wrote:
>
>> On 2015-03-20, isw <isw@witzend.com> wrote:
>>
>> [Followups set to alt.comp.lang.applescript]
>
> I thought about that, but decided that the problem concerning the
> "fraction slash" was more of a global issue rather than something that
> just concerned AppleScript, since even TextEdit had problems with it
> (and see the last two paragraphs).
No problem. : )
>> 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.
>
> So after I posted my question, I fiddled around some more with TextEdit
> and discovered that, while it is not possible to select only the
> fraction slash character, it *is* possible to place the cursor ahead of
> the entire fraction ("1/2") and then to selectively delete both the
> numerals, leaving the fraction slash standing alone. Go figure.
>
> That was the clue I needed. I did the same thing, copying the entire
> fraction, pasting it into the proper part of my AppleScript, and then
> deleting both the numerals.
I just typed a fraction with the fraction slash character between two
numbers in TextEdit with the default Helvetica Neue font, and was able
to select only the slash with my trackpad.
> Jolly's solution looks good, but my whole AppleScript is built around a
> *long* list of text replacement operations, so isolating the character
> gave me a solution that involved adding only one short line to the
> script.
No worries. Just trying to help.
> But an underlying problem is that the Mac badly renders text which
> includes a fraction slash -- at least in the typefaces I use for my
> recipe collection. If it hadn't looked so bad, I wouldn't haven't cared
> (or even noticed) that the character was not just an ordinary slash.
They look fine in Helvetica and so on. Which fonts are you using?
> Interestingly, the Language & Text/Text option to automatically replace
> "big" fractions with "small" ones (multiple characters with a single
> one) *does not work* if the fraction uses a fraction slash.
That makes sense.
--
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.
JR
[toc] | [prev] | [next] | [standalone]
| From | isw <isw@witzend.com> |
|---|---|
| Date | 2015-03-20 20:20 -0700 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <isw-C45167.20202220032015@news-roam.garlic.com> |
| In reply to | #71699 |
In article <cn3qqpFqcqnU1@mid.individual.net>,
Jolly Roger <jollyroger@pobox.com> wrote:
> On 2015-03-20, isw <isw@witzend.com> wrote:
> > In article <cn2mppFg7j0U6@mid.individual.net>,
> > Jolly Roger <jollyroger@pobox.com> wrote:
> >
> >> On 2015-03-20, isw <isw@witzend.com> wrote:
> >>
> >> [Followups set to alt.comp.lang.applescript]
> >
> > I thought about that, but decided that the problem concerning the
> > "fraction slash" was more of a global issue rather than something that
> > just concerned AppleScript, since even TextEdit had problems with it
> > (and see the last two paragraphs).
>
> No problem. : )
>
> >> 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.
> >
> > So after I posted my question, I fiddled around some more with TextEdit
> > and discovered that, while it is not possible to select only the
> > fraction slash character, it *is* possible to place the cursor ahead of
> > the entire fraction ("1/2") and then to selectively delete both the
> > numerals, leaving the fraction slash standing alone. Go figure.
> >
> > That was the clue I needed. I did the same thing, copying the entire
> > fraction, pasting it into the proper part of my AppleScript, and then
> > deleting both the numerals.
>
> I just typed a fraction with the fraction slash character between two
> numbers in TextEdit with the default Helvetica Neue font, and was able
> to select only the slash with my trackpad.
>
> > Jolly's solution looks good, but my whole AppleScript is built around a
> > *long* list of text replacement operations, so isolating the character
> > gave me a solution that involved adding only one short line to the
> > script.
>
> No worries. Just trying to help.
>
> > But an underlying problem is that the Mac badly renders text which
> > includes a fraction slash -- at least in the typefaces I use for my
> > recipe collection. If it hadn't looked so bad, I wouldn't haven't cared
> > (or even noticed) that the character was not just an ordinary slash.
>
> They look fine in Helvetica and so on. Which fonts are you using?
Lucida Grande, according to TextEdit, and I wasn't "using" it; it's what
came in from the web page that had the recipe.
> > Interestingly, the Language & Text/Text option to automatically replace
> > "big" fractions with "small" ones (multiple characters with a single
> > one) *does not work* if the fraction uses a fraction slash.
>
> That makes sense.
I hope you're making a funny. I just did a bug report to Apple about it.
Isaac
[toc] | [prev] | [next] | [standalone]
| From | Jolly Roger <jollyroger@pobox.com> |
|---|---|
| Date | 2015-03-21 12:48 +0000 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <cn57lpF64i7U2@mid.individual.net> |
| In reply to | #71713 |
On 2015-03-21, isw <isw@witzend.com> wrote: > In article <cn3qqpFqcqnU1@mid.individual.net>, > Jolly Roger <jollyroger@pobox.com> wrote: >> On 2015-03-20, isw <isw@witzend.com> wrote: > >> > Interestingly, the Language & Text/Text option to automatically replace >> > "big" fractions with "small" ones (multiple characters with a single >> > one) *does not work* if the fraction uses a fraction slash. >> >> That makes sense. > > I hope you're making a funny. I just did a bug report to Apple about it. I had assumed you were making reference to the System Preferences > Keyboard > Text panel, where you can enter your own substitutions; but now after re-reading, it seems like there is a specific setting somewhere to replace fractions. I don't see that option in this panel on my Mac Pro running 10.10 though: <http://tinypic.com/view.php?pic=20u5nnk&s=8> What am I missing? -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR
[toc] | [prev] | [next] | [standalone]
| From | isw <isw@witzend.com> |
|---|---|
| Date | 2015-03-21 21:47 -0700 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <isw-F748A2.21475821032015@news-roam.garlic.com> |
| In reply to | #71725 |
In article <cn57lpF64i7U2@mid.individual.net>, Jolly Roger <jollyroger@pobox.com> wrote: > On 2015-03-21, isw <isw@witzend.com> wrote: > > In article <cn3qqpFqcqnU1@mid.individual.net>, > > Jolly Roger <jollyroger@pobox.com> wrote: > >> On 2015-03-20, isw <isw@witzend.com> wrote: > > > >> > Interestingly, the Language & Text/Text option to automatically replace > >> > "big" fractions with "small" ones (multiple characters with a single > >> > one) *does not work* if the fraction uses a fraction slash. > >> > >> That makes sense. > > > > I hope you're making a funny. I just did a bug report to Apple about it. > > I had assumed you were making reference to the System Preferences > > Keyboard > Text panel, where you can enter your own substitutions; but > now after re-reading, it seems like there is a specific setting > somewhere to replace fractions. I don't see that option in this > panel on my Mac Pro running 10.10 though: > > <http://tinypic.com/view.php?pic=20u5nnk&s=8> > > What am I missing? You're looking in the wrong place. Try System Preferences/Language & Text/Text. Isaac
[toc] | [prev] | [next] | [standalone]
| From | Your Name <YourName@YourISP.com> |
|---|---|
| Date | 2015-03-22 18:00 +1200 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <220320151800124085%YourName@YourISP.com> |
| In reply to | #71778 |
In article <isw-F748A2.21475821032015@news-roam.garlic.com>, isw <isw@witzend.com> wrote: > In article <cn57lpF64i7U2@mid.individual.net>, > Jolly Roger <jollyroger@pobox.com> wrote: > > On 2015-03-21, isw <isw@witzend.com> wrote: > > > In article <cn3qqpFqcqnU1@mid.individual.net>, > > > Jolly Roger <jollyroger@pobox.com> wrote: > > >> On 2015-03-20, isw <isw@witzend.com> wrote: > > >> > > > >> > Interestingly, the Language & Text/Text option to automatically > > >> > replace "big" fractions with "small" ones (multiple characters with > > >> > a single one) *does not work* if the fraction uses a fraction slash. > > >> > > >> That makes sense. > > > > > > I hope you're making a funny. I just did a bug report to Apple about it. > > > > I had assumed you were making reference to the System Preferences > > > Keyboard > Text panel, where you can enter your own substitutions; but > > now after re-reading, it seems like there is a specific setting > > somewhere to replace fractions. I don't see that option in this > > panel on my Mac Pro running 10.10 though: > > <http://tinypic.com/view.php?pic=20u5nnk&s=8> > > > > What am I missing? > > You're looking in the wrong place. Try System Preferences/Language & > Text/Text. It may depend on what version of OS X you're using ... Apple sometimes moves things (or renames them) when they release new OS versions.
[toc] | [prev] | [next] | [standalone]
| From | Jolly Roger <jollyroger@pobox.com> |
|---|---|
| Date | 2015-03-22 12:15 +0000 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <cn7q39Fpul6U1@mid.individual.net> |
| In reply to | #71778 |
On 2015-03-22, isw <isw@witzend.com> wrote: > In article <cn57lpF64i7U2@mid.individual.net>, > Jolly Roger <jollyroger@pobox.com> wrote: > >> On 2015-03-21, isw <isw@witzend.com> wrote: >> > In article <cn3qqpFqcqnU1@mid.individual.net>, >> > Jolly Roger <jollyroger@pobox.com> wrote: >> >> On 2015-03-20, isw <isw@witzend.com> wrote: >> > >> >> > Interestingly, the Language & Text/Text option to automatically replace >> >> > "big" fractions with "small" ones (multiple characters with a single >> >> > one) *does not work* if the fraction uses a fraction slash. >> >> >> >> That makes sense. >> > >> > I hope you're making a funny. I just did a bug report to Apple about it. >> >> I had assumed you were making reference to the System Preferences > >> Keyboard > Text panel, where you can enter your own substitutions; but >> now after re-reading, it seems like there is a specific setting >> somewhere to replace fractions. I don't see that option in this >> panel on my Mac Pro running 10.10 though: >> >> <http://tinypic.com/view.php?pic=20u5nnk&s=8> >> >> What am I missing? > > You're looking in the wrong place. Try System Preferences/Language & > Text/Text. I think I'm looking in the right place for text substitutions. There is no "Language & Text" panel in Mac OS X 10.10. There is a "Language & Region", but that panel has no "Text" tab in it. It does have an "Advanced" button where you can set the formats for numbers, dates, and times. But there is nothing about fraction substitution in there that I can see: <http://tinypic.com/view.php?pic=j675e1&s=8> <http://tinypic.com/view.php?pic=2ex0lz5&s=8> The only panel that deals with substitution is the Keyboard system preference panel I mentioned earlier - and there are no fractions listed in it: <http://tinypic.com/view.php?pic=20u5nnk&s=8> This leads me to believe you are using an old version of Mac OS X - perhaps 10.6. When I look at the system preferences in 10.6, I do see a "Language & Text" system preference panel. And in the "Text" tab, I see the same substitutions panel that now lives in the Keyboard panel in 10.10, where I do see fractions listed in the text substitution list: <http://tinypic.com/view.php?pic=2z4fx21&s=8> Which leads me back to what I said in another post: The text replacement list is a simple text replacement function, and not a comprehensive fraction improvement function. If you want it to handle more cases for fractions with different characters, you have to add those to the list. -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR
[toc] | [prev] | [next] | [standalone]
| From | Michelle Steiner <michelle@michelle.org> |
|---|---|
| Date | 2015-03-22 08:39 -0700 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <220320150839383491%michelle@michelle.org> |
| In reply to | #71796 |
In article <cn7q39Fpul6U1@mid.individual.net>, Jolly Roger <jollyroger@pobox.com> wrote: > The only panel that deals with substitution is the Keyboard system > preference panel I mentioned earlier - and there are no fractions listed > in it: > > <http://tinypic.com/view.php?pic=20u5nnk&s=8> This is what I have in 10.10.3, and in every earlier system that I can recall: <https://dl.dropboxusercontent.com/u/50314006/Screen%20Shot%202015-03-22 %20at%208.38.28%20AM.png>
[toc] | [prev] | [next] | [standalone]
| From | Jolly Roger <jollyroger@pobox.com> |
|---|---|
| Date | 2015-03-22 15:47 +0000 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <cn86h5FthuaU1@mid.individual.net> |
| In reply to | #71814 |
On 2015-03-22, Michelle Steiner <michelle@michelle.org> wrote: > In article <cn7q39Fpul6U1@mid.individual.net>, Jolly Roger ><jollyroger@pobox.com> wrote: > >> The only panel that deals with substitution is the Keyboard system >> preference panel I mentioned earlier - and there are no fractions listed >> in it: >> >> <http://tinypic.com/view.php?pic=20u5nnk&s=8> > > This is what I have in 10.10.3, and in every earlier system that I can > recall: > ><https://dl.dropboxusercontent.com/u/50314006/Screen%20Shot%202015-03-22 > %20at%208.38.28%20AM.png> Perhaps I removed them at some point. Anyhow, like I said, this isn't a comprehensive fraction replacement feature. It's simple text replacement, and if you want it to detect anything other than the standard fractions that were apparently entered with standard ASCII characters, you're going to have to add specific entries to the list to do that. -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR
[toc] | [prev] | [next] | [standalone]
| From | Lewis <g.kreme@gmail.com.dontsendmecopies> |
|---|---|
| Date | 2015-03-23 02:54 +0000 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <slrnmgv05d.v69.g.kreme@kreme.eternal-september.org> |
| In reply to | #71796 |
Okay, so one time? In band camp? Jolly Roger <jollyroger@pobox.com> was all, like: > On 2015-03-22, isw <isw@witzend.com> wrote: >> In article <cn57lpF64i7U2@mid.individual.net>, >> Jolly Roger <jollyroger@pobox.com> wrote: >> >>> On 2015-03-21, isw <isw@witzend.com> wrote: >>> > In article <cn3qqpFqcqnU1@mid.individual.net>, >>> > Jolly Roger <jollyroger@pobox.com> wrote: >>> >> On 2015-03-20, isw <isw@witzend.com> wrote: >>> > >>> >> > Interestingly, the Language & Text/Text option to automatically replace >>> >> > "big" fractions with "small" ones (multiple characters with a single >>> >> > one) *does not work* if the fraction uses a fraction slash. >>> >> >>> >> That makes sense. >>> > >>> > I hope you're making a funny. I just did a bug report to Apple about it. >>> >>> I had assumed you were making reference to the System Preferences > >>> Keyboard > Text panel, where you can enter your own substitutions; but >>> now after re-reading, it seems like there is a specific setting >>> somewhere to replace fractions. I don't see that option in this >>> panel on my Mac Pro running 10.10 though: >>> >>> <http://tinypic.com/view.php?pic=20u5nnk&s=8> >>> >>> What am I missing? >> >> You're looking in the wrong place. Try System Preferences/Language & >> Text/Text. > I think I'm looking in the right place for text substitutions. > There is no "Language & Text" panel in Mac OS X 10.10. There is a > "Language & Region", but that panel has no "Text" tab in it. It does > have an "Advanced" button where you can set the formats for numbers, > dates, and times. But there is nothing about fraction substitution in > there that I can see: They moved it (very recently) to Keyboard -> text. It might be as recently as the 10.10.3 beta, in fact, but I think they moved it earlier than that. Can't check 10.10.2 right now. > <http://tinypic.com/view.php?pic=20u5nnk&s=8> > This leads me to believe you are using an old version of Mac OS X - > perhaps 10.6. When I look at the system preferences in 10.6, I do see a > "Language & Text" system preference panel. And in the "Text" tab, I see > the same substitutions panel that now lives in the Keyboard panel in > 10.10, where I do see fractions listed in the text substitution list: > <http://tinypic.com/view.php?pic=2z4fx21&s=8> Very odd. You must have deleted them at some point in the past: <https://www.dropbox.com/s/hxog9cojszmo5i5/Screenshot%202015-03-22%2020.54.55.PNG?dl=0> > Which leads me back to what I said in another post: The text replacement > list is a simple text replacement function, and not a comprehensive > fraction improvement function. If you want it to handle more cases for > fractions with different characters, you have to add those to the list. True. -- http://2blog.kreme.com "There's sex and death and human grime in monochrome for one thin dime and at least the trains all run on time but they don't go anywhere."
[toc] | [prev] | [next] | [standalone]
| From | dempson@actrix.gen.nz (David Empson) |
|---|---|
| Date | 2015-03-23 16:51 +1300 |
| Subject | Re: Searching for "fraction slash" -- solved |
| Message-ID | <1m1qwfx.y41tmfoty87zN%dempson@actrix.gen.nz> |
| In reply to | #71907 |
Lewis <g.kreme@gmail.com.dontsendmecopies> wrote: > Okay, so one time? In band camp? Jolly Roger <jollyroger@pobox.com> was all, > like: > > On 2015-03-22, isw <isw@witzend.com> wrote: > >> In article <cn57lpF64i7U2@mid.individual.net>, > >> Jolly Roger <jollyroger@pobox.com> wrote: > >> > >>> On 2015-03-21, isw <isw@witzend.com> wrote: > >>> > In article <cn3qqpFqcqnU1@mid.individual.net>, > >>> > Jolly Roger <jollyroger@pobox.com> wrote: > >>> >> On 2015-03-20, isw <isw@witzend.com> wrote: > >>> > > >>> >> > Interestingly, the Language & Text/Text option to automatically > >>> >> > replace "big" fractions with "small" ones (multiple characters > >>> >> > with a single one) *does not work* if the fraction uses a > >>> >> > fraction slash. > >>> >> > >>> >> That makes sense. > >>> > > >>> > I hope you're making a funny. I just did a bug report to Apple about it. > >>> > >>> I had assumed you were making reference to the System Preferences > > >>> Keyboard > Text panel, where you can enter your own substitutions; but > >>> now after re-reading, it seems like there is a specific setting > >>> somewhere to replace fractions. I don't see that option in this > >>> panel on my Mac Pro running 10.10 though: > >>> > >>> <http://tinypic.com/view.php?pic=20u5nnk&s=8> > >>> > >>> What am I missing? > >> > >> You're looking in the wrong place. Try System Preferences/Language & > >> Text/Text. > > > I think I'm looking in the right place for text substitutions. > > > There is no "Language & Text" panel in Mac OS X 10.10. There is a > > "Language & Region", but that panel has no "Text" tab in it. It does > > have an "Advanced" button where you can set the formats for numbers, > > dates, and times. But there is nothing about fraction substitution in > > there that I can see: > > They moved it (very recently) to Keyboard -> text. It might be as > recently as the 10.10.3 beta, in fact, but I think they moved it earlier > than that. Can't check 10.10.2 right now. The substitutions were in Keyboard > Text starting in 10.9 (Mavericks). Just confirmed on my 10.9.5 system. They were in Language & Text > Text for 10.8.5 and earlier. > > <http://tinypic.com/view.php?pic=20u5nnk&s=8> > > > This leads me to believe you are using an old version of Mac OS X - > > perhaps 10.6. When I look at the system preferences in 10.6, I do see a > > "Language & Text" system preference panel. And in the "Text" tab, I see > > the same substitutions panel that now lives in the Keyboard panel in > > 10.10, where I do see fractions listed in the text substitution list: > > > <http://tinypic.com/view.php?pic=2z4fx21&s=8> > > Very odd. You must have deleted them at some point in the past: > > <https://www.dropbox.com/s/hxog9cojszmo5i5/Screenshot%202015-03-22%2020.54.55. > PNG?dl=0> A fresh install of Mavericks or Yosemite doesn't have them by default (but Mountain Lion does). The new defaults have just an "omw" for "On my way!", same as the iPhone/iPad. My current Yosemite system also has only the "omw" substitution, which I didn't create so it presumably came from the new defaults. This system was an upgrade from Mavericks, which was set up by migrating from my previous computer which had been running Mountain Lion. I don't recall offhand whether I had ever modified the previous default substituations, but I expect I hadn't, beyond disabling most of them. I do recall having the "omw" substitution rule while I was running Mavericks. It therefore looks like migration to Mavericks replaced the old default substitutions with the new defaults (but perhaps upgrading doesn't, which is why Lewis and Michelle still have them?). I don't have enough evidence to judge what happened to any custom substitution rules in a migration to Mavericks or Yosemite. -- David Empson dempson@actrix.gen.nz
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.sys.mac.system
csiph-web