Forgot password?
 Create new account
View 2241|Reply 4

请教数论里的勒让德符号怎么定义。

[Copy link]

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

abababa Posted at 2018-10-28 21:38:15 |Read mode
如题,我定义的如下:
\newcommand{\legendre}[2]{\left(\frac{#1}{#2}\right)}

但是很不好用,比如\legendre{p}{5}和\legendre{5}{p},非常不对齐。
在这里的预览中也是,不能对齐:
\[\left(\frac{p}{5}\right),\left(\frac{5}{p}\right)\]

另外还有分数线,如果用了全局都displaystyle,当遇到$\frac{1}{2}$这种分子分母都只有一个数的时候,就觉得很难看,这个怎么用才好呢?

801

Threads

4888

Posts

310K

Credits

Credits
36170

Show all posts

isee Posted at 2018-10-29 11:01:48

462

Threads

969

Posts

9934

Credits

Credits
9934

Show all posts

青青子衿 Posted at 2018-10-29 13:15:32
回复 1# abababa
  1. \left(\vphantom{\frac{5}{p}}\frac{p}{5}\right),\left(\frac{5}{p}\right)
  2. \left(\vphantom{\vspace*{2in}}\frac{p}{5}\right),\left(\frac{5}{p}\right)
Copy the Code
预览如下
\[\left(\vphantom{\frac{5}{p}}\frac{p}{5}\right),\left(\frac{5}{p}\right)\]
\[\left(\vphantom{\vspace*{2in}}\frac{p}{5}\right),\left(\frac{5}{p}\right)\]
在Mathjax里可以试试这个\vphantom{\frac{5}{p}}(虚拟占位)
至于分式的displaystyle,可以用\dfrac{1}{2}替代\frac{1}{2}

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

 Author| abababa Posted at 2018-10-29 18:35:27
回复 3# 青青子衿

其实这个也一样,就是那个$\frac{5}{p}$,上下两个数字都离分数线有点远,和$\frac{p}{5}$的感觉就不一样。

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

 Author| abababa Posted at 2018-10-29 18:36:23
回复 2# isee

谢谢,虽然把括号弄得一样高了,但最后还是在分子分母和分数线的距离那里有点问题。

手机版Mobile version|Leisure Math Forum

2025-4-21 14:08 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list