Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

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?

share|improve this question
1  
My suggestion is #1 but put the term being defined in bold or bold italic. –  Deane Yang Nov 19 '10 at 4:15
13  
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
7  
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
show 2 more comments

6 Answers

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

  • worry more about structuring your content
  • 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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
    
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
add comment

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
      \advance\FrameSep\errorsize
      \begingroup
        \advance\baselineskip\FrameSep
        \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}}%
  \MakeFramed{\advance\hsize-\width \FrameRestore} 
}{\endMakeFramed} 
\newcounter{definition}
\newenvironment{definition}[1]{%
  \par
  \refstepcounter{definition}%
  \begin{contlabelframe}{Definition \thedefinition:\quad #1}
     \noindent\ignorespaces}
    {\end{contlabelframe}} 
\makeatother
\begin{document}
    \begin{definition}{Quadratic Equation}
    A Quadratic Equation is an equation in the form:
    \begin{equation}
    ax^2+bx+c=0
    \end{equation}
    where \(a,b,c\in\mathbb{R}\).
    \end{definition}
    \end{document}

and this is what you get:

share|improve this answer
add comment

1) If use an (i.e., any) environment for your definitions, there will be a little vskip after it, so it is easy to see where it ends.

2) You can control the font used in the definition (or any) environment. Use \tt or \sf if you want different than \it.

3) Put the \emph{defined} word in \emph as here. That will automatically use an alternate font: if the text is otherwise \rm, it will use \it and if the text is in \it, it will use \rm. I think that under some documentclass-es it might produce \bf, but that is usually by the choice of the publisher.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.