Math & ScienceDeclareMathOperator

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
heurin22
Posts: 1
Joined: Tue Apr 07, 2009 3:44 am

DeclareMathOperator

Post by heurin22 »

Hello, I'm having trouble with defining an operator using the \DeclareMathOperator* command. I want to have a large Greek letter Xi, of the same size of the summation operator. I've tried

Code: Select all

\DeclareMathOperator*{\newop}{\Large\Xi}
and comparable size-altering commands, with none of them working. Is there any way to do this?

Thank you! :)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

DeclareMathOperator

Post by phi »

The large operators like \sum and \prod are not simply scaled variants of Greek letters, but dedicated symbols with a special font design. You would need to design your own font with the characters you want to get acceptable quality. With the existing fonts, only a quite ugly fake symbol is possible:

Code: Select all

\newcommand*\newop{\mathop{\raisebox{-7pt}{\normalfont\Huge\symbol{4}}}}
toman
Posts: 1
Joined: Tue Apr 14, 2009 1:39 am

Re: DeclareMathOperator

Post by toman »

OK, first post, so hope this isn't stupid, but could this functionality be put on the wish-list for the next version of Latex? How do you go about this?
I work with the Lognormal and Normal distributions quite a bit and it would be good to get a variable-scale capital greek Phi as a symbol.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

DeclareMathOperator

Post by localghost »

toman wrote:OK, first post, so hope this isn't stupid, but could this functionality be put on the wish-list for the next version of Latex? How do you go about this?
I work with the Lognormal and Normal distributions quite a bit and it would be good to get a variable-scale capital greek Phi as a symbol.
Apparently these distributions are more specifically functions [1,2]. Moreover I can't see any big Phi that is associated to them as an operator.

Even if there would be a mathematical application for such an operator, this would not make its way into the LaTeX kernel but would more likely be translated in the form of a new package (or the supplement of an existing one).

For the present I would consider the solution suggested by phi as sufficient.

[1] Normal distribution - Wikipedia, the free encyclopedia
[2] Log-normal distribution - Wikipedia, the free encyclopedia


Best regards and welcome to the board
Thorsten¹
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

DeclareMathOperator

Post by phi »

toman wrote:OK, first post, so hope this isn't stupid, but could this functionality be put on the wish-list for the next version of Latex? How do you go about this?
That is basically a font issue and has little impact on LaTeX. TeX fonts have a specific mechanism to make variable-sized operators like \sum work. Similar symbols wouldn't pose any technical problem.
I work with the Lognormal and Normal distributions quite a bit and it would be good to get a variable-scale capital greek Phi as a symbol.
I'm wondering whether variable-sized (n-ary) Chi and Phi letters actually exist. The Comprehensive Symbols List doesn't include them, neither does Unicode; and the Unicode consortium works hard to include all common mathematical symbols. These two might be very recent additions, or just too uncommon. Just out of curiosity, could you name a source (textbook, article...) where they actually appear?
Remco
Posts: 1
Joined: Sun Apr 26, 2009 10:52 am

DeclareMathOperator

Post by Remco »

I'm also looking for this functionality. I my case, I want a \forall and \exists operator that looks and behaves like \sum. Though I don't know of any existing litterature using this notation I believe it makes some statements a lot easier to read.

I do not quite understand the

Code: Select all

\newcommand*\newop{\mathop{\raisebox{-7pt}{\normalfont\Huge\symbol{4}}
example, could you please give an example of how to use it? Could you perhaps rewrite \sum^i_N n_i using only \Sigma as an example?
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

DeclareMathOperator

Post by phi »

Remco wrote:I'm also looking for this functionality. I my case, I want a \forall and \exists operator that looks and behaves like \sum. Though I don't know of any existing litterature using this notation I believe it makes some statements a lot easier to read.
Actually I know this notation, too. One of my math profs was using it during his lecture. The received opinion for typeset text seems to avoid \forall and \exists altogether, replacing them with textual notation. Regarding the literature, that is basically a self-fulfilling prophecy: Most math literature is written in TeX, and since the standard TeX fonts don't include n-ary \forall or \exists, they are avoided.
Remco wrote:I do not quite understand the

Code: Select all

\newcommand*\newop{\mathop{\raisebox{-7pt}{\normalfont\Huge\symbol{4}}
example, could you please give an example of how to use it? Could you perhaps rewrite \sum^i_N n_i using only \Sigma as an example?

Code: Select all

\mathop{\raisebox{-7pt}{\normalfont\Huge\symbol{6}}_N n_i
should give similar results. The OT1 encoding places the Σ at position 6; \raisebox shifts its contents vertically; and \mathop makes the whole thing behave like \sum (in terms of spacing and index placement).
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

DeclareMathOperator

Post by localghost »

Remco wrote:I'm also looking for this functionality. I my case, I want a \forall and \exists operator that looks and behaves like \sum. Though I don't know of any existing litterature using this notation I believe it makes some statements a lot easier to read. [...]
For this purpose there is an alternative notation for quantification [1]. These symbols exist in variable sizes.

Code: Select all

\begin{align}
  \forall x&=\bigwedge_x \\
  \exists x&=\bigvee_x
\end{align}
Supplement (4/27/2009):
Today I found a very interesting solution in a blog (by mbork) brought to me via RSS feed [2]. This should exactly do what you want.

[1] Quantification - Wikipedia, the free encyclopedia
[2] Marcin Borkowski - Fun with quantifiers (en)


Best regards and welcome to the board
Thorsten¹
Post Reply