0

I have the following code to customize how chapter titles look:

\documentclass[12pt]{report}
\usepackage[english,french]{babel}
\usepackage{graphicx}
\usepackage{color}
\usepackage{titlesec}

\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}

\begin{document}

\chapter{Chapter}

\end{document}

On one computer, the customization does work, but on another one, it just displays "Chapter" without anything, not even the chapter number.

Why do I have those different behaviors? Why doesn't the code on my second computer work? What should I try to investigate if there is a lack of information for you to give an answer?

If it might help, I am using texmaker on both computers, and I am using the "Quick Build" feature.

2
  • 1
    Welcome to TeX SX! Maybe update the distribution? For me the only problem was \usepackage[utf8]{\inputenc} and \usepackage[T1]{fontenc} were missing. Also the language options of babel should be loaded as options for the document class. B.t.w., are you a regular reader of the Almanach Vermot ?
    – Bernard
    Sep 27, 2017 at 17:49
  • 4
    add \listfiles to your preamble then the log output will show a list of all files used, compare the version numbers of all the packages on the two systems. Sep 27, 2017 at 17:53

0

You must log in to answer this question.

Browse other questions tagged .