I was not sure where to start this topic. I hope I chose the correct forum.
My question:
I've got this to number the excercises \newtheorem{opgave}{Opgave}. Now I would likte to have it not normally numbered like 1, 2 or 3, but 1.1, 1.2, 1.3 etc. I tried with \setcounter{opgave}{3.4}, but that didn't work.
you forgot to give some vital information: the document class that you are using. Assuming that you are using book or report and that you want to have your theorem environment numbered subordinately within chapters, use
It works.
Last thing; how do I use setcounter with this? Again, I used \setcounter{opgave}{3.4}, now at the top of my document is .4 and the counting starts with 0.4. How to fix this?
Hanneke wrote:I was not sure where to start this topic. I hope I chose the correct forum. [...]
Just for notification. That's why we have a forum guide [1]. Read it and you will know were to place requests. By the way you can read all the annoncements you can find in the User Control Panel.
Hanneke wrote:[...] Last thing; how do I use setcounter with this? Again, I used \setcounter{opgave}{3.4}, now at the top of my document is .4 and the counting starts with 0.4. How to fix this?
Code transports information much better than words. So, build a minimal working example (MWE) to show the problem.
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath, amsfonts, amssymb, amsthm, amsrefs}
\usepackage[dutch]{babel}
\usepackage{graphicx}
\pagestyle{plain}
\usepackage{enumerate}
%\usepackage{a4wide}
\theoremstyle{plain}
\newtheorem{opgave}{Opgave}[section]
\newtheorem{stelling}{Stelling}
\theoremstyle{remark}
\begin{document}
\setcounter{opgave}{3.4}
\begin{opgave}
Show that $|b| \leq a$ if and only if $ -a \leq b \leq a$.
\end{opgave}
\end{document}
It's not clear to me what's your intent. If you want the first occurrence of the opgave environment to be numbered as 3.4, you will have to change two counters (after all each of those environments will be numbered using two counters: the one for sections and then the one corresponding to each theorem). Try something like
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath, amsfonts, amssymb, amsthm, amsrefs}
\usepackage[dutch]{babel}
\theoremstyle{plain}
\newtheorem{opgave}{Opgave}[section]
\begin{document}
\setcounter{section}{3}
\setcounter{opgave}{3}
\begin{opgave}
Show that $|b| \leq a$ if and only if $ -a \leq b \leq a$.
\end{opgave}
\end{document}
I deleted parts of the codethat were not relevant for the example code (don't forget to include them again in your actual code). By the way, a4wide is an obsolete package and shouldnt be used anymore (refer to the l2tabu document); I also would suggest you to use enumitem instead of enumerate.