Subversion Repositories wimsdev

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
23 reyssat 1
 
2
<h3>如何在你的练习里写数学公式.</h3>
3
 
4
在html格式里你也可以嵌入数学符号及公式, 以下是提示及解决方法.
5
<p>
6
如果你只是插入几个数学符号或希腊字母,
7
你只要输入 <tt>\</tt>后接符号或希腊字母的英文名(假定你没有在参数定义里使用过这些名字).
8
例如输入<tt>\pi</tt>可以得到$m_pi,
9
输入<tt>\le</tt>得到$m_le, <tt>\pm</tt>得到$m_pm, <tt>\rightarrow</tt>得到$m_rightarrow, 等等.
10
符号名字都采用标准的TeX命令. 下面是
117 bpr 11
!href target=wims_help module=help/wimsdoc.cn&subject=mathfonts#mathfonts 数学符号及其名称表
23 reyssat 12
 (在名称内把<tt>$$m_</tt>换成<tt>\</tt>).
13
<p>
14
为插入一个完整的数学公式, 你可以采用一般数学软件的输入方法,
15
或按WIMS的计算工具里的输入方法. 为使公式显得更漂亮,
16
你只要把它们用 \() 括起来. 例如输入
17
<tt>\(x^3-3x+cos(2pi*x)^5)</tt>可得到
18
!insmath x^3-3*x+cos(2pi*x)^5
19
, 或输入<tt>\(sqrt(x^2+y^2))</tt>可得
20
!insmath sqrt(x^2+y^2)
21
. 也可输入<tt>\(integrate(x^2+1)dx)</tt>
22
!insmath integrate(x^2+1)*dx
23
,<tt>\(integrate(exp(x^2+1),x=1..infinity))</tt>
24
!insmath integrate(exp(x^2+1),x=1..infinity)
25
. 为得到和式
26
!insmath sum(1/n^2,n=1..infinity)
27
可使用<tt>\(sum(1/n^2,n=1..infinity))</tt>, 乘积式
28
!insmath product(n/(n+1),n=1..infinity)
29
 可使用<tt>\(product(n/(n+1),n=1..infinity))</tt>.
30
<p>
31
如何输入数学公式的更多信息可见
32
!href target=wims_help module=help/main&chapter=1&open=1_math#math 这一页
33
.
34
<p>
35
为显示矩阵
36
!insmath [1,2,3;4,5,6;7,8,9]
37
, 你应该输入<tt>\([1,2,3;4,5,6;7,8,9])</tt>. 矩阵命令也可以嵌套.
38
<p>
39
对于TeX或LaTeX的专家而言, 请注意当软件看到 <tt>\</tt>后接括号时,
40
它就把后面内容看成TeX的源代码, 并且尝试用TeX来编译. 因此你可以用TeX的方式得到相当复杂的公式.
2071 zjchen 41
为了得到行间公式式样的字体, 你可以在圆括号里录入 <tt>\displaystyle</tt>
42
或者一对空的花括号 <tt>{}</tt>.
43
例如, 为了得到
44
!insmath \displaystyle a
45
&nbsp; 你可以输入 <tt>\(\displaystyle a )</tt>
46
<tt>\({} a )</tt>  .
47
而输入  <tt>\( a )</tt>  则得到 &nbsp;
48
!insmath a  .
49
 
23 reyssat 50
<p>
51
如果要在练习里全部使用TeX, 则可选择
52
!href cmd=help&special_parm=format TeX格式
53
 (只能用在练习的陈述部分).