I'm not very familiar to Latex. The numbering of my theorems, definitions, remarks etc. appears like 1.0.0.1 for first definition. I don't want zeroes to appear if there are no subsections or subsubsections. Here is what Have in preamble
\documentclass[12pt]{article}
\usepackage{amsthm,amsmath}
\usepackage{amscd}
\usepackage{hyperref}
\usepackage[all]{xypic}
\usepackage{mathtools}
\usepackage{xcolor}
\usepackage[utf8]{inputenc}
\usepackage{amssymb,mathrsfs}
\usepackage{hyperref}
\usepackage[all]{xypic}
\usepackage{times}
\usepackage{inputenc}
\usepackage{lipsum}
\usepackage{titlesec}
\DeclareUnicodeCharacter{0308}{HERE!HERE!}
\setcounter{MaxMatrixCols}{10}
\newtheorem{lemma}{Lemma}[subsubsection]
\newtheorem{corollary}[lemma]{Corollary}
\newtheorem{fact}[lemma]{Fact}
\newtheorem{theorem}[lemma]{Theorem}
\newtheorem{proposition}[lemma]{Proposition}
\newtheorem{definition}[lemma]{Definition}
\newtheorem{remark}[lemma]{Remark}
\newtheorem{example}[lemma]{Example}
\newtheorem{examples}[lemma]{Examples}
\newtheorem{question}[lemma]{Question}
Please help.
Edit: In my first section (for example), there is no subsection, so I want numbering as 1.1, 1.2 and so on and not as 1.0.0.1, 1.0.0.2 etc. In my second section I have a subsection but no subsubsection, there I want theorem numbering to be like "Theorem 2.1.1" and so on. I want four-digit numbering to start when there is a subsubsection". I hope my question is clear now.
\newtheorem{lemma}{Lemma}[section]
and see if this is what you expect.xypic
andhyperref
twice. Nothing good will come out of such duplication.