[Tex/LaTex] Legendre symbol in theory of numbers fractionsmath-modesymbols How can I get a Legendre symbol , which just used the dashed line instead of the fractional rule? Best Answer \documentclass[a4paper]{article} \usepackage{amsmath} \makeatletter \def\legendre@dash#1#2{\hb@xt@#1{% \kern-#2\p@ \cleaders\hbox{\kern.5\p@ \vrule\@height.2\p@\@depth.2\p@\@width\p@ \kern.5\p@}\hfil \kern-#2\p@ }} \def\@legendre#1#2#3#4#5{\mathopen{}\left( \sbox\z@{$\genfrac{}{}{0pt}{#1}{#3#4}{#3#5}$}% \dimen@=\wd\z@ \kern-\p@\vcenter{\box0}\kern-\dimen@\vcenter{\legendre@dash\dimen@{#2}}\kern-\p@ \right)\mathclose{}} \newcommand\legendre[2]{\mathchoice {\@legendre{0}{1}{}{#1}{#2}} {\@legendre{1}{.5}{\vphantom{1}}{#1}{#2}} {\@legendre{2}{0}{\vphantom{1}}{#1}{#2}} {\@legendre{3}{0}{\vphantom{1}}{#1}{#2}} } \def\dlegendre{\@legendre{0}{1}{}} \def\tlegendre{\@legendre{1}{0.5}{\vphantom{1}}} \makeatother \begin{document} $\genfrac(){}{0}{a}{b}$ $\dlegendre{a}{b}\dlegendre{10}{20}$ $\genfrac(){}{}{a}{b}\legendre{a}{b}\legendre{100}{200}$ $\scriptstyle\genfrac(){}{}{a}{b}\legendre{a}{b}\legendre{10}{20}$ $\scriptscriptstyle\genfrac(){}{}{a}{b}\legendre{a}{b}\legendre{10}{20}$ $\displaystyle\legendre{a}{b}\textstyle\legendre{a}{b} \scriptstyle\legendre{a}{b}\scriptscriptstyle\legendre{a}{b}$ \end{document} The user command are \legendre that typesets the symbol in the current math style or \dlegendre and \tlegendre to force display or text style. The \genfrac parts are only for comparisons. Related Solutions[Tex/LaTex] How to make the ‘such that’ symbol from Set Theory \mid, as it has the spacing of a binary relation. If you want it to resize, see “How to automatically resize the vertical bar in a set comprehension?”. Have a look at “How to look up a math symbol?” for ideas how you can easily find a particular symbol. [Tex/LaTex] How to write larger \natural symbol Saying \limits does not increase the size of the summation symbol, it just moves the limits. \documentclass{article} \usepackage{amsmath} \begin{document} $\sum\limits_{i=1}^n$ \quad $\sum_{i=1}^n$ \quad \end{document} If you want to do the same with the \natural symbol you need to use \mathop. $\natural_{i=1}^n$ \quad $\mathop\natural\limits_{i-1}^n$ If you actually want a larger \natural you can create one with \large, \Large, etc. \[ \mathop{\hbox{\Large$\natural$}}\limits_{i=1}^n \natural \] You could also use \scalebox from the graphicx package. Related Question[Tex/LaTex] Howto typeset the direct current symbol in LaTeX[Tex/LaTex] Dashed left arrow over symbol[Tex/LaTex] Looking for a specific symbol used in set theory, can’t find on detexify[Tex/LaTex] How to insert a dashed line over a bigwedge symbol so that the dashed line behaves like overline would[Tex/LaTex] Problem producing pounds symbol (£) in math mode[Tex/LaTex] Graph theory notation
Best Answer
The user command are
\legendre
that typesets the symbol in the current math style or\dlegendre
and\tlegendre
to force display or text style.The
\genfrac
parts are only for comparisons.