0

Hi I'm new to LaTeX and am slowly going insane trying to format my document to spec.

The things I am trying to achieve are fairly simple. I have this type of section heading now:

Current section heading

What I am trying to achieve however is this:

Desired section heading

I have tried titlesec however I have found the documentation confusing and rather unhelpful.

I have also tried using answers to other similar questions such as here and here which either result in errors I cannot really make sense of or not exactly what I'm looking for. Say I try

\makeatletter
\renewcommand*{\@seccntformat}[1]{\csname the#1\endcsname\hspace{1cm}}
\makeatother

As suggested by one of the linked threads all of my section headers are affected but it should only be section and not any sub(sub)sections.

So I then follow the advice of another answer which suggests using this command:

\titleformat{\section}{\bfseries\sffamily\large}{\thesection.}{\hspace{1cm}}{}%

Which I do but then I am get an error such as this:

/main.tex:96: Missing number, treated as zero.
<to be read again> 
               \protect 
 l.96     \section{Case Study}
                         \label{sec:method}

Any help would be greatly appreciated!

1 Answer 1

1

Having played around I've come to a solution:

\titleformat{\section}{\bfseries\sffamily\large\MakeUppercase} {\thesection}{0pt}{\hspace{9cm}}{}%
\titlespacing{\section}{20pt}{*4}{*1.5}

Current section header

Yes, I know it looks terrible but it is how it has to be sadly. The only issue I have now is that this style is only to apply to numbered sections. But as far as this question goes I have found a solution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .