Discussion:
Primed Symbols in Mathematica
(too old to reply)
David Park
2008-11-24 09:07:21 UTC
Permalink
Notice that if you type



x\[Prime] or x\[DoublePrime]



into Mathematica you obtain a perfectly good Symbol that can be used in any
Mathematica expression. And you could use any other leading character(s)
instead of x. The only trouble is that the Prime and DoublePrime sit at too
low a level and therefore this does not look good.



However, WRI has added many characters to the Mathematica character set and
I don't see any reason why they couldn't add prime and double prime
characters that DO sit at the correct level. This would make it very easy to
use primed symbols without any other special programming or routines.



I have to admit that I have broached this idea before and so far have not
found even a single Mathematica user that was interested in such a facility.
Still, primed symbols are very common in textbooks and papers and it seems
to me that it would be useful to have an easy access to them in Mathematica.





David Park

***@comcast.net

<http://home.comcast.net/~djmpark> http://home.comcast.net/~djmpark
mark mcclure
2008-11-24 11:45:35 UTC
Permalink
Post by David Park
Notice that if you type
x\[Prime] or x\[DoublePrime]
into Mathematica you obtain a perfectly good Symbol that can
be used in any Mathematica expression. And you could use any
other leading character(s) instead of x. The only trouble is
that the Prime and DoublePrime sit at too low a level and
therefore this does not look good.
These symbols are meant to be used as superscripts. At least,
that was the convention used by MiER and TMJ.

Mark McClure
David Park
2008-11-25 12:15:34 UTC
Permalink
But WRI could provide us with some OTHER characters that could be used for
primes and doubleprimes.


David Park
***@comcast.net
http://home.comcast.net/~djmpark
Post by David Park
Notice that if you type
x\[Prime] or x\[DoublePrime]
into Mathematica you obtain a perfectly good Symbol that can
be used in any Mathematica expression. And you could use any
other leading character(s) instead of x. The only trouble is
that the Prime and DoublePrime sit at too low a level and
therefore this does not look good.
These symbols are meant to be used as superscripts. At least,
that was the convention used by MiER and TMJ.

Mark McClure
John Fultz
2008-11-25 12:17:20 UTC
Permalink
You might find other characters in the Unicode spec which are treated by
Mathematica as letter-like, but have the appearance you want. For example, on
my Vista system, \:02b9 displays fine (unfortunately, \:02ba, the doubled
version, does not). Japanese has a double prime at \301e, but it won't look as
nice since it's being pulled from whatever Japanese font the system determines
should be substituted for your font.

There's an advantage to using these since they're in standard Unicode positions,
but your mileage may vary from system to system and font to font as to whether
there's actually a glyph for the character or not.

Sincerely,

John Fultz
***@wolfram.com
User Interface Group
Wolfram Research, Inc.
Post by David Park
Notice that if you type
x\[Prime] or x\[DoublePrime]
into Mathematica you obtain a perfectly good Symbol that can be used in
any Mathematica expression. And you could use any other leading
character(s) instead of x. The only trouble is that the Prime and
DoublePrime sit at too low a level and therefore this does not look good.
However, WRI has added many characters to the Mathematica character set
and I don't see any reason why they couldn't add prime and double prime
characters that DO sit at the correct level. This would make it very easy
to use primed symbols without any other special programming or routines.
I have to admit that I have broached this idea before and so far have not
found even a single Mathematica user that was interested in such a
facility. Still, primed symbols are very common in textbooks and papers
and it seems to me that it would be useful to have an easy access to them
in Mathematica.
David Park
<http://home.comcast.net/~djmpark> http://home.comcast.net/~djmpark
Kevin J. McCann
2008-11-26 10:16:11 UTC
Permalink
I use a Superscript and then esc ' esc. This gives a nice big single
quote for a prime. You need to Symbolize the symbol this with the
Notation package. Works just fine. Here is an example


\!\(\*SuperscriptBox["A", "\[Prime]"]\)

Past this into a nb.

Kevin
Post by John Fultz
You might find other characters in the Unicode spec which are treated by
Mathematica as letter-like, but have the appearance you want. For example, on
my Vista system, \:02b9 displays fine (unfortunately, \:02ba, the doubled
version, does not). Japanese has a double prime at \301e, but it won't look as
nice since it's being pulled from whatever Japanese font the system determines
should be substituted for your font.
There's an advantage to using these since they're in standard Unicode positions,
but your mileage may vary from system to system and font to font as to whether
there's actually a glyph for the character or not.
Sincerely,
John Fultz
User Interface Group
Wolfram Research, Inc.
Post by David Park
Notice that if you type
x\[Prime] or x\[DoublePrime]
into Mathematica you obtain a perfectly good Symbol that can be used in
any Mathematica expression. And you could use any other leading
character(s) instead of x. The only trouble is that the Prime and
DoublePrime sit at too low a level and therefore this does not look good.
However, WRI has added many characters to the Mathematica character set
and I don't see any reason why they couldn't add prime and double prime
characters that DO sit at the correct level. This would make it very easy
to use primed symbols without any other special programming or routines.
I have to admit that I have broached this idea before and so far have not
found even a single Mathematica user that was interested in such a
facility. Still, primed symbols are very common in textbooks and papers
and it seems to me that it would be useful to have an easy access to them
in Mathematica.
David Park
<http://home.comcast.net/~djmpark> http://home.comcast.net/~djmpark
Steve Luttrell
2008-11-26 10:10:19 UTC
Permalink
I find that both the \:02b9 (single prime) and the \:02ba (double prime)
display OK on my Vista system. The double prime looks exactly (same size and
height) like a doubled version of the single prime.
--
Stephen Luttrell
West Malvern, UK
Post by John Fultz
You might find other characters in the Unicode spec which are treated by
Mathematica as letter-like, but have the appearance you want. For example, on
my Vista system, \:02b9 displays fine (unfortunately, \:02ba, the doubled
version, does not). Japanese has a double prime at \301e, but it won't look as
nice since it's being pulled from whatever Japanese font the system determines
should be substituted for your font.
There's an advantage to using these since they're in standard Unicode positions,
but your mileage may vary from system to system and font to font as to whether
there's actually a glyph for the character or not.
Sincerely,
John Fultz
User Interface Group
Wolfram Research, Inc.
Post by David Park
Notice that if you type
x\[Prime] or x\[DoublePrime]
into Mathematica you obtain a perfectly good Symbol that can be used in
any Mathematica expression. And you could use any other leading
character(s) instead of x. The only trouble is that the Prime and
DoublePrime sit at too low a level and therefore this does not look good.
However, WRI has added many characters to the Mathematica character set
and I don't see any reason why they couldn't add prime and double prime
characters that DO sit at the correct level. This would make it very easy
to use primed symbols without any other special programming or routines.
I have to admit that I have broached this idea before and so far have not
found even a single Mathematica user that was interested in such a
facility. Still, primed symbols are very common in textbooks and papers
and it seems to me that it would be useful to have an easy access to them
in Mathematica.
David Park
<http://home.comcast.net/~djmpark> http://home.comcast.net/~djmpark
DrMajorBob
2008-11-27 10:30:00 UTC
Permalink
Any clue, anyone, how we're supposed to ENTER these characters?

Bobby

On Wed, 26 Nov 2008 04:10:24 -0600, Steve Luttrell
Post by Steve Luttrell
I find that both the \:02b9 (single prime) and the \:02ba (double prime)
display OK on my Vista system. The double prime looks exactly (same size
and
height) like a doubled version of the single prime.
--
***@longhorns.com
DrMajorBob
2008-11-27 10:31:25 UTC
Permalink
... I'm sure this is documented somewhere inside the bottom drawer of a
filing cabinet ...
What an optimist you are!!

So far I've found this mentioned in the tutorial at
tutorial/RawCharacterEncodings.

I can, indeed, enter the single quote as \:02b9, but the null byte "\0"
from the same page yields a syntax error:

\0

Syntax::sntoct1: 3 octal digits are required after \ to construct an 8-bit
character.

