Text Formatting(5) on top of =

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Srcee
Posts: 13
Joined: Tue Jun 28, 2011 2:17 pm

(5) on top of =

Post by Srcee »

How to write (5) on top of = ?
The '(5)' should not be left of the '=' (like $=_{(5)}$), but it should be right on top of it.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

(5) on top of =

Post by torbjorn t. »

You can use stackrel.

Code: Select all

\stackrel{(5)}{=}
Srcee
Posts: 13
Joined: Tue Jun 28, 2011 2:17 pm

Re: (5) on top of =

Post by Srcee »

Biggest tnx, it solved my problem :)
Srcee
Posts: 13
Joined: Tue Jun 28, 2011 2:17 pm

Re: (5) on top of =

Post by Srcee »

And what to do if I want the '(5)' to be under the '=' ?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

(5) on top of =

Post by localghost »

Srcee wrote:And what to do if I want the '(5)' to be under the '=' ?
Actually that's not the topic of this thread. But since we are here.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}   % loads »amsmath«

\begin{document}
  \[
    a\underset{(5)}{=} b
  \]
\end{document}
The amsmath package also provides \overset as replacement for the \stackrel command.


Thorsten
Srcee
Posts: 13
Joined: Tue Jun 28, 2011 2:17 pm

Re: (5) on top of =

Post by Srcee »

Tnx a lot :)
Post Reply