What is a satisfactory way to format definitions in Latex? - MathOverflow most recent 30 from http://mathoverflow.net 2013-05-22T19:21:52Z http://mathoverflow.net/feeds/question/46583 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/46583/what-is-a-satisfactory-way-to-format-definitions-in-latex What is a satisfactory way to format definitions in Latex? Colin Tan 2010-11-19T04:10:08Z 2011-03-11T15:10:00Z <p>There are several ways one may format a definition in latex, but each has their problems.</p> <ol> <li><p>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.</p></li> <li><p>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. </p></li> <li><p>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.</p></li> </ol> <p>How do you format your definitions in latex?</p> http://mathoverflow.net/questions/46583/what-is-a-satisfactory-way-to-format-definitions-in-latex/46590#46590 Answer by mathic for What is a satisfactory way to format definitions in Latex? mathic 2010-11-19T04:39:38Z 2010-11-19T04:39:38Z <p>My preamble typically includes</p> <p><code>\theoremstyle{plain} \newtheorem{theorem}{Theorem} \newtheorem{proposition}{Proposition} \newtheorem{lemma}{Lemma} \newtheorem*{corollary}{Corollary}</code></p> <p><code>\theoremstyle{definition} \newtheorem{definition}{Definition} \newtheorem{conjecture}{Conjecture} \newtheorem*{example}{Example} \newtheorem{algorithm}{Algorithm}</code></p> <p><code>\theoremstyle{remark} \newtheorem*{remark}{Remark} \newtheorem*{note}{Note} \newtheorem{case}{Case}</code></p> <p>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 <code>\end{definition}</code> command that makes it clear where the definition stops.</p> <p>I would also suggest putting the term you're defining in bold or italic within the definition.</p> http://mathoverflow.net/questions/46583/what-is-a-satisfactory-way-to-format-definitions-in-latex/46591#46591 Answer by Sid Raval for What is a satisfactory way to format definitions in Latex? Sid Raval 2010-11-19T04:41:33Z 2010-11-19T04:41:33Z <p>I format mine like this (say we're in "Section 1"):</p> <p>Definition 1.1 (G-Parking Function) <em>A</em> G-Parking Function, <em>relative to a vertex q, is...</em></p> <p>This way, you know what's being defined, and the end of the italics tells you where the defintion ends.</p> http://mathoverflow.net/questions/46583/what-is-a-satisfactory-way-to-format-definitions-in-latex/46617#46617 Answer by Joel David Hamkins for What is a satisfactory way to format definitions in Latex? Joel David Hamkins 2010-11-19T11:58:22Z 2010-11-19T12:04:37Z <p>I set my definitions in roman font with the defined term in italic. Just switch to roman font inside the definition environment. </p> <p>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.</p> http://mathoverflow.net/questions/46583/what-is-a-satisfactory-way-to-format-definitions-in-latex/46646#46646 Answer by Peter Krautzberger for What is a satisfactory way to format definitions in Latex? Peter Krautzberger 2010-11-19T16:22:17Z 2010-11-19T16:22:17Z <p>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:</p> <p><em>make sure you write markup</em></p> <ul> <li>worry more about structuring your content</li> <li>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)</li> <li>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)</li> </ul> <p>This is not as hard as it sounds -- you just have to overcome the urge to control your layout and focus on your content.</p> http://mathoverflow.net/questions/46583/what-is-a-satisfactory-way-to-format-definitions-in-latex/46653#46653 Answer by Sándor Kovács for What is a satisfactory way to format definitions in Latex? Sándor Kovács 2010-11-19T17:22:41Z 2010-11-19T17:22:41Z <p>1) If use an (i.e., any) <em>environment</em> for your definitions, there will be a little vskip after it, so it is easy to see where it ends.</p> <p>2) You can control the font used in the definition (or any) environment. Use \tt or \sf if you want different than \it.</p> <p>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 <em>documentclass</em>-es it might produce \bf, but that is usually by the choice of the publisher.</p> http://mathoverflow.net/questions/46583/what-is-a-satisfactory-way-to-format-definitions-in-latex/58164#58164 Answer by Vafa Khalighi for What is a satisfactory way to format definitions in Latex? Vafa Khalighi 2011-03-11T15:10:00Z 2011-03-11T15:10:00Z <p>This is how I format my definitions in LaTeX:</p> <pre><code>\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} </code></pre> <p>and <a href="http://www.4freeimagehost.com/show.php?i=2fc4d3144219.png" rel="nofollow">this</a> is what you get:</p>