Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  Dominikus K. Mar 13 '13 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 Mar 13 '13 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. –  Dominikus K. Mar 13 '13 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. –  benwilfut Mar 13 '13 at 11:48

1 Answer 1

up vote 5 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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