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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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