cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
drblove
Level III

Adding Math symbol with JSL Journal Text Box

I am thinking that this is probably very easy, just in a text box, I would like to add a symbol like a capital sigma, or a summation symbol.  I am trying to write an equation in a text box, is this just an html trick?

 

Thank yu in advance,

Brad

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Adding Math symbol with JSL Journal Text Box

Most font families include a number of symbols, which can be used in JMP by specifying their unicode character values.  The advantage of not changing fonts is that you can use all of the regular characters as well as symbols.

 

Names Default To Here( 1 );
new window("Sample",<<journal,
	HLB = H List Box(
		tb1 = Text Box("\!U01A9x\!U00B2")
	)
);
tb1<<set font style("Bold")<<set font size(72);

This should work anywhere in JMP that you can set a string, even if the font cannot be changed.  You can look up Unicode values at http://www.unicode.org/charts/, and there are also font viewers available that will show you the characters that are in the fonts that you have on your machine.  If you stick to common characters then your code will probably be fairly portable, but it's good to know that if you are using less common characters then they may exist in one font but not in another.

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Adding Math symbol with JSL Journal Text Box

You can add markup commands to a text box, and specify, << markup(1) as a second parameter in the text box, You could also try using the function

   Expr as Picture(........)

where you can place a formula into the passing element and it will draw a picture.  I have not figured out how to specify a Sigma using this method

or you can do something more like:

Names Default To Here( 1 );
new window("Sample",<<journal,
	HLB = H List Box(
		tb1 = Text Box("S")
	)
);
tb1<<font("Symbol")<<set font style("Bold")<<set font size(72)


 

Jim

Re: Adding Math symbol with JSL Journal Text Box

Most font families include a number of symbols, which can be used in JMP by specifying their unicode character values.  The advantage of not changing fonts is that you can use all of the regular characters as well as symbols.

 

Names Default To Here( 1 );
new window("Sample",<<journal,
	HLB = H List Box(
		tb1 = Text Box("\!U01A9x\!U00B2")
	)
);
tb1<<set font style("Bold")<<set font size(72);

This should work anywhere in JMP that you can set a string, even if the font cannot be changed.  You can look up Unicode values at http://www.unicode.org/charts/, and there are also font viewers available that will show you the characters that are in the fonts that you have on your machine.  If you stick to common characters then your code will probably be fairly portable, but it's good to know that if you are using less common characters then they may exist in one font but not in another.

Re: Adding Math symbol with JSL Journal Text Box

Unicode characters also often work in HTML while you can't count on symbol fonts being available in web browsers.

Here's Dan's example in JMP, then saved as HTML and viewed in Internet Explorer.

Unicode characters in JMP and a web browser(Internet Explorer)Unicode characters in JMP and a web browser(Internet Explorer)