NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Questions related to EJS => Topic started by: lookang on August 13, 2007, 01:32:16 pm



Title: ^ = superscript , _ = subscript , what key go back to normal
Post by: lookang on August 13, 2007, 01:32:16 pm
The common way in Latex to have super- subscript is to use ^ and _ in math mode.

^ = superscript , _ = subscript , what key go back to normal ?

i tried $      $ also can't do it

i know now %   % store the value in the variable

what key go back to normal  ;D

i look for the answer in the net for a long time still can't find any good tips?

chance to help . thanks!




Title: Re: ^ = superscript , _ = subscript , what key go back to normal
Post by: lookang on August 13, 2007, 01:57:06 pm
i did it!!!

{s_y} versus s_x

causes

this!!

cool, i solve the problem  ;D


Title: Re: ^ = superscript , _ = subscript , what key go back to normal
Post by: Fu-Kwun Hwang on August 13, 2007, 02:26:23 pm
That is the standard TeX/LateX syntax.
You can check out LaTeX mathematic equation related document about those syntax.
There are some html which explain those syntax for equations displayed in EJS (http://www.phy.ntnu.edu.tw/demolab/phpBB/viewforum.php?forum=21). However, it was all written in Chinese (my Chinese version of physics discussion forum (http://www.phy.ntnu.edu.tw/demolab/phpBB/).).

Actually, the equation displayed used in EJS was originally from HotEqn - Equation Viewer
 (http://www.atp.ruhr-uni-bochum.de/VCLab/software/HotEqn/HotEqn.html)
You can check out their web site for more information.


Title: Re: ^ = superscript , _ = subscript , what key go back to normal
Post by: lookang on August 13, 2007, 03:57:38 pm
good information prof hwang

thanks


Title: Re: ^ = superscript , _ = subscript , what key go back to normal
Post by: lookang on December 19, 2008, 10:01:43 am
i am having problem displaying

m1 , m2 , m3, m4 ....... on the mass balls on the newtons cradle applet.

i use

 for (int j=0; j < n; j++) {
   l_m[j]="m"+(j+1);
   }

but the display is m 1 , m 2 , ..... and so on.

i tried looking up the HotEqn - Equation Viewer http://www.atp.ruhr-uni-bochum.de/VCLab/software/HotEqn/HotEqn.html

but the example there seems to be for a static subscript say {v_x} where x is not changing.

now my display subscript changing from 1 to 2 to 3 ..... to 7

any idea what syntax to use?

thanks!


Title: Re: ^ = superscript , _ = subscript , what key go back to normal
Post by: Fu-Kwun Hwang on December 21, 2008, 09:41:40 am
It works with version 3.47 and 4.0
But it did not work with 4.1
It seems to be a bug. I will tell Paco.