Consider the following minimal but working example.
\documentclass[landscape]{article}
\usepackage[a3paper, textwidth=7.5cm, margin=1cm,landscape]{geometry}
\usepackage{titlesec}
\usepackage{xcolor}
\newcommand{\mytitle}[1]{\colorbox{gray!40}{\makebox[\dimexpr\columnwidth- 2\fboxsep\relax]{\filcenter #1\strut}}}
\titleformat{\paragraph}
{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{\mytitle}
\titlespacing*{\paragraph} {0pt}{3.25ex plus 1ex minus .2ex}{1em}
\begin{document}
\thispagestyle{empty}
\paragraph{Cheat Sheet Number Theory (1/2) - X.005 --/12-'15}
\end{document}
I have a question about the custom \paragraph command. I would like to change this to the following format.
\paragraph{Left aligned text}{Centered heading}{Right aligned text}
When the first and third arguments are empty like so
\paragraph{}{B}{}
should produce the gray line with B centered just as it does now.
Also
\paragraph{A}{B}{}
should produce the gray line with A left aligned and B centered.
and
\paragraph{}{B}{C}
should produce the gray line with B centered and C right aligned.
Is this possible by modifying the preamble as listed above? If so, then please advise on how I should implement this.
\paragraph
is a 4th level heading and should only be used in the sequence section, subsection,subsubsection, paragraph.\paragraph
seems to be a bad name. Also your question is still completely unclear are the three arguments single line? if so in what sense is this a paragraph at all? what is supposed to happen if the three arguments do not fit on a line? overprint? if so you can just do\colorbox{gray}{\rlap{#1}\hss#2\hss\llap{#3}}