Math & ScienceHaving trouble with alignment in equation

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
jb4t5
Posts: 4
Joined: Fri Sep 03, 2010 3:31 pm

Having trouble with alignment in equation

Post by jb4t5 »

Hello,
I'm teaching myself LaTeX so I can help the applied mathematics professor I work for typeset his work. I'm practicing using an older document and need to figure out how to get:

Code: Select all

\begin{equation}\label{e1.2}
\|f\|_{L^{\infty}(a, b; X)} = Ess Sup_{[a, b]} \|f(t)\|_{X}.
\end{equation}
to display where

Code: Select all

Ess Sup
is centered on the horizontal line, and

Code: Select all

[a, b]
below as if it were in the "\limits" subscripting environment.

I'm using WinEdt as my editor, and basically have every LaTeX package imaginable.

any help is greatly appreciated and will help another gain more knowledge of the fickle language we call LaTeX :D .
Last edited by jb4t5 on Fri Sep 03, 2010 4:50 pm, edited 1 time in total.

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

Having trouble with alignment in equation

Post by gmedina »

Hi,

use the \DeclareMathOperator* command from amsmath:

Code: Select all

\documentclass{article}
\usepackage{amsmath}

\DeclareMathOperator*{\esup}{Ess\ Sup}

\begin{document}

\begin{equation}\label{e1.2}
  \esup\limits_{[a, b]}.
\end{equation}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
jb4t5
Posts: 4
Joined: Fri Sep 03, 2010 3:31 pm

Re: Having trouble with alignment in equation

Post by jb4t5 »

is there a way to accomplish this without the use of a macro?
Also, the "Sup" is capitalized in the document I'm using and i've been instructed to reproduce this.
User avatar
jb4t5
Posts: 4
Joined: Fri Sep 03, 2010 3:31 pm

Having trouble with alignment in equation

Post by jb4t5 »

Hello,
So far I have gotten this to work in this manner:

Code: Select all

\begin{equation}\label{e1.2}
\|f\|_{L^{\infty}(a, b; X)} = \raisebox{-1.5ex}[0ex]{\stackrel{\displaystyle{Ess Sup}}{_{[a, b]}} \|f(t)\|_{X}.
\end{equation}
but if I recall correctly, this should only be used for scooting text up and down?
It compiles but says I'm missing a "$" if i can figure out what's missing, this will suffice.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Having trouble with alignment in equation

Post by frabjous »

Why don't you want to declare a new operator? That's good practice in cases like this.

Anyway, \raisebox takes you out of math mode, so if you wanted to use it in an equation, you'd need to put yourself back into math mode on the inside...

\raisebox{height}{$...$}

You've also got a mismatched number of braces in your example, and it was unclear exactly what you were trying to do. Anyway, what about something like:

Code: Select all

\begin{equation}\label{e1.2}
    \|f\|_{L^{\infty}(a, b; X)} = \mathop{\mathrm{Ess\ Sup}}_{[a, b]} \|f(t)\|_{X}.
\end{equation}
User avatar
jb4t5
Posts: 4
Joined: Fri Sep 03, 2010 3:31 pm

Having trouble with alignment in equation

Post by jb4t5 »

@frabjous: THANKS!, your solution worked wonders, I'd never heard of "\mathop" before now.

sorry about the uneven bracketing, i typed it fast and missed one.

also, the professor I work for is very precise when it comes to how he wants his documents typset (he's set in his ways, being over 70 years old, lol)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Having trouble with alignment in equation

Post by localghost »

If the problem is solved with that, please mark the topic accordingly as described in Section 3 of the Board Rules.


Best regards and welcome to the board
Thorsten
Post Reply