TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the titlesec package in conjunction with the ACM SIG Alternate document class to create a special kind of subsubsection as follows:


% +++++ Begin Experiment Subsection ++++++
\newcommand{\subparagraph}{} % not defined in cls template
% +++++ End Experiment Subsection ++++++

\experiment{Not a Subsubsection}

The problem is that elsewhere in my document I want to use plain old subsubsections. However, with the definition of my new titleclass, the formatting of the plain old subsubsection heading looks different than before and the numbering is also gone from the heading.

How can I get my \experiment subsubsections while leaving the regular subsubsections untouched?

share|improve this question
The package titlesec is incompatible with your class: "Non standard sectioning command detected. Using default spacing and no format." Do you want that the experiments are numbered in sequence with subsubsections? – egreg Sep 18 '12 at 10:52
@egreg No, I am looking for an alternative to the standard subsubsections and would like to have both environments numbered separately. – janschaf Sep 18 '12 at 15:29
What should the number be on the left of the first \experiment in subsection 1.1? – egreg Sep 18 '12 at 15:53
@egreg The number should not be on the left. As specified in the \titleformat command, the numbering should be in the heading. It should be a '1' formatted in roman letters. In the above example the output should be: "Experiment (i): Not a Subsubsection". – janschaf Sep 19 '12 at 8:13
up vote 5 down vote accepted

The easiest way is to forget about titlesec that's not compatible with the used class and to define \experiment in terms of \subsubsection:



%%% To cope with the "non standard" way the class uses
\newfont{\experimentfnt}{ptmb8t at 11pt}


    \experimentfnt Experiment~\theexperiment: #1}%


\experiment{Not a Subsubsection\label{ex1}}

In this experiment we do something; it is \autoref{ex1}.


The only drawback is that the label must be specified inside the argument. However, it seems that the class has many problems with hyperref, but not only: the labels are wrongly written in the .aux file, because \thepage is made equivalent to \relax.

I strongly suggest not using this class.

enter image description here

share|improve this answer
Thanks, @egreg. – janschaf Sep 19 '12 at 11:07
@janschaf Please, have a read at the FAQ (link at the top right, just left to the search box) particularly at How do I ask questions here – egreg Sep 19 '12 at 11:09
I am also using the hyperref package. With the above solution, \autoref{ex1} will produce the text "Section (i)". I would like this text to read "Experiment (i)". I tried \newcommand{\experimentautorefname}{Experiment}but this doesn't cut it. – janschaf Sep 19 '12 at 11:12
Thanks, egreg. I think it should be \subsubsection*{\refstepcounter{experiment}%instead of \subsection*{\refstepcounter{experiment}%. I cannot edit your answer since this edit is smaller than 6 chars. – janschaf Sep 24 '12 at 12:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.