TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 have custom made list of problems, and list of figures generated by tocloft. I want the two list titles to be of the same style.

I looked into source of tocloft.sty and added a new command there:

\newcommand{\@loptitle}{%
  \addpenalty\@secpenalty
  \if@cfthaschapter
    \vspace*{\cftbeforeloftitleskip}
  \else
    \vspace{\cftbeforeloftitleskip}
  \fi
  \@cftpagestyle
  {\interlinepenalty\@M
  {\cftloftitlefont\listproblemname}{\cftafterloftitle}
  \cftmarklof
  \par\nobreak
  \vskip \cftafterloftitleskip
  \@afterheading}}

(based on \@cftmakeloftitle) It doesn't work -- during compilation I get

! Undefined control sequence.
l.45 \loptitle

I'm sure I have \usepackage{tocloft} before I call \loptitle.

I guess my mistake is that it's not enough to usepackage to load it all.

share|improve this question

Oh, I managed to get it with:

\vspace*{\cftbeforeloftitleskip}
{\cftloftitlefont\listproblemname\cftafterloftitle}
{\vskip\cftafterloftitleskip}

Still the question is interesting.

share|improve this answer

Your Answer

 
discard

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.