Using the mdframed package (with [frame-method=tikz]
) I can create a new environment that resets every chapter with
\newmdtheoremenv[<options>]{myenv}[<numberedlike>]{Sample}[chapter]
The MWE below shows this in use where the output "Samples" are labelled 2.1, 2.2, etc. How do I change the numbering format to be 2-1, 2-2, etc.?
\documentclass{book}
\usepackage{ntheorem}
\usepackage[framemethod=tikz]{mdframed}
\newmdtheoremenv{myenv}{Sample}[chapter]
% or \theoremenv{myenv}{Sample}[chapter]
\begin{document}
\chapter{First chapter}
Chapter content
\chapter{Second chapter}
Chapter content with samples
\begin{myenv}
My first sample
\end{myenv}
\begin{myenv}
My second sample
\end{myenv}
\end{document}