I'm a newer user of the detailed formatting capabilities in Latex... I'm having a really hard time figuring out titlesec documentation to do the necessary formatting that I require. Unfortunately, the online examples are not helping me much...
- I'm working in an article class.
- I need uppercase section labels, with the section number including the subsection (e.g. 1.0 INTRODUCTION . . . . . . pg#)
- Subsections and subsubsections should also be included, indented respectively, with nothing beyond the default behavior
- Appendices are not to be uppercase and should be labeled "APPENDIX A - Appendix title . . . pg#)
- Finally, the Table of Contents header should be bold, centered, and uppercase.
Here's the code I have now:
\documentclass[12pt]{article}
\usepackage{blindtext}
\usepackage{titlesec}
\usepackage{titletoc}
\titleformat{\section} % command
[hang] % shape
{\normalsize\bfseries} % format
{\thesubsection} % label
{1em} % Spacing between label and title
{\MakeUppercase} % before code
\titlespacing{\section}% Set the spacing around the title
{0pt} % Left
{0pt} % Above
{0pt} % Below
\titlecontents{section}[2em]{\vspace{12pt}}{\normalfont\normalsize \contentslabel{2em}}{\hspace*{-2em} \MakeUppercase}{}{}
\titleformat{\subsection} % command
[hang] % shape
{\bfseries\normalsize} % format
{\thesubsection} % label
{1em} % Spacing between label and title
{} % before code
\titlespacing{\subsection}% Set the spacing around the title
{0pt} % Left
{0pt} % Above
{0pt} % Below
\titleformat{\subsubsection} % command
[runin] % shape
{\bfseries\normalsize} % format
{\thesubsubsection} % label
{1em} % Spacing between label and title
{} % before code
[.] % after code
\begin{document}
\tableofcontents
% Put this after TOC to keep single spacing in TOC:
\setlength{\parskip}{2ex} %--skip lines between paragraphs
\setlength{\parindent}{0pt} %--don't indent paragraphs
\vspace{4em} % Would normally be \newpage
\blinddocument
\end{document}
Sorry... I've spent five hours with minimal progress. I think I'm still learning a lot of the basics that is convoluting this for me... Thanks, Mike