Subscribe Bookmark RSS Feed

Adding Math symbol with JSL Journal Text Box

drblove

Contributor

Joined:

Nov 2, 2016

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
danschikore

Staff

Joined:

Sep 21, 2012

Solution

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.

3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

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
danschikore

Staff

Joined:

Sep 21, 2012

Solution

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.

John_Powell_JMP

Joined:

May 30, 2014

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)