I work on a tufte like template and want to make section text positioned in the margin, like this:
I fiddled with \@startsection
like this:
\renewcommand{\section}{\@startsection{section}{1}{\z@}
{ several values }
{ several values }
{\normalfont\large\bfseries}}
but the section text, even though positioned right or left, is always in the bounds of textwidth
.
I could use marginnote
instead of section, but I wonder if this can be solved within the section
commands. Mind that I want to use a twoside
format, thus positioning left or right should be odd or even depended.
Any thoughts will be appreciated.
EDIT
I tried this:
\usepackage{titlesec}
\titleformat{\section}[rightmargin]{\bfseries}{\thesection}%
{0.6em}{}
.. or ..
\titleformat{\section}[leftmargin]{\bfseries}{\thesection}%
{0.6em}{}
How can I use an if
statement in order to choose rightmargin or leftmargin?