0

How can I modify this,

\newenvironment{definition}[1][Definition]{\begin{mdframed}\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}\end{mdframed}}

so that a newline (vertical space) is inserted after the word "Definition"? I want the content of my definition(s) to start below it.

5
  • Why are you working with a trivlist here? What is your goal in the first place? There might be a much simpler solution.
    – Johannes_B
    May 11, 2016 at 6:03
  • By the way, there are theorem related packages that allow you to define Definition environments pretty easily.
    – Johannes_B
    May 11, 2016 at 6:33
  • @Johannes_B Its just the look of what it produces. I am really open to change it. What I have above is just from an online source.
    – 9301293
    May 11, 2016 at 6:56
  • I am interested, do you have a link available?
    – Johannes_B
    May 11, 2016 at 6:57
  • @Johannes_B No, sorry. I didn't save it. I am interested in something that is boxed off and had "Definition" in bold, and a newline.
    – 9301293
    May 11, 2016 at 7:02

1 Answer 1

1

Definitions are usually made with a theorem package like amsthm. On the other hand, if you are not sure if you want some more fancy stuff later on, i would start with something based on tcolorbox. The example shows the default box, it can be customized in various ways, to look more simple or to look even much more fancy.

phattyDefinitionEnvironment

\documentclass{article}
\usepackage{blindtext}
\usepackage{mdframed}
\usepackage{tcolorbox}
\newtcolorbox{definition}{title=Definition,}
%\usepackage{showframe}
\usepackage{amsthm}
\newtheoremstyle{phatty}{2ex}{2ex}{}{}{\bfseries}{}{\newline}{}
\theoremstyle{phatty}
\newtheorem*{pht}{Phatty}
\surroundwithmdframed{pht}
\begin{document}
\begin{definition}
    \blindtext
\end{definition}
\begin{pht}
    \blindtext
\end{pht}
\end{document}
1
  • Thank you very much! I will make some sweet looking definitions, now.
    – 9301293
    May 11, 2016 at 7:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .