# What is a satisfactory way to format definitions in Latex?

There are several ways one may format a definition in latex, but each has their problems.

1. Use the amsthm package, and the usual style for theorems. This will result in everything italicized. It is difficult to catch the term you are defining, even if you non-italicize it.

2. Use the amsthm package, and the style for definitions. This time the term you are defining is the only word/phrase italicized, but the problem is that one does not know where the definition ends. Unlike the proof environment, there is no QED marker, so it is unclear where the definition ends and when the next paragraph starts.

3. End a definition with a QED-type marker (like a flower or whatever). The problem with this is that there is an over-abundance of markers. Flowers and square boxers.

How do you format your definitions in latex?

-
My suggestion is #1 but put the term being defined in bold or bold italic. – Deane Yang Nov 19 '10 at 4:15
I prefer #2. Although there is not an explicit marker, there is automatically a certain amount of vertical space inserted between the definition's end and the start of the next paragraph. – Charles Staats Nov 19 '10 at 4:24
I think perhaps this is a better question for the latex.SE site? Or, rather, your question mentions LaTeX at the beginning, but then is mostly about formatting, not about LaTeX use. To the question of formatting, my answer is: make it easy to read. In any case, it really doesn't matter: the journal will impose a house style anyway. – Theo Johnson-Freyd Nov 19 '10 at 7:22
Actually I'm more interested about how to format definitions, rather than about Latex in particular. Perhaps I should edit my question to show my focus? – Colin Tan Nov 19 '10 at 14:03
My advice: Follow the format of the journal or the publisher. For the term defined I use a macro \Def that puts its argument in bold italic; then if the journal wants something else I make that one change. – Gerald Edgar Nov 19 '10 at 15:34

Since Colin's comment indicates that this is not about $\LaTeX$ and some answers have given good specific advice I want to throw in a more abstract answer:

make sure you write markup

• and realize a typesetting for your own purposes (say according to established typesetting/layout rules for screen reading, website design, epaper or good old printouts, whichever you prefer to read your own stuff with)
• BUT do it in such a way that anyone with access to the source (e.g. journal, website) can easily modify the layout (e.g. in $\LaTeX$ make sure redefining your environment is easy, maybe even via options for your own sty file, for a website use good css)

This is not as hard as it sounds -- you just have to overcome the urge to control your layout and focus on your content.

-

I format mine like this (say we're in "Section 1"):

Definition 1.1 (G-Parking Function) A G-Parking Function, relative to a vertex q, is...

This way, you know what's being defined, and the end of the italics tells you where the defintion ends.

-

My preamble typically includes

\theoremstyle{plain} \newtheorem{theorem}{Theorem} \newtheorem{proposition}{Proposition} \newtheorem{lemma}{Lemma} \newtheorem*{corollary}{Corollary}

\theoremstyle{definition} \newtheorem{definition}{Definition} \newtheorem{conjecture}{Conjecture} \newtheorem*{example}{Example} \newtheorem{algorithm}{Algorithm}

\theoremstyle{remark} \newtheorem*{remark}{Remark} \newtheorem*{note}{Note} \newtheorem{case}{Case}

and I'm using the ams packages. I'm not too sure what code you're using, but with mine I get a forced jump after the \end{definition} command that makes it clear where the definition stops.

I would also suggest putting the term you're defining in bold or italic within the definition.

-

I set my definitions in roman font with the defined term in italic. Just switch to roman font inside the definition environment.

This way avoids the visual confusion caused by reverse emphasis of roman font inside slant or italic font. With my solution, the definition looks like normal text, but is set off formally like a theorem. Meanwhile, it also distinguishes the formal definitions from the theorems, since the font is roman.

-
I used to do this, until \theoremstyle became available (or, rather, until I became aware of it); it produces the same effect. In the old days, I had temporary environments like dftemp defined with \newtheorem (to handle the heading and numbering) and then I defined environments like df that invoke dftemp but add, at the beginning, \normalfont. De-italicizing is, in my opinion, good for definitions and absolutely essential for things like examples that may go on for several paragraphs. – Andreas Blass Nov 19 '10 at 13:24
Yes, there are numerous ways to automate it; the main thing is the effect: a formally set definition, but with a normal font. – Joel David Hamkins Nov 19 '10 at 13:33
This is roughly #2 among the suggestions I wrote. Joel, How do you signal the end of the definition? Generally because theorems environments don't have a clear end point, but usually they are followed by a proof environment rather than some text. – Colin Tan Nov 19 '10 at 14:02

This is how I format my definitions in LaTeX:

\documentclass{article}
\usepackage{color,amsmath,amssymb}
\usepackage{framed}
\makeatletter
\newdimen\errorsize \errorsize=0.2pt
% Frame with a label at top
\newcommand\LabFrame[2]{%
\fboxrule=\FrameRule
\fboxsep=-\errorsize
\textcolor{FrameColor}{%
\fbox{%
\vbox{\nobreak
\begingroup
\hrule height \baselineskip
\nobreak
\vskip-\baselineskip
\endgroup
\vskip 0.5\FrameSep
\hbox{\hskip\FrameSep \strut
\textcolor{TitleColor}{\textbf{#1}}}%
\nobreak \nointerlineskip
\vskip 1.3\FrameSep
\hbox{\hskip\FrameSep
{\normalcolor#2}%
\hskip\FrameSep}%
\vskip\FrameSep
}}%
}}
\definecolor{FrameColor}{rgb}{0.25,0.25,1.0}
\definecolor{TitleColor}{rgb}{1.0,1.0,1.0}

\newenvironment{contlabelframe}[2][\Frame@Lab\ (cont.)]{%
% Optional continuation label defaults to the first label plus
\def\Frame@Lab{#2}%
\def\FrameCommand{\LabFrame{#2}}%
\def\FirstFrameCommand{\LabFrame{#2}}%
\def\MidFrameCommand{\LabFrame{#1}}%
\def\LastFrameCommand{\LabFrame{#1}}%
}{\endMakeFramed}
\newcounter{definition}
\newenvironment{definition}[1]{%
\par
\refstepcounter{definition}%
\noindent\ignorespaces}
{\end{contlabelframe}}
\makeatother
\begin{document}
A Quadratic Equation is an equation in the form:
$$ax^2+bx+c=0$$
where $$a,b,c\in\mathbb{R}$$.
\end{definition}
\end{document}


and this is what you get:

-