I am trying to define a new operation that will accept an index (like \min) so that the index will appear beneath the operator in math display mode. Does anyone know how to do this?
thanks!
General ⇒ need help defining new operations with indices
-
- Posts: 1
- Joined: Thu Feb 08, 2007 7:25 pm
NEW: TikZ book now 40% off at Amazon.com for a short time.
need help defining new operations with indices
Hi,
something like this?
Regards
Kris
something like this?
Code: Select all
\documentclass{article}
\newcommand{\NewOperator}[1]{\mathbf{NewOperator}_{#1}}
\begin{document}
$\NewOperator{\min} + 1 = \max$
\end{document}
Kris
Last edited by Kris on Thu Feb 08, 2007 7:40 pm, edited 1 time in total.
need help defining new operations with indices
Hi Matt,
okay, now I understand...You can achieve this
by using the amsmath-package:
You can declare new Operators with the two commands
\DeclareMathOperator and \DeclareMathOperator*.
The first one will give You sub- and superscript indices,
the one with '*' produces indices above and below the new operator...
Hope this helps!
Greetings
Kris
okay, now I understand...You can achieve this
by using the amsmath-package:
Code: Select all
\documentclass{article}
\usepackage{amsmath} % loading amsmath-package
%...
\DeclareMathOperator{\test}{test} % declare operator \test with sub- and superscript indices
\DeclareMathOperator*{\eff}{eff} % declare operator \eff with above and below indices
%...
\begin{document}
\[
\test_u \neq \eff_u % testing new operators in math-display mode...
\]
\end{document}
\DeclareMathOperator and \DeclareMathOperator*.
The first one will give You sub- and superscript indices,
the one with '*' produces indices above and below the new operator...
Hope this helps!
Greetings
Kris