TransWikia.com

What package or commands are needed to format section titles(subtitles) to the left of text blocks?

TeX - LaTeX Asked by Allen on February 7, 2021

enter image description here

I am new to LaTeX and have searched around for templates and examples, but have not found much. I looked at fancyheaders package but was unable to ascertain whether the setup was possible in a simple and straightforward manner. I searched left side headers, and headers overtop margins and google images produced very few to no results for this style.

One Answer

titlesec allows you to redefine the section commands. You can use titleformat with the option leftmargin, to move the heading in the, well, left margin:

documentclass{article}
usepackage[showframe]{geometry}

usepackage{blindtext}
usepackage{titlesec}

titleformat{section}[leftmargin]{normalfontbfseries}{}{0pt}{}
titlespacing*{section}{2.5cm}{*2.5}{0.5cm}

titleformat{subsection}[leftmargin]{normalfont}{}{0pt}{}
titlespacing*{subsection}{2.5cm}{*2.5}{0.5cm}

begin{document}
  blinddocument
end{document}

enter image description here

Answered by DG' on February 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP