Hi all,

I tried to make a new environment in Lyx, much like the lyx comment environment, but
I want
it to show up in the output. Also, I made a gray box around it (pity it's totally
black and unreadable in dvi...)
so I cannot miss it.

My problem is that the width of the resulting gray box is more than \textwidth
(almost 1cm), while I set the width
of the minipage to \textwidth. My wild guess is this minipage width is a rubber
width and the tabular has a
margin or something and latex decides to increase the width of the minipage a little
???
Does anyone know what I can do to prevent this?

Thanks in advance,
Jonne.

Here's the environment I tried to create:

# Todo macro that shows up in output
Style Todo
  Margin                Static
  LatexType                Item_Environment
  LatexName                todobox
  TextFont
    Color blue
  EndFont
  Preamble
    \usepackage{colortbl}
    \newenvironment{todobox}
    {% replace \begin{todobox}
      \noindent
      %\begin{tabular}{|>{\columncolor[gray]{0.8}}l|}
      \begin{tabular}{|>{\columncolor[gray]{0.8}}p{\textwidth}|}
      \hline
      \begin{minipage}[t]{\textwidth}
      \begin{list}{}{
        \setlength{\leftmargin}{0cm}
        \setlength{\itemsep}{0cm}}
    }
    {% replaces \end{todobox}
      \end{list}
      \end{minipage}\\
      \hline
      \end{tabular}
    }
  EndPreamble
End

Reply via email to