LaTeX forum ⇒ GeneralUse of mdframed

LaTeX specific issues not fitting into one of the other forums of this category.
psionman
Posts: 30
Joined: Thu Nov 10, 2011 3:33 pm

Use of mdframed

Postby psionman » Sun Jun 22, 2014 10:19 am

I am trying to produce framed definition theorems etc. It works well if I use the documentclass book, but not if I use amsbook (the latter sorts out page numbering problems)

The problem is that no space appears between the boxed definition and the text. Can anyone help?

  1. \documentclass[a4paper,11pt, fleqn]{amsbook}
  2. \usepackage{lipsum}
  3. \usepackage{mdframed}
  4. \newmdtheoremenv{defn}{Definition}[chapter]
  5.  
  6. \begin{document}
  7. \lipsum[1]
  8.  
  9.  
  10. \begin{defn}
  11. \textbf{Prime numbers} \label {Defn:Prime} \lipsum[2]
  12. \end{defn}
  13.  
  14. \lipsum[3]
  15.  
  16. \end{document}

Tags:

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm

Postby esdd » Mon Jun 23, 2014 12:07 pm

Try
  1. \documentclass[a4paper,11pt, fleqn]{amsbook}
  2. \usepackage{lipsum}
  3. \usepackage{mdframed}
  4. \newmdtheoremenv[
  5. innertopmargin=0pt,
  6. skipabove=\baselineskip,
  7. aftersingleframe=\bigskip,afterlastframe=\bigskip
  8. ]{defn}{Definition}[chapter]
  9.  
  10. \begin{document}
  11. \lipsum[1]
  12.  
  13. \begin{defn}
  14. \textbf{Prime numbers} \label {Defn:Prime} \lipsum[2]
  15. \end{defn}
  16.  
  17. \lipsum[3]
  18.  
  19. \end{document}


amsbookmd.PNG
amsbookmd.PNG (31.83 KiB) Viewed 4659 times


Best regards
Elke

psionman
Posts: 30
Joined: Thu Nov 10, 2011 3:33 pm

Postby psionman » Mon Jun 23, 2014 7:59 pm

Thanks Elke. That fixed it


Return to “General”

Who is online

Users browsing this forum: No registered users and 10 guests