Syntax::sntxi: Incomplete expression; more input is needed.


The second method (Character Map) can't work well anywhere, can it, as
these characters are visually indistinguishable from others that lack the
desired properties?

Bobby
You type exactly the string "\:02b9" (without the "") and just as you hit
the "9" Mathematica will realise what you want and replace it by a single
prime. I'm sure this is documented somewhere inside the bottom drawer of
a
filing cabinet ...
Alternatively, in Windows at least, you can use the Character Map, and
scroll down to find the relevant characters. They come just after the
first
large block of alphabetic characters in the Arial font.
Stephen Luttrell
West Malvern, UK
-----Original Message-----
Sent: 26 November 2008 18:30
Subject: Re: Re: Primed Symbols in Mathematica
Any clue, anyone, how we're supposed to ENTER these characters?
Bobby
On Wed, 26 Nov 2008 04:10:24 -0600, Steve Luttrell
Post by Steve Luttrell
I find that both the \:02b9 (single prime) and the \:02ba (double
prime)
Post by Steve Luttrell
display OK on my Vista system. The double prime looks exactly (same
size
Post by Steve Luttrell
and
height) like a doubled version of the single prime.
--
--
***@longhorns.com
John Fultz
2008-11-27 10:33:01 UTC
Permalink
I don't see anything about the null byte discussed on the tutorial page you
point to (from either v6 or v7 documentation). I do see a reference to it on
this page...

tutorial/InputSyntax

where it explicitly mentions that it's \000 (not, as you say, \0).

I don't understand your last remark about Character Map. There's no reason
that it or utilities like it on other platforms shouldn't work just fine in
Mathematica.

Yes, this is somewhat obscure in the documentation, and has been since it was
originally documented in the version 3 book. But come on! It's an obscure
point!

It ties into the underlying representation of Unicode characters (and let me
emphasize, this is standard Unicode and system fonts here...nothing specific to
Mathematica). If you had a keyboard with such a character on it (assuming such
a keyboard exists), it would Just Work. If you use a utility (like Character
Map) which allows you to look at the full range of supported Unicode characters
on your system and paste them into applications, it would Just Work.

So in addition to those far easier methods of inserting characters, Mathematica
additionally exposes this detail of the underlying implementation as an obscure
way to get any character you want, if you understand Unicode, if you understand
hex, if you need a character that isn't in the Special Characters palette. It
really shouldn't be surprising that this isn't a headline documentation item.

I apologize for not better explaining myself in my earlier email. My email
lacked the details mentioned here because I was in a hurry and I knew that
David would understand precisely what I meant.

Sincerely,

John Fultz
***@wolfram.com
User Interface Group
Wolfram Research, Inc.
Post by DrMajorBob
... I'm sure this is documented somewhere inside the bottom drawer of a
filing cabinet ...
What an optimist you are!!
So far I've found this mentioned in the tutorial at
tutorial/RawCharacterEncodings.
I can, indeed, enter the single quote as \:02b9, but the null byte "\0"
\0
Syntax::sntoct1: 3 octal digits are required after \ to construct an 8-bit
character.
Syntax::sntxi: Incomplete expression; more input is needed.
The second method (Character Map) can't work well anywhere, can it, as
these characters are visually indistinguishable from others that lack the
desired properties?
Bobby
You type exactly the string "\:02b9" (without the "") and just as you
hit the "9" Mathematica will realise what you want and replace it by a
single prime. I'm sure this is documented somewhere inside the bottom
drawer of a filing cabinet ...
Alternatively, in Windows at least, you can use the Character Map, and
scroll down to find the relevant characters. They come just after the
first
large block of alphabetic characters in the Arial font.
Stephen Luttrell
West Malvern, UK
-----Original Message-----
Sent: 26 November 2008 18:30
Subject: Re: Re: Primed Symbols in Mathematica
Any clue, anyone, how we're supposed to ENTER these characters?
Bobby
On Wed, 26 Nov 2008 04:10:24 -0600, Steve Luttrell
Post by Steve Luttrell
I find that both the \:02b9 (single prime) and the \:02ba (double
prime)
Post by Steve Luttrell
display OK on my Vista system. The double prime looks exactly (same
size
Post by Steve Luttrell
and
height) like a doubled version of the single prime.
--
DrMajorBob
2008-11-27 10:34:05 UTC
Permalink
This:

