I'm trying to write a book using the Tufte-Style, and this problem has been bothering me for a while.
I want to format the chapters titles showing the numbers by the side of it. Simple enough, but the numbers are not showing in my example.
The minimal code for my problem is this:
\documentclass{tufte-book} %Tufte's style for books
\usepackage{titlesec} %Formatting of chapters, sections and subsections
\usepackage{color} %Used in the format
\definecolor{gray75}{gray}{0.75} %Color used in the chapter format
\newcommand{\hsp}{\hspace{20pt}} %Also used in the chapter format
\setcounter{secnumdepth}{0} %Supposed "Switch" to turn numbering on
%Found as a response here: https://groups.google.com/forum/#!topic/tufte-latex/s5aAqdvDSpg
%My chapter style
\makeatletter
\titleformat
{\chapter}[hang]
{\Huge\bfseries}
{\thechapter\hsp\textcolor{gray75}{|}\hsp}
{0pt}
{\Huge\bfseries}
\makeatother
\begin{document}
\frontmatter
\chapter{First Chapter}
\label{ch:first-chapter}
\end{document}
The result being this:
Any help will be greatly appreciated. :)
\frontmatter
. Do you need that?\mainmatter
right?\mainmatter
.