3

How can i use "normal font" for definitions and "italic" for remarks (and similar environments like them) in thmbox environment declaring some commands. Also i need numbering as "section" or "subsection".

\documentclass[11pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm]{geometry}

\usepackage{thmtools}
\declaretheorem[style=normalfont, thmbox=M, name=Definition]{definition}
\declaretheorem[style=remark, thmbox=M, name=Remark]{remark}
\begin{document}
\section{Trying}
\begin{remark}
This is a remark.
\end{remark}
\begin{definition}
This is a definition. i just need this as normal font.
\end{definition}
in addition, numbering should be in section (or subsection).
\end{document}
  • 1
    See Section 1.3.1 Declaring new theoremstyles from the doc mirrors.ctan.org/macros/latex/exptl/thmtools/thmtools.pdf – Sigur Jan 2 '14 at 15:28
  • 1
    The problem is the use of thmbox=M. It suppress any other style. Removing it the predefined styles plain or remark will work with style=plain, for example. Also you can define new styles as said on documentation above. – Sigur Jan 2 '14 at 15:55
  • But i need with M or L framed environment. when i remove "thmbox=M" no line is appeared. How can i have both frame and normal font. – mert Jan 2 '14 at 17:48
3

You have to pass the corresponding options to thmbox, as this package takes over when boxed theorems are to be defined.

\documentclass[11pt,a4paper]{article}
\usepackage{amsmath,amsthm} % amsthm is important!
\usepackage{thmtools}

\declaretheorem[style=remark]{xyz}

\declaretheorem[
  style=plain,
  thmbox={style=M,bodystyle=\normalfont},
  name=Definition,
  within=section,
]{definition}

\declaretheorem[
  style=remark,
  thmbox={style=M,bodystyle=\normalfont,headstyle=\itshape Remark \upshape\theremark},
  name=Remark,
  within=section,
]{remark}

\begin{document}

\section{Trying}

\begin{remark}
This is a remark.
\end{remark}

\begin{definition}
This is a definition. I just need this as normal font.
\end{definition}

In addition, numbering should be in section (or subsection).

\end{document}

enter image description here

I have to say that this result is simply awful. Just my opinion, of course.

  • I will try to edit. thanks. but i have one more question about numbering. how can i define the counter like this: Remark 1.1, definition 1.2, definition 1.3, theorem 1.4 etc. – mert Jan 3 '14 at 19:38
  • @mert In the definition of remark add numberlike=definition and remove within=section. – egreg Jan 3 '14 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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