Math & ScienceCan't do what I want in math mode

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
juliette
Posts: 75
Joined: Thu Nov 20, 2008 10:15 pm

Can't do what I want in math mode

Post by juliette »

Hello,
I need to display this expression, and the way it looks like right now is quite ugly:

Code: Select all

\begin{equation}
|\sum_{i \,  \in \, \Xi} \Psi_i |^2
\end{equation}
I would love to be able to make the vertical lines composing the "absolute value function" to cover the entire height of this expression, i.e. from the bottom of the i index up to the top of the summation symbol (or top of the 2, or anything that looks better than what I have right now). And \Big\| is not what I need! Since that gives double vertical lines rather than single!

And I would also love to be able to make the "\in" symbol a little bit smaller so that its base is not lower than the base of my \Xi .

If anyone knows how I may approach these problems, I would GREATLY appreciate your contribution.

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Can't do what I want in math mode

Post by gmedina »

Hi,

the following code contains a progressive solution to your problems:

Code: Select all

\documentclass{report}
\usepackage{amsmath}

\begin{document}

%adjusting the size of delimiters using the \left and \right commands
\begin{equation}
  \left\lvert\sum_{i \,  \in \, \Xi} \Psi_i \right\rvert^2
\end{equation}

%adjusting the size of delimiters using the \Bigg command
\begin{equation}
  \Bigg\lvert\sum_{i \,  \in \, \Xi} \Psi_i \Bigg\rvert^2
\end{equation}

%and reducing the size of the "belongs to" symbol
\begin{equation}
  \left\lvert\sum_{i \,  {\scriptscriptstyle\in} \, \Xi} \Psi_i \right\rvert^2
\end{equation}

%and adjusting the vertical position of the "belongs to" symbol
\begin{equation}
  \left\lvert\sum_{i \,  \raisebox{1pt}{\text{$\scriptscriptstyle\in$}}
 \, \Xi} \Psi_i \right\rvert^2
\end{equation}

\end{document}
The following links contain useful information about adjusting the size of delimiters:
http://www.latex-community.org/viewtopi ... eft#p12899
http://www.latex-community.org/viewtopi ... it=%5CBigg
1,1,2,3,5,8,13,21,34,55,89,144,233,...
juliette
Posts: 75
Joined: Thu Nov 20, 2008 10:15 pm

Re: Can't do what I want in math mode

Post by juliette »

gmedina you are a genius!! My equations look so beautiful now, I appreciate your help SO MUCH.

God bless you!!
daleif
Posts: 199
Joined: Wed Nov 19, 2008 12:46 am

Can't do what I want in math mode

Post by daleif »

Even better solution

Code: Select all

\usepackage{mathtools}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
then

Code: Select all

\abs{x}  => \lvert x \rvert
\abs*{x} => \left\lvert x \right\rvert
\abs[\Big]{x} => \Bigl \lvert x \Bigr \rvert
Post Reply