# Conflict between the packages titlesec and marginnote

In the following code, the use of the package titlesec modifies dramatically the formatting based on the package marginnote. The package titlesec is needed so as to use this.

Is there one possibility to repair that ?

\documentclass[12pt]{article}
%\usepackage{titlesec} % << Uncomment to see the changes... >>
\usepackage{marginnote}
\usepackage{tikz}

\reversemarginpar % To put the margin pars on the left
\renewcommand*{\marginfont}{\sffamily\normalsize}

\usetikzlibrary{calc}
\usetikzlibrary{backgrounds}

\definecolor{colorDateGene}{RGB}{230,120,120}
\definecolor{colorDateToday}{RGB}{230,230,230}

\newcommand*{\Date}[4]{%
\begin{tikzpicture}[
show background rectangle,
inner frame sep=0pt,
text width=1cm,
align=center
]
\node [fill=colorDateGene]  at (0,0)                                (dayofweek)  {\footnotesize{#1}};
\node [fill=colorDateToday] at ($(dayofweek) +(0,-\baselineskip)$) (dayofmonth) {#2};
\node [fill=colorDateToday] at ($(dayofmonth) +(0,-\baselineskip)$) (month)      {#3};
\node [fill=colorDateGene]  at ($(month) +(0,-\baselineskip)$) (dayofmonth) {\footnotesize{#4}};
\end{tikzpicture}
}

\usepackage{lipsum}

\begin{document}

\section*{One day \marginnote{\Date{Mon}{28}{NOV}{2011}}}

\noindent\lipsum[1]

\section*{One day \marginnote{\Date{Wed}{30}{NOV}{2011}}}

\noindent\lipsum[1]

\section*{One day \marginnote{\Date{Fri}{2nd}{DEC}{2011}}}

\noindent\lipsum[1]

\newpage
\section*{One day \marginnote{\Date{Fri}{5}{DEC}{2011}}}

\noindent\lipsum[1]

\end{document}

-

As I said in my revised answer to your former question: Instead of putting \marginnote inside \section*, change the vertical positioning of the \marginnote using its second optimal argument.
\section*{One day} \marginnote{\Date{Mon}{28}{NOV}{2011}}[-32pt]

To obtain the same formatting as the \section header, use \marginnote{\bfseries...}. Why 32pt? – Werner Dec 1 '11 at 0:22
@Werner: The OP seems to want a marginnote in \normalfont that is nevertheless vertically aligned witth the sectioning title -- 32pt is a crude aligning attempt, considering the marginnote's box. – lockstep Dec 1 '11 at 0:26
Okay - \normalfont in the text has a \baselineskip of 14.5pt, while that of the section heading is 22pt, so I had thought 36.5pt. But your visual attempt is definitely sufficient. – Werner Dec 1 '11 at 0:33