0

I'm trying to change the subsection font style to:

enter image description here

Which comes from this template where I just changed the black color to blue. This is current code and I've tried to use this solution as a reference without success:

\documentclass[11pt]{report}
\usepackage{amsmath}
\usepackage[a4paper, landscape, margin=0in]{geometry}
\usepackage{multicol,lipsum}
\setlength{\columnseprule}{.4pt}

\usepackage{xcolor} \usepackage{titlesec}

\titleformat{\subsection} {\color{blue}\filleft{blue}} {\thesection}{1em}{}

\begin{document}

\begin{multicols}{3} % My code % My code % My code \end{multicols} \end{document}

I don't mind the blue horizontal line from the image, but it would be nice to have it as a separator, like:

--0.0 Probability---------------

Where the length would be enough to cover the column itself (each page of the document has three columns)

egreg
  • 1,121,712
Chris
  • 291

1 Answers1

1

A simple solution is obtained using the sectsty package.

a

\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage[a4paper, landscape, margin=0.5in]{geometry}
\usepackage{multicol,lipsum}
\setlength{\columnseprule}{.4pt}

\usepackage{xcolor}

\usepackage{sectsty} % added <<<<<<<<<<<< \subsectionfont{\rule[0.5ex]{30pt}{0.2pt}\color{white}\noindent\colorbox{blue}}% added <<<<<<

\begin{document}

\begin{multicols}{3}
    \subsection{Probability}
\end{multicols}

\end{document}

Simon Dispa
  • 39,141