mersenneforum.org copy/paste k*b^n+c
 Register FAQ Search Today's Posts Mark Forums Read

 2010-12-16, 13:35 #1 TimSorbet Account Deleted     "Tim Sorbera" Aug 2006 San Antonio, TX USA 11×389 Posts copy/paste k*b^n+c Here's a minor problem I've come across, and a relatively simple solution to it: When a number is represented like 243112609-1, it looks nice, but if you copy/paste it into a plain text field without being careful to preserve formatting, it ends up looking like 243112609-1. Of course, if it was just 2^43112609-1 to begin with, it would copy ok, but then it's not superscript. Then I remembered this little trick to make something appear one way and copy another way. As you might expect, this same trick can be used to fix this problem! Try it at http://www.w3schools.com/html/tryit....=tryhtml_intro, paste this into the body: Code:  87800*6^398859+1 It will appear as 87800*6398859+1, but when you copy it, it will come out as 87800*6^398859+1. You could also use this to make it copy into forum-formatted [sup] codes, like this: (with the same style block as before) Code: 87800*6[sup]398859[/sup]+1 That will make it look like 87800*6398859+1, then when you copy it into a forum that supports the [sup] tag to superscript text, it looks like this: 87800*6398859+1 I think it'd be cool if sites that list primes in that sort of form (e.g. Top 5000, Wikipedia) used something like this, so meaning isn't lost when you copy/paste into a form like this one. Also, this forum could make tags like [sup] but with this (i.e. it looks the same as [sup] but it copies as ^, or [sup], or [thenewtag]) Last fiddled with by TimSorbet on 2010-12-16 at 14:16
2010-12-16, 14:21   #2
CRGreathouse

Aug 2006

10111011000112 Posts

Quote:
 Originally Posted by Mini-Geek Also, this forum could make tags like [sup] but with this (i.e. it looks the same as [sup] but it copies as ^, or [sup], or [thenewtag])
I'd like to see that.

 2010-12-16, 18:43 #3 axn     Jun 2003 22·32·151 Posts tex tag does it here: $8*2^5-1$ You can select the image and do copy/paste, and it will give you the underlying text.
2010-12-16, 19:02   #4
TimSorbet
Account Deleted

"Tim Sorbera"
Aug 2006
San Antonio, TX USA

102678 Posts

Quote:
 tex tag does it here: You can select the image and do copy/paste, and it will give you the underlying text.
I guess it depends on the browser (mine is Chrome 8.0.552.224, its result is above). "8*2^5-1" is the alt and title text for the image, but not all browsers copy that as text in place of the image. On the other hand, just hiding some text due to CSS trickery should still make it copy/paste correctly in any browser. In a strange configuration that ignores or misunderstands that CSS, it might show up as 87800*6^398859+1 or 87800*6^398859+1 (neither too bad). Besides that, I can't think of a good argument for why my idea is really better than just using Tex for this, except that you might want to keep it as text, just with a superscript, instead of making it a Tex image. Also, Tex images usually have other complicated formatting, so people may not be used to the idea of copy/pasting it and getting good-looking human-readable results.

Last fiddled with by TimSorbet on 2010-12-16 at 19:03

 Similar Threads Thread Thread Starter Forum Replies Last Post wildrabbitt Hardware 5 2017-05-10 13:07 Mark Rose Hardware 14 2015-11-03 02:23 kracker Hardware 50 2015-02-23 23:41 storm5510 Software 5 2013-10-29 12:34 roger Information & Answers 6 2008-04-30 01:55

All times are UTC. The time now is 01:37.

Fri Feb 3 01:37:59 UTC 2023 up 168 days, 23:06, 1 user, load averages: 1.52, 1.35, 1.13