Seite 1 von 1

Die Nummerierung der Absätze (section) funktioniert nicht

Verfasst: Di 24. Mai 2016, 15:05
von Patrick9191
Hallo liebes Forum,

ich hab ein kleines Problem mit meinem Latex-Dokument und ich weiß leider nicht weiter.

Die Nummerierung meiner Sections wird nicht angezeigt. Im Folgenden kopiere ich euch die Präambel rein:
\documentclass[a4paper,12pt]{article}

\usepackage{amssymb}
%\usepackage{amsthm}
\usepackage[final]{pdfpages}
\usepackage{amsfonts}
\usepackage{color}
\usepackage{setspace}
\usepackage{threeparttable}
\usepackage{soul}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{version}
\usepackage{scalefnt}
\usepackage[square]{natbib}
\usepackage{caption}
\usepackage{lscape}
\usepackage{glossaries}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{booktabs, array, dcolumn,tabularx}
\usepackage{enumitem}


\usepackage{float}



%heading spacing manually
\usepackage[compact]{titlesec}
\titlespacing{\section}{0pt}{*2}{*2}
\titlespacing{\subsection}{0pt}{*2}{*2}
\titlespacing{\subsubsection}{0pt}{*1}{*0.5}



\captionsetup{labelfont=bf}

%\setcounter{MaxMatrixCols}{10}


\newtheorem{theorem}{Theorem}
\newtheorem{acknowledgement}[theorem]{Acknowledgement}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conclusion}[theorem]{Conclusion}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}{Corollary}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{lemma}{Lemma}

\newtheorem{model}{Model}[section]

\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{proposition}[theorem]{Proposition}
\newenvironment{remark}[1][Remark]{\noindent\textbf{#1:} }{}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{summary}[theorem]{Summary}
\newenvironment{example}[1][Example]{\noindent\textbf{#1:} }{}
%\newenvironment{proof}[1][Proof]{\begin{trivlist}
%\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{proof}[1][Proof]{\noindent\textbf{#1:} }{\ \rule{0.5em}{0.5em}}
\newenvironment{sketchofproof}[1][Sketch of the proof]{\noindent\textbf{#1:} }{\ \rule{0.5em}{0.5em}}
\newcommand{\cor}{\textit}
\newcommand{\col}[1]{\textcolor{red}{#1}}
\renewcommand{\baselinestretch}{1.2}
\newcommand{\hi}{\hangindent1.5pc}
\newcommand{\id}{1\hspace{-0.9ex}1}
\DeclareMathOperator*{\argmax}{arg\,max}
\parskip1.5ex
\topmargin0cm
\parindent0em
\footnotesep 15pt \setlength{\voffset}{-1cm}
\setlength{\hoffset}{0cm} \setlength{\hoffset}{0cm}
\setcounter{tocdepth}{5} \textwidth16cm \textheight23.4cm
\evensidemargin0cm \oddsidemargin0cm \flushbottom
\setlength{\unitlength}{1mm} \excludeversion{dho}
\setcounter{secnumdepth}{4}

\clubpenalty = 10000
\widowpenalty = 10000

\begin{document}
[Hier steht der Text]
\end{document}

Weiß jemand Rat? Ich nutze TeXnicCenter 2.02 Stable 64 bit und arbeite mit Windows 10.

Vielen Dank für Eure Hilfe!

Viele Grüße,
Patrick
[/code]

Verfasst: Di 24. Mai 2016, 16:25
von esdd
Kannst Du bitte ein Minimalbeispiel erstellen, dass möglichst kurz ist, aber das Problem zeigt? Da sind viele Dinge, die nichts damit zu tun haben, dafür ist gar kein \section im Code drin. Wenn ich das ergänze und mindestens die Zeile, die eine zweite example Umgebung erzeugen soll und deshalb eine Fehlermeldung verursacht, entferne, dann wird mir der Abschnitt mit Nummer angezeigt.

Verfasst: Di 24. Mai 2016, 17:12
von Gast
Verwendet Du eventuell eine defekte, nicht aktuelle Version 2.10.1 von titlesec? Außerdem solltest Du [d]l2tabu[/d] und am besten auch eine LaTeX-Einführung lesen.