Fraction replacement
Im not sure if I need a scripted solution but probably better to ask here first… So here goes… I have a catalogue coming up for this years updating and the client wants a few changes one of which is an increase of point size nothing drastic… Its all done with styles so some oversetting to handle not a problem. Where I could do with some guidance is fractions… The job as is was converted from Quark 2 years ago and done using postscript font… What I would like to do is swap this in favor of opentype… That should go OK I hope… While I am able to adjust my character styles it is not working with the fractions ( in Q there was a make fraction that did a 50% size and base line shift ) What Im looking for is to find all fractions down to 1/8's and replace with opentype glyphs… does this sound doable? Anyone already been there done it? Will I need script or will the GREP F&C in the GUI do this? TVM
It shouldn't take more than 7 find and replaces to do that. No need for GREP even...
FWIW, Dan Rodney has a script which does proper fractions:
http://www.danrodney.com/scripts/properfraction.html
Harbs
Similar Messages
-
I've seen posts about this before but my situation has added a new twist.
I was seeing Helvetica Fractions replace helvetica in Safari and Mail headings. Removed it from Library/Fonts/. That fixed Mail and Safari but now all of the MS Office v.X apps crash when starting up. So far I've tried the following:
Put Helvetica Fractions back
Removed and reinstalled MS Office (without TT fonts)
Ran the 10.1.6 Office update
Nothing works and I can't open any client Word docs or any of my Excel spreadsheets. HELP!!
ps What the heck caused the fractions interference in the first place? Everything was fine till yesterday aft
G5 Dual 2 GHz Mac OS X (10.3.9)has anyone else had
this problem? is there anything else I can do to
solve whats going on.
This problem is extremely common. Various OS X apps confuse Helvetica Fractions for the real Helvetica. If a web page stipulates Helvetica in its code, there is no easy way to make Safari use another font.
The only solution is to deactivate or remove Helvetica Fractions whenever it is not required for some special job.
Helvetica Fractions replaces normal Latin with fractions and thus does not conform to Unicode standards for font encoding -- it (along with Times Phonetic, which causes similar problems), should be kept out of OS X to the maximum extent possible.
For info on garbled text problems in general:
http://discussions.apple.com/thread.jspa?threadID=932561&tstart=0 -
How to get numeric result from 'search and replace' string function
hii
i am using search and replace function to get output.my output is of form ' *X0123.3 ' .here i am replacing the term *X01 with space because i need only 23.3 as a result.but i am unable to get that out in the output indicator.i used lot of functions like string to number and so on but i am getting output as zero .can you please suggest me wt to do.i am attaching a copy of my file.
Attachments:
Untitled 1.vi 25 KBYour problem is the fact that you are converting it to an integer, thus loosing the fractional part. You need to use "Fract/Exp String To Number" instead and create a DBL so yor data is 23.3 instead of 23.
You also don't need to manipulate the string if the initial part is of constant lenght. Just use the offset input as in the figure below.
Message Edited by altenbach on 07-31-2006 07:02 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
ToDBL.png 2 KB -
Text replacements no longer working correctly after Mavericks install.
Since upgrading to Mavericks (MBA2011 13inch) only a select few of the text replacements still work. For example, I can still write (c) and tm and have them change to what they should be, but the fractions, and custom ones like gmc, omw, or the apostrophe ones no longer are substituted. I tried deleting them and entering them again, but it does not work. They worked fine in 10.8, and I didnt change them until I noticed it had stopped working. Any ideas?
I have also noticed new in Mavericks is that if you type something that can be text substituted and you stop at the last character, a small box with the replacement pops out with the option to cancel the replacement, similar to how it works in ios.
However, I still have my problem where only certain susbstitutions work and exhibit this, while others do nothing ever. -
Automatic substitutions fractions in Pages 5
Hello all
Before Pages 5, fractions would automatically convert if you typed 1/2 or 3/4. However, this doesn't happen in the all new singing and dancing Pages 5.1 that I have and searching for it bears no answer.
Does anyone know why these automatic features have changed so much and where you can reinstate them. I have found the 'substitutions' dialogue box but you need to find the fraction to copy and paste. However in character view, fractions are missing!
Thanks for any ideasTo do this automatically it is really a two-step process.
1. Go to Character Viewer (special characters) as described above. Once you have selected digits you will have a choice of fractions to use. I put the ones I use most frequently in my favorites in the Special Character window.
2. To make this Automatic in Pages you need to then go to Edit > Substitutions and select Text Substitutions. Then go to Show Substitutions in the same window and select the text preferences button at the bottom left. In this window you select the + at the bottom and insert, for example, 1/2 in the Replace column. Then in the With column you select the appropriate fraction from your special character window and drag the substitution to the Replace column. Do this for all fractions you wish to automatically replace. -
Interval(fraction of hour) in a day
hello to all
I have a
select
to_date('16/08/2012 08:00','dd/mm/yyyy hh24:mi') + ((level-1)*15/24/60)
--when frazione <> 15 then to_date('16/08/2012 08:00','dd/mm/yyyy hh24:mi') + ((level-1)*20/24/60)
--end
Hours
from dual connect by level < 48
and I got
16/08/2012 08:00:00
16/08/2012 08:15:00
16/08/2012 08:30:00
16/08/2012 08:45:00
16/08/2012 09:00:00
16/08/2012 09:15:00
16/08/2012 09:30:00
16/08/2012 09:45:00
...I ask me if possibile to get same result replacing the fraction with a variable ((level-1)*15/24/60), that is I can get the resul with all fraction of day, 10,15,20 minutes and so on , if I like 20 min I get
((level-1)*20/24/60) --- ((level-1)*&inthour/24/60)
16/08/2012 08:00:00
16/08/2012 08:20:00
16/08/2012 08:40:00
thanks in advanceI'm sorry if return on the subject, from the following query:
select
&fractiondate+ (level * numtodsinterval(&minutefraction, 'MINUTE') )
Hours
from dual connect by level < .....which is inside a Db stored , Can I limit the rows returned, that is, I like only those in a range, for example:
from 10:05 (included) to 16:05 (included) for an x interval (minutes), example if x= 60, only those rows I want
10:05
11:05
12:05
13:05
14:05
15:05
16:05Thanks for any help -
I am trying to find the simplest way in cs3 to find any text with style, then replace that text with a new fill color. I can find text and change text. I can find a style and change it to a new style. I can't seem to find a style and change the applied fill color. I do not want to change the properties of the style, just the applied color. Yes, I want the + sign, for now. I know, why not update the style, I am not allowed to. Any help would be great. Since the search is not available, I need a new response.
Thanks.You can work around the bug by just doing a find, then looping through the<br />results, changing the color one at a time. It'll be a fraction slower, but<br />should do the trick:<br /><br />tell application "Adobe InDesign CS3"<br /> set find text preferences to nothing<br /> set properties of find text preferences to {applied paragraph style:"The<br />name"}<br /> set theFinds to find text document 1<br /> repeat with i from 1 to count of theFinds<br /> set properties of item i of theFinds to {fill color:"Replace color"}<br /> end repeat<br />end tell<br /><br />The bug is fixed in CS4, BTW.<br /><br />-- <br />Shane Stanley <[email protected]><br />AppleScript Pro Florida, April 2009 <a href=http://scriptingmatters.com/aspro>
-
What should I do about all these iPhone replacements?
Hello All,
I am currently on my 3rd iPhone replacement. The first one had a crack between the chrome and the headphone jack, the second one has an incorrectly installed bezel and is causing both a light leak, and a sharp edge (The plastic also cracked in the same place as the first phone).
I really need to know what you guys think I should do at this point. I have never in my life had to replace an electronic device so many times and quite frankly it's getting to the point where the time needed to deal with this is becoming beyond ridiculous.
What do I do if the phone coming on Tuesday has a problem, do I just keep calling Rogers and getting them to send me new phones until one actually works even though it takes me almost two hours worth of my time to deal with, and ship the phones back.
I really, honestly want my money back despite how much fun I have had with my phone, but due to the contract and such it simply isn't an option.
Should I take the next phone they give me and if there is a problem (one that I can look past for now), should I call Rogers, explain the problem but refuse a new phone for 6 - 9 months in the hopes Apple will deal with all the quality issues?
Should I go higher (straight to Apple head office) and deal with it at that level?
Basically, I would like to hear your ideas as to what would be the best solution at this point. I don't want to spend every week on the phone getting a new iPhone sent to me, but more importantly I'm concerned that it will break after the year of warranty leaving me to pay out of pocket or go without a phone.
Thanks,
JeffHi,
My phone was stolen 3 weeks back and I too had the same issue. Find my iphone was turned off, i don't know how.. I put the phone in lost mode and then erase mode. I brought a new iphone 4s and after 2 weeks, suddenly all of my contacts got disappeared from my iCloud, Mac Contacts, iPhone without any reason. I tried to do a restore iPhone and the contacts came back but disappeared in fraction of second. Used Backup from old data and the same had happened.
Out of no reason I checked with photos and suddenly, I could get the photo of the guy who stole my iphone. I immediately synced that pic to iPhotos. that displayed all info(date, time, camera used, flash on) except the location services.
I logged into iCloud.com to see if the phone got erase. But it still showed erase mode activated. Phone will erase the data once it is connected to internet. But without connection to internet, that guys pics would not have come. I guess there is something about Activation lock to be still active and deactivate which does not work properly.
Any one also had the same issue, please assist. -
[AS] Fractions script
A very long time ago I adapted a "Make Fractions" written by Sal Sogohian for Quark.
There are a variety of things that can be improved upon. But as it is it works
-peter
*** User modifiable variables
useFractionGlyphs has two possible values:
none: *fractions are created by modifying the attributes of the actual text
normal: *fractions that have glyphs in normal fonts are replaced with those glyphs
*other fractions are created by modifying the attributes of the actual text
property useFractionGlyphs : "normal" -- one of these values:"none","normal"
-- *** End user modifiable variables
-- When replacing a fraction that contains mulitple characters with one glyph,
-- then the offsets we calculate when we start become incorrect. This
-- propery keeps track of the difference in offset.
property extraOffset : 0
-- This maps the fractions found in all fonts and their unicode value
property fractionGlyphMap : {¬
{"1/4", "00BC"}, ¬
{"1/2", "00BD"}, ¬
{"3/4", "00BE"} ¬
tell application "InDesign 2.0.1"
set extraOffset to 0
-- Make sure a text box is selected
set theSelection to selection
if (count of theSelection) is 0 or class of item 1 of theSelection is not text frame then
beep
tell me to display dialog "Please select a text box." buttons {"OK"} default button 1
return
end if
set theFrame to item 1 of selection
tell theFrame --only work on the selected frame
-- get the indicess of all the slash characters
set slashCharacterList to (index of (every character whose contents is "/")) as list
if slashCharacterList is {} then
tell me to display dialog "No fractions in this text flow to format."
return
end if
set theCounter to 0 -- keep track of how many factions we process
repeat with i from 1 to the number of items in slashCharacterList
set slashCharIndex to (item i of slashCharacterList) as number
set wordBefore to object reference of word 1 of character (slashCharIndex - extraOffset - 1) of theFrame
set wordAfter to object reference of word 1 of character (slashCharIndex - extraOffset + 1) of theFrame
tell me to set IsFraction to VerifyIsFraction(wordBefore, wordAfter)
tell me to set replacedWithGlyphs to HandleUseFractionGlyphs(wordBefore, wordAfter)
if IsFraction is true then
-- if we already replaced it with a built-in fraction, just increment the counter
if replacedWithGlyphs is true then
set theCounter to theCounter + 1
else -- If this is a fraction, and we haven't already replaced with a built in fraction
-- Handle the slash
tell character (slashCharIndex - extraOffset)
set contents to ASCII character 218 --virgule
set kerning value to -15
end tell
-- Handle the first character before the slash
tell character (slashCharIndex - extraOffset - 1)
set leadingSize to leading
if leadingSize = "auto" then
set mySize to point size
set myAutoPct to auto leading
set leadingSize to mySize * (myAutoPct * 0.01)
end if
set fontSize to point size * 0.5
set point size to fontSize
set baseShift to leadingSize * 0.3
set baseline shift to baseShift
if contents is in {"3", "1", "5"} then
set kerning value to -30
else
set kerning value to -15
end if
end tell
-- Handle the first character after the slash
tell character (slashCharIndex - extraOffset + 1)
set point size to fontSize
if contents is in {"1"} then
set kerning value to -10
end if
end tell
-- Handle the second character before the slash
tell character (slashCharIndex - extraOffset - 2)
set point size to fontSize
set baseline shift to baseShift
set kerning value to -5
end tell
-- Handle the second character after the slash
tell character (slashCharIndex - extraOffset + 2)
set point size to fontSize
end tell
--beep
set theCounter to theCounter + 1
end if
end if
end repeat
beep 2
tell me to display dialog "Scan complete." & return & theCounter & ¬
" fractions formatted." buttons {"OK"} default button 1
end tell
end tell
VerifyIsFraction takes the characters before and after a slash and
determines whether this meets the criteria for a fraction
on VerifyIsFraction(wordBefore, wordAfter)
tell application "InDesign 2.0.1"
-- we only support fractions with up to 2 digits for the numerator/demoninator
if (count of characters of wordBefore) > 2 or (count of characters of wordAfter) > 2 then return false
-- To qualify as a fraction, all the charactere of the numerator/demoninator must be numbers
set characterList to every character of wordBefore & every character of wordAfter
repeat with oneCharacter in characterList
if oneCharacter is not in {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"} then return false
end repeat
-- if we got this far, then it all checks out
return true
end tell
end VerifyIsFraction
HandleUseFractionGlyphs takes the characters before and after a slash and
if they match 1/4, 1/2 or 3/4, then they are replaced by the unicode value
for the appropriate glyph
on HandleUseFractionGlyphs(wordBefore, wordAfter)
tell application "InDesign 2.0.1"
if useFractionGlyphs is "normal" then
repeat with oneFractionMap in fractionGlyphMap
if contents of wordBefore is item 1 of item 1 of oneFractionMap and contents of wordAfter is item -1 of item 1 of oneFractionMap then
tell me to HandleOneGlyph(wordBefore, wordAfter, "<" & item 2 of oneFractionMap & ">")
return true
end if
end repeat
end if
return false
end tell
end HandleUseFractionGlyphs
HandleOneGlyph is called from HandleUseFractionGlyphs. It takes the
characters before and after a slash and
a unicode value for the replacement glyph.
It replaces thefraction with the unicode value
and updates the extraOffset property
on HandleOneGlyph(wordBefore, wordAfter, unicodeChar)
tell application "InDesign 2.0.1"
set shouldReplace to true
set theParent to parent of wordBefore
set wordBeforeIndex to index of wordBefore
set wordAfterIndex to index of wordAfter
set contents of text from character wordBeforeIndex to character wordAfterIndex of theParent to unicodeChar
set extraOffset to extraOffset + 2
end tell
end HandleOneGlyphI edited the topic to eliminate the bug discussed here:
Dave Saunders ""Make fraction" script" 5/11/03 4:32am
I've also elevated the status of this topic so that it won't be discarded and it will sort to the top (or near the top) of the archive.
Dave -
CREATE OR REPLACE PROCEDURE return data like SELECT statement
"SELECT * FROM SEARCH_KEYWORD" is successfully done and return the data of the tables. Now, I want to run that on server side using PROCEDURE.
I successfully executed the below scripts. Please teach me how to call the sp_test procedure. OR if you have other way or maybe my scripts are wrong.
CREATE OR REPLACE PACKAGE GLOBALPKG
AS
TYPE RCT1 IS REF CURSOR;
TRANCOUNT INTEGER := 0;
IDENTITY INTEGER;
END;
CREATE OR REPLACE PROCEDURE LPG.sp_test
RCT1 IN OUT GLOBALPKG.RCT1
AS
BEGIN
OPEN RCT1 FOR
SELECT *
FROM SEARCH_KEYWORD;
END;
Here is my table definition:
CREATE TABLE LPG.SEARCH_KEYWORD
FRACTION VARCHAR2(50),
KEYWORD VARCHAR2(50),
PURPOSE VARCHAR2(50),
REMARKS VARCHAR2(50),
DATE_INSERTED DATE DEFAULT sysdate
PCTFREE 10
PCTUSED 40
MAXTRANS 255
TABLESPACE SYSTEM
STORAGE(INITIAL 64K MINEXTENTS 1 MAXEXTENTS 2147483645 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
NOCACHE
LOGGING
Eros
JapanWrong forum. You should ask this question in the SQL and PL/SQL forum.
Couple of comments though. Oracle is not SQL-Server. So calling a procedure that returns a ref cursor is different from a T-SQL macro procedure that functions like a view.
Also, there is no need to use the SQL-Server standard (and silly one at that) of prefixing stored procedures using the text "sp_". In fact, the whole concept of Hungarian-like notation is something of the past and has no place in today's paradigm of software engineering.
As for calling a a proc that returns a ref cursor, from SQL*Plus it will look as follows:
SQL> var c refcursor
SQL>
SQL> exec LPG.sp_test( :c )
SQL> print c
Ref cursor needs to be supported by the client language you use to make this call to Oracle. -
How to use Page to type fraction?
I don't know how to type fraction, can anyone help me? I need the verticle style, not 1/2.
Thanks in advance.prosciutto,
From Pages "Help":
"To set up automatic text substitution:
Choose Pages > Preferences.
Click Auto-Correction and make settings as desired.
To automatically convert single and double quotation marks to smart quotes so that opening and closing quotation marks are not identical, select “Use smart quotes.”
To make sure that the first word in a sentence begins with a capital letter, select “Fix capitalization.”
To automatically convert the letters in “1st,” “2nd,” “3rd,“ and so on into superscripts, select “Superscript numerical suffixes.”
To replace one or more characters with one or more different characters, select “Symbol and text substitution.” Then use the rows in the table to define and activate specific substitutions. For example, when you type (c), you can have Pages automatically convert it to © by putting a checkmark in the On column. To add a row to the table to define your own substitution, click the Add button. To remove a selected item, click the Delete (–) button."
As far as ghostscript, et al. is concerned, take a look here:
http://www.linux-foundation.org/en/OpenPrinting/MacOSX/hpijs -
Text in my headers is now in Fractions
A few days ago parts of my email headers and certain email blasts have text replaced with what looks like fractions.
You can view an example from this screenshot link:
http://www.bigthinkingbythehour.com/FractionType.jpg
Any thoughts?
I'm running Panther 10.3.9jimcourtri,
According to Kurt Lang...Helvetica Fractions is a known source of many font issues. It's really best to delete it from your hard drive and never think about using it again.
;~) -
Does anyone know what the cost is to replace ipad2 if you drop it?
I have an apple care plan that does not cover accidents, this is the second time the screen has cracked. Any ideas on how to get a replacement?
This company will replace the screen for a fraction of the price that Apple charges to replace the iPad. As long as just your glass is cracked and your frame is still in decent condition its a much better deal:
http://www.irepairnational.com/categories/Apple-iPod%2C-iPad-or-iPhone-/iPad--/ -
Cropping to fractional dimensions
I'm trying to print 1x1.3 photos but custom cropping won't let me enter fractional dimensions. I read a posted message about entering it as a ratio (http://discussions.apple.com/thread.jspa?threadID=1400995&tstart=224), such as 10x13. My question is, if I do that, how do I get back to inches and not ratios? After all, a 10x13 ratio could result in a 1x1.3 photo or a 2x2.6 photo.
Welcome to the Apple Discussions. It's all in the size ratio. If you select a ratio that will print your 1 x 1.3 it will also print a 2 x 2.6 but at half the resolution. So when you go to print, you have to set the print size.
In iPhoto you will then have to set the print size in the Custom menu of the Print window.
Click to view full size
TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard. -
Water Damaged Keybord circuit only, can i replace it? 8900 no warranty :(
Hi, I was splashed with water and my 8900 got wet while inside of the rubber cover, which traped the water.
I let it dry for 4 days desassembled, when I turned it back on, operating systems works fine but the enter key is the only thing that works on the keyboard..... all others including the track ball are fried.
Is there a way I can replace the keybord circuit portion? I am not an eletronics engineer.
My other option is to cancel my plan with T-mobile as I refuse to extend by 2 years my plan, as a principle, to get 100 dollars off a new phone that is not even 1/2 as good as this one.
Besides the coverage in my area sucks.
I looked online for refurbished one and they are around 300 dollars, I am looking to find out if the keyboard circuit can be fixed for a fraction of that, and fast.You can try
http://www.bbrepairshop.com/
But if leaving T mobile, Many carriers have been offering sweet deals this month.
Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
BESAdmin's, please make a signature with your BES environment info.
SIM Free BlackBerry Unlocking FAQ
Follow me on Twitter @knottyrope
Want to thank me? Buy my KnottyRope App here
BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V
Maybe you are looking for
-
How to add a Java file from ejbModule to EJBCandidates ?
Hi, In my java client proxy project, I have got the EJBCandidates generated. But I need to add one more java source file from ejbModule to EJBCandidates. If I right click on the java file I need to add, am not getting that option for adding. <b>Pleas
-
While downloading a particular project we are getting this error "An import error occurred The element <ExternalAtrribute> in the <Task> element with UID = 61 has invalid data." This error does not come the first time we press Download. It is thrown
-
Generic Object Services for MB21
Dear friends, I would like to have GOS toolbar for Material Reservation - Tcode - MB21/22/23. Since this is not available in standard I have used implicit enhancement for creating instance of the class CL_GOS_MANAGER when the reservation is created
-
*URGENT* Problem in SOP
Dear gurus, We face a very urgent problem in our Sales & Operations Planning, any help is greatly appreciated. We created a planningtype based on an underlying infostructure. (trx MC8A) The problem we now have is that some numbers that we see in the
-
I want to get Actions name by javascript. Can get Actions name at javascript?