Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Just a quick question. Is it possible to change the background colour for a note?

This is how I setup fixme

\usepackage{fixme}
\fxsetup{
    status=draft,
    author=,
    layout=inline, % also try footnote or pdfnote
    theme=color
}
\definecolor{fxnote}{rgb}{0.8000,0.0000,0.0000}

And now I want to set the background color to blue for instance.

TA

share|improve this question
    
Welcome to TeX.sx! Please add a complete minimal working example (MWE) that illustrates your problem. –  Kurt Aug 24 '12 at 14:38
add comment

1 Answer

up vote 2 down vote accepted

How about this:

\documentclass{article}
\usepackage{xcolor}% provides \colorlet
\usepackage{fixme}
\fxsetup{
    status=draft,
    author=,
    layout=inline,
    theme=color
}

\definecolor{fxnote}{rgb}{0.8000,0.0000,0.0000}
% define the background colour:
\colorlet{fxnotebg}{yellow}

% refedine the layout macro:
\makeatletter
\renewcommand*\FXLayoutInline[3]{%
  \@fxdocolon {#3}{%
    \@fxuseface {inline}%
    \colorbox{fx#1bg}{\color {fx#1}\ignorespaces #3\@fxcolon #2}}}
\makeatother

\begin{document}

Some text \fxnote{other text} \fxnote*{blub}{blah}

\end{document}

enter image description here

EDIT: Here is a version that uses \hl from the soul package:

\documentclass{article}
\usepackage{xcolor}% provides \colorlet
\usepackage{soul}% provides \hl

\usepackage{fixme}
\fxsetup{
    status=draft,
    author=,
    layout=inline,
    theme=color
}

\definecolor{fxnote}{rgb}{0.8000,0.0000,0.0000}
% define the background colour:
\colorlet{fxnotebg}{yellow}

% refedine the layout macro:
\makeatletter
\renewcommand*\FXLayoutInline[3]{%
  \@fxdocolon {#3}{%
    \@fxuseface {inline}%
    \begingroup
      \sethlcolor{fx#1bg}%
      \color {fx#1}\ignorespaces \hl{#3\@fxcolon #2}%
    \endgroup}}
\makeatother

\begin{document}

Some text \fxnote{other text} \fxnote*{blub}{blah}

Some Text \fxnote{A somewhat longer note that is long enough to break into the next line
for demonstration purposes} and some more text.

\end{document}
share|improve this answer
    
I works but only if the text is short. If you put text to more than linewidth it does not wrap. I was trying to use \hl but don't know how –  jlanza Aug 24 '12 at 17:38
    
I have solve it with \hl I thought i was not going to be able.\makeatletter \renewcommand*\FXLayoutInline[3]{% \@fxdocolon {#3}{% \@fxuseface {inline}% \sethlcolor{fx#1bg}{\color {fx#1}\hl{\ignorespaces #3\@fxcolon #2}}}} \makeatother I have to thank you for the help. –  jlanza Aug 24 '12 at 17:48
    
@jlanza you're welcome –  cgnieder Aug 24 '12 at 17:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.