1

I would like a result such as this:

"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur aliquam tincidunt mi id elementum. Fusce nec mauris sodales, cursus massa id, feugiat mi:

(My Own Name For This Definition) Noting occurs without a sufficient reason...

In et dictum mi, vitae vehiendisse a tortor dui. Ut quis felis quis turpis posuere pretium et vel sem. Nam pharetra erat ut dolor pretium blandit."

Where the entire definition is indented with a reasonable amount. I've tried \proof{}, and \theorem{}, but I haven't been able to figure it out.

2 Answers 2

2

With the help of a \list, you can define your environment:

\documentclass{article}
\usepackage{amsthm}
\usepackage{lipsum}

\newlength\defindent
\setlength\defindent{\parindent}
\newcommand\definitionname{Definition}

\newenvironment{defi}[1][\definitionname]
  {\par\normalfont
    \setlength\topsep{6pt}
     \list{}{\setlength\leftmargin{\defindent}\setlength\rightmargin{\leftmargin}}
     \item\relax
     {\bfseries #1\@addpunct{.}} \ignorespaces
  }
  {\endlist}

\begin{document}

\lipsum[4]
\begin{defi}[My own name]
\lipsum[4]
\end{defi}
\lipsum[4]

\end{document}

enter image description here

1
  • How the code, in the preamble, is associated with the asmthm package?
    – juanuni
    Commented Apr 14, 2015 at 21:08
1

Another (ugly) solution with the ntheorempackage:

\documentclass{article}
\usepackage{ntheorem}
\usepackage{lipsum}

\theoremindent = 1cm
\theoremstyle{nonumberplain}
\theoremseparator{.}
\theoremheaderfont{\bfseries}
\theorembodyfont{\normalfont}
\newtheorem{defi}{My own definition}
\theoremindent = 2cm
\theoremseparator{:}
\theoremheaderfont{\itshape}
\newtheorem{proof}{A special proof}
  }

\begin{document}

\lipsum[4]
\begin{defi}
\lipsum[4]
\end{defi}
\begin{proof}
\lipsum[6]  
\end{proof}

\end{document}

enter image description here

Another solution, that requires only the plain tex macro package insbox:enter image description here

    \documentclass[12pt]{article}
    \usepackage{insbox}
    \usepackage{lipsum}
    \newenvironment{defi}{\newlength{\labelwd}\settowidth{\labelwd}{\bfseries My definition\ }\setlength{\leftskip}{1cm}\bigskip%
    \InsertBoxL{0}{\raisebox{-0.6\baselineskip}[0pt][0pt]{\bfseries My definition \llap{\rule[-0.9ex]{\dimexpr\labelwd + 4pt\relax}{0.6pt}}\rule[-0.8\baselineskip]{0.6pt}{1.85\baselineskip}}}\noindent}%
    {\bigskip\par \setlength{\leftskip}{0cm}}%
    \begin{document}
    \lipsum[2]

    \begin{defi}
    \lipsum[3]
    \end{defi}

    \lipsum[4]

    \end{document}
3
  • Thank you. Any aesthetically better suggestions?
    – JGD
    Commented Feb 4, 2014 at 23:21
  • It was only to demonstrate how ntheorem works…
    – Bernard
    Commented Feb 5, 2014 at 9:06
  • @JGD: Added another solution. Hope you'll find it more appealing.
    – Bernard
    Commented Feb 5, 2014 at 13:55

You must log in to answer this question.

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