Math & Science"def" and "=", one above the other

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
telebabbo
Posts: 3
Joined: Sat Oct 01, 2011 1:53 pm

"def" and "=", one above the other

Post by telebabbo »

Hi all, just as I tried to explain in the title, I would be able to write this symbol:
Image

I've read all amssym documentation and latex math basics but I can't find it!

I state this is my very first time in LaTeX, maybe I'm still missing some important knowledges...

Thank you!
Last edited by telebabbo on Tue Oct 04, 2011 4:59 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.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

"def" and "=", one above the other

Post by Stefan Kottwitz »

You could use \stackrel. I recommend defining a macro for that, so you define it one time in the preamble and use it often in the text. If you would like to change it, you need to do it just at this one place in the definition in the preamble.

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\newcommand*{\defeq}{\stackrel{\text{def}}{=}}
\begin{document}
$A\defeq B$
\end{document}
Another example for sans serif def as in your question:

Code: Select all

\usepackage{relsize}
\newcommand*{\defeq}{\stackrel{\mathsmaller{\mathsf{def}}}{=}}
I don't see a need for making it italic. Normal text (and operators) are commonly upright, while variables are italic. def should look different compared to the product of d, e and f.

Stefan
LaTeX.org admin
telebabbo
Posts: 3
Joined: Sat Oct 01, 2011 1:53 pm

"def" and "=", one above the other

Post by telebabbo »

Uhm, thank you Stefan_K, but it does not compile!

Code: Select all

Decidere se $ \mathbf{Z} $ rispetto all'operazione $$ a \circ b  \defeq a + b + ab $$ è un gruppo.
returns:

Code: Select all

(/usr/local/texlive/2011/texmf-dist/tex/generic/babel/babel.def)))
(./matematica_discreta.aux)
! Undefined control sequence.
<argument> \text 
                 {def}
l.18 ...ispetto all'operazione $ a \circ b  \defeq
                                                   a + b + ab $ è un gruppo.
(I've just copypasted your \newcommand declaration in the preamble)
Tell me if you need more code!
telebabbo
Posts: 3
Joined: Sat Oct 01, 2011 1:53 pm

Re: "def" and "=", one above the other

Post by telebabbo »

Sorry for the previous post, I've missed to give \usepackage{amsmath}!
It works perfectly! Thank you very much! :)
Post Reply