2

I would like to create a theorem style with slanted text in heads. What's the way?

I tried with the thmtools package by

\declaretheoremstyle[headfont=\textsl]{slantedhead}
\declaretheorem[style=slantedhead]{exercise}

But writing then

\begin{exercise}

\end{exercise}

produces normal font as head.

4
  • Welcome to TeX.sx! It would help if you provide a MWE, which shows the (manually typed) result you want to have by using the exercise-environment. Commented Mar 13, 2013 at 11:11
  • @DominikusK. Thanks! The result I wish to obtain in the exercise environment would be to get \textsl{Exercise} as head title.
    – Heitor
    Commented Mar 13, 2013 at 11:16
  • Please edit your question and put a MWE into it, so that all the gifted users her can do their magic and try stuff out. Commented Mar 13, 2013 at 11:31
  • 1
    If you want to use the amsthm package, you can use the \newtheoremstyle macro and define the head font style to \slshape in the 6th argument. See the amsthm documentation for details. Commented Mar 13, 2013 at 11:48

1 Answer 1

5

The only thing you are doing wrong is using \textsl instead of the switch \slshape. The former requires an argument, whereas the latter affects the subsequent text. It is this style that thmtools is expecting. Usually it is a good idea to preceed this with \normalfont, so that you know which font you are starting from.

Sample output

\documentclass{article}

\usepackage{amsthm}
\usepackage{thmtools}
\declaretheoremstyle[headfont=\normalfont\slshape]{slantedhead}
\declaretheorem[style=slantedhead]{exercise}

\begin{document}
\begin{exercise}
  Something to work on.
\end{exercise}
\end{document}

You must log in to answer this question.

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