I have a macro that contains the title for the current section, however when using the titlesec package, it no longer works for \section and \subsection. I know titlesec redefines the functions I'm using, but have not been able to figure out a workaround.







\part*{First Starred part}

\part{First Un-starred part}

\section*{First Starred Section}

\section{Second Un-starred Section}

\subsection*{First Starred Subsection}

\subsection{Second Un-starred Subsection}


For \section and lower level titles you can do


However, if you're not going to hide titles in groups, the simple


should suffice.

For \part your code still works and I believe also the similar one for \chapter.

  • The first approach was exactly what I was looking for. Thanks! – lyineyes Nov 21 '11 at 22:37
  • Could you please explain how to use these commands? An example would really help. – wkschwartz Nov 9 '15 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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