I am trying to modify the basic article class section headers so that the main section level is centered and has the format "1. XXXXX ". To accomplish this I am trying to use the titlesec package. However when I specify the titelformat I get the following error:

Package titlesec Error: Unknown shape.

Even a minimum working example that I found and tweaked from here won't work. What I specifically tried compiling using pdflatex was




Blah blah blah.  Something about something important, maybe.


Is there an issue with my LaTeX distribution or has something changed since this example was made and now? Thanks!

  • 3
    Welcome to TeX SX! There are two errors in your code: the centring directive is \filcenter, not \filecenter. And the section call is \section{Behold}, not \thesection (which is the command to print the current section number). With these corrections, it compiles normally for me.
    – Bernard
    Aug 23, 2017 at 20:57
  • Thank you for the welcome! I made the corrections that you pointed out in your comment, but it still didn't compile for me. As I was typing a reply to your comment I realized that I grabbed the .sty files from CTAN. Previously in my haste though I only grabbed the .sty files and not the ancillary files. Once I downloaded those every thing started working. Thank you for your help with my errors!
    – Bocephus85
    Aug 23, 2017 at 21:54
  • But why didn't you install titlesec with the package manager of your distribution?
    – Bernard
    Aug 23, 2017 at 22:00
  • To be honest, I'm not entirely sure. I'm using Ubuntu for the first time after switch from Mac and did a get-apt to get Latex. Most likely I did not get a complete package. There have been several packages that I've found missing that I've had to go find and add myself.
    – Bocephus85
    Aug 23, 2017 at 22:27
  • But you have tlmgr?
    – Bernard
    Aug 23, 2017 at 22:31


Your Answer

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

Browse other questions tagged or ask your own question.