Tell me more ×
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 always get the same errors with these environments. "missing number treated as zero" and "leading text: \begin{satz}" and "Illegal unit of measure (pt inserted)."

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\newcounter{satz}
\renewcommand{\thesatz}{\arabic{satz}}

\newenvironment{satz}{%
  \skip%
  \refstepcounter{satz}%
  \textbf{Satz~\thesatz}
}
{% \end{satz}
  \bigskip
}

\begin{document}
\begin{satz}Test\end{satz}
\par
\begin{satz}Test\end{satz}
\end{document}

Anyone knows corrective actions?

share|improve this question
4  
The error occurs because of \skip that expects a skip register number. There is also environment theorem and many theorem packages. They might save you some time reinventing the wheel. – Heiko Oberdiek Jan 23 at 16:04
3  
Welcome to TeX.sx!. \skip is a TeX primitive and expects to be followed by an integer. However, you've followed it with \refstepcounter, which turns into something which is not a number when TeX goes looking for one. Probably you mean \bigskip or similar. – Joseph Wright Jan 23 at 16:06
Wow, thanks a lot. – user38034 Jan 23 at 16:09

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.