Undesired coloring of \graffito{…} in classicthesis and arsclassica

Is any of you familiar with the classicthesis and arsclassica packages?

I am using them for my PhD thesis, they are great, but I encountered a minor problem.

classicthesis defines the \graffito{...} command which is used to add a small note on the external margin of the page. These notes are usually formatted in a smaller black italic Times font. Unfortunately, as you can see in the top part of the attached picture, if you use hyperref (or other packages) to color links (or other things like acronyms) and you have one of them spanning across two lines in where a \graffito(...) is defined, the whole note gets the color of the link.

I often use LaTeX to compose scientific papers, so I do not know very well how things work under the hood. I managed to isolate the following code in classicthesis sources that is responsible for \graffito{...}. I thought it was enough to add \color{black} somewhere in the forth line of the following code: the note actually becomes black, but an empty line is added (see the bottom part of the attached picture). Could you please tell me how to modify it to avoid it being colored by links? Could you please also explain me why?

% Graffiti as in GKP's book "Concrete Mathematics"
% thanks to Lorenzo Pantieri and Enrico Gregorio
\def\graffito@setup{%
\slshape\footnotesize%  <=== I'm going to add \color{black} right here!
\parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
\tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
\doublehyphendemerits=100000%
\finalhyphendemerits=\doublehyphendemerits}
%\DeclareRobustCommand{\graffito}[1]{\marginpar%
% [\graffito@setup\raggedleft\hspace{0pt}{#1}]%
% {\graffito@setup\raggedright\hspace{0pt}{#1}}}
\let\oldmarginpar\marginpar
\renewcommand{\marginpar}[1]{\oldmarginpar%
[\graffito@setup\raggedleft\hspace{0pt}{#1}]%
{\graffito@setup\raggedright\hspace{0pt}{#1}}}


\documentclass[paper=a4,fontsize=11pt,BCOR=5mm,twoside,open=right,titlepage,
cleardoublepage=empty]{scrreprt}

\usepackage[pdftex]{hyperref}
\usepackage[smaller,printonlyused,withpage]{acronym}
\usepackage[dvipsnames,svgnames,x11names,table,fixpdftex,hyperref]{xcolor}
\usepackage{arsclassica}

\renewcommand{\bflabel}[1]{{#1}\hfill}
\renewcommand*{\acsfont}[1]{\textsmaller{\textsf{\textsc{\textbf{\color{webgreen}{#1}}}}}}
\renewcommand*{\acffont}[1]{\textsf{\textsc{\color{webgreen}{#1}}}}

\areaset[current]{336pt}{750pt}
\setlength{\marginparwidth}{7em}
\setlength{\marginparsep}{2em}

\pdfcompresslevel=9
\hypersetup{
plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,%
pdftitle={The Title},%
pdfsubject={},%
pdfkeywords={},%
pdfcreator={pdfLaTeX},%
pdfproducer={LaTeX with hyperref and classicthesis}%
}

\begin{document}
\cleardoublepage
\acresetall
\chapter{A Chapter} % (fold)
\label{cha:a_chapter}
An application field\graffito{Technical domains} that is often cited
in this regard is that of \acp{WS} and \ac{SOA} in general.

\begin{acronym}[SOA]
\acro{SOA}{Service\--Oriented Architecture}
\acro{WS}{Web Service}
\end{acronym}
% chapter a_chapter (end)
\end{document}

-
You should file a bug report to André Miede about it. For the moment, loading etoolbox and doing \makeatletter\patchcmd{\graffito@setup}{\slshape}{\leavevmode\normalcolor\itsha‌​pe}{}{}\makeatother will solve the problem. (I don't know why \slshape sneaked in instead of \itshape.) –  egreg Jan 9 '13 at 13:38
I know that \itsha‌​pe and \slshape have different spacing... Maybe they did it on purpose! If get a solution, I'll forward it to André! –  Stefano Bragaglia Jan 9 '13 at 13:57
I just sent a message to André to let him know about the problem and the solution. I also pointed him to this page to let you guys that helped me out to get the credit that you deserve. Thanks everybody! –  Stefano Bragaglia Jan 9 '13 at 14:17

Add \leavevmode before the \color command.

(See a footnote about this in the grfguide documentation of colour support in LaTeX. (Sorry, its not my fault:-)

There is a different type of problem that will occur for all drivers. Due to certain technical difficulties\footnote{At least two causes: 1) The presence of a \texttt{\char\\special} \m{whatsit} prevents \texttt{\char\\addvspace} ‘seeing’ space on the current vertical list, so causing it to incorrectly add extra vertical space. 2) A \m{whatsit} as the first item in a \texttt{\char\\vtop} moves the reference point of the box.}%

\documentclass[paper=a4,fontsize=11pt,BCOR=5mm,twoside,open=right,titlepage,
cleardoublepage=empty]{scrreprt}

\usepackage[pdftex]{hyperref}
\usepackage[smaller,printonlyused,withpage]{acronym}
\usepackage[dvipsnames,svgnames,x11names,table,fixpdftex,hyperref]{xcolor}
\usepackage{arsclassica}

\renewcommand{\bflabel}[1]{{#1}\hfill}
\renewcommand*{\acsfont}[1]{\textsmaller{\textsf{\textsc{\textbf{\color{webgreen}{#1}}}}}}
\renewcommand*{\acffont}[1]{\textsf{\textsc{\color{webgreen}{#1}}}}

\areaset[current]{336pt}{750pt}
\setlength{\marginparwidth}{7em}
\setlength{\marginparsep}{2em}

\pdfcompresslevel=9
\hypersetup{
plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,%
pdftitle={The Title},%
pdfsubject={},%
pdfkeywords={},%
pdfcreator={pdfLaTeX},%
pdfproducer={LaTeX with hyperref and classicthesis}%
}

\makeatletter

\def\graffito@setup{%
\slshape\footnotesize%  <=== I'm going to add \color{black} right here!
\leavevmode\color{black}%
\parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
\tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
\doublehyphendemerits=100000%
\finalhyphendemerits=\doublehyphendemerits}

\makeatother

\begin{document}

-
Thanks! It works like a charm! Also thanks for explaining me how to use \makeatletter and \makeatother`! It was on the TODO list! –  Stefano Bragaglia Jan 9 '13 at 14:00