\[Backslash]0 null byte (code 0)
\[Backslash].nn a character with hexadecimal code nn
\:nnnn a character with hexadecimal code nnnn

is copy/pasted from

tutorial/CharacterCodes

Sorry for the mixup on what page I was viewing, but as you see, the null
byte coding is wrong, above.
Post by John Fultz
emphasize, this is standard Unicode and system fonts here...nothing
specific to Mathematica).
Everything I do is specific to Mathematica. (Or Photoshop Elements, Opera,
MS Money, or Acrobat Standard 8.)

No other tools here, my friend, Unicode or otherwise!

Bobby
Post by John Fultz
I don't see anything about the null byte discussed on the tutorial page
you
point to (from either v6 or v7 documentation). I do see a reference to
it on
this page...
tutorial/InputSyntax
where it explicitly mentions that it's \000 (not, as you say, \0).
I don't understand your last remark about Character Map. There's no
reason that
it or utilities like it on other platforms shouldn't work just fine in
Mathematica.
Yes, this is somewhat obscure in the documentation, and has been since
it was
originally documented in the version 3 book. But come on! It's an
obscure
point!
It ties into the underlying representation of Unicode characters (and
let me
emphasize, this is standard Unicode and system fonts here...nothing
specific to
Mathematica). If you had a keyboard with such a character on it
(assuming such
a keyboard exists), it would Just Work. If you use a utility (like
Character
Map) which allows you to look at the full range of supported Unicode
characters
on your system and paste them into applications, it would Just Work.
So in addition to those far easier methods of inserting characters,
Mathematica
additionally exposes this detail of the underlying implementation as an
obscure
way to get any character you want, if you understand Unicode, if you
understand
hex, if you need a character that isn't in the Special Characters
palette. It
really shouldn't be surprising that this isn't a headline documentation
item.
I apologize for not better explaining myself in my earlier email. My
email
lacked the details mentioned here because I was in a hurry and I knew
that David
would understand precisely what I meant.
Sincerely,
John Fultz
User Interface Group
Wolfram Research, Inc.
Post by DrMajorBob
... I'm sure this is documented somewhere inside the bottom drawer of a
filing cabinet ...
What an optimist you are!!
So far I've found this mentioned in the tutorial at
tutorial/RawCharacterEncodings.
I can, indeed, enter the single quote as \:02b9, but the null byte "\0"
\0
Syntax::sntoct1: 3 octal digits are required after \ to construct an
8-bit
character.
Syntax::sntxi: Incomplete expression; more input is needed.
The second method (Character Map) can't work well anywhere, can it, as
these characters are visually indistinguishable from others that lack
the
desired properties?
Bobby
On Wed, 26 Nov 2008 12:55:13 -0600, Steve Luttrell
You type exactly the string "\:02b9" (without the "") and just as you
hit the "9" Mathematica will realise what you want and replace it by a
single prime. I'm sure this is documented somewhere inside the bottom
drawer of a filing cabinet ...
Alternatively, in Windows at least, you can use the Character Map, and
scroll down to find the relevant characters. They come just after the
first
large block of alphabetic characters in the Arial font.
Stephen Luttrell
West Malvern, UK
-----Original Message-----
Sent: 26 November 2008 18:30
Subject: Re: Re: Primed Symbols in Mathematica
Any clue, anyone, how we're supposed to ENTER these characters?
Bobby
On Wed, 26 Nov 2008 04:10:24 -0600, Steve Luttrell
Post by Steve Luttrell
I find that both the \:02b9 (single prime) and the \:02ba (double
prime)
Post by Steve Luttrell
display OK on my Vista system. The double prime looks exactly (same
size
Post by Steve Luttrell
and
height) like a doubled version of the single prime.
--
--
***@longhorns.com
Continue reading on narkive:
Loading...