# About memoir and titlesec incompatibility

In page 2 of the `titlesec` documentation, Javier Bezos writes

`titlesec` works with the standard classes and with many others, including the AMS ones, and it runs smoothly with `hyperref`. Unfortunately, it is not compatible with `memoir`, which provides its own tools with a limited subset of the features available in `titlesec`.

I don't use the `memoir` document class so I am not familiar with its features, but I've made a few simple tests (really few and simple) using it together with `titlesec` and couldn't detect any problems. To what extent can `titlesec` be safely used with `memoir`? Which exactly are the incompatibilities mentioned?

-
See this answer here Examples of styles for section headings for a parallel quote from the `memoir` manual. As I understand it, they're not really incompatible, but you can't really mix and match their respective ways of redefining the sectioning commands. –  Alan Munn Oct 29 '11 at 1:22
memoir defines sectioning commands with two optional arguments and this will be lost with titlesec. –  egreg Oct 29 '11 at 12:37
@egreg: but something like `\usepackage{titlesec}\titleformat{\chapter}[display] {\normalfont\huge\itshape}{\chaptertitlename\ \thechapter}{20pt}{\Huge}` will still allow using the two optional arguments of `\chapter`. –  Gonzalo Medina Nov 4 '11 at 16:20
As long as you consistently use only `titlesec` commands for specifying titles, you should have no problems with `memoir`. But you cannot mix and match. –  Seamus Nov 4 '11 at 17:51
I have brought this thing up with the memoir maintainer and asked to replace memoir's rather limited algorithms with those of titlesec. Unfortunately, he wouldn't listen... The titlesec way of doing things is far superior to the may memoir does it. But I still use memoir since it is getting a long way in the right direction. –  user43153 Dec 24 '13 at 0:51

For chapters the incompatibility is not evident, as `\titleformat{\chapter}...` will redefine `\@makechapterhead` and `\@makeschapterhead`. However

``````\documentclass{memoir}
\usepackage{titlesec}
``````

will redefine `\section` in such a way that the second optional argument is not accepted; indeed

``````\section[section toc][section head]{section title}
``````