This is the next question asked here . I need to make a round tooth box as shown.
http://img707.imageshack.us/img707/9705/screenshot20100718at913.png
Based on the answers, I tried something, but not so fruitfully. So, there will be more questions.
I came up with the following command, but it does not work. The transcript inside the mini-disc is not compiled.
\ newcommand {\ graybox} [1] {%
\ noindent \ begin {tikzpicture}%
\ draw node [draw = black, fill = black! 10, rounded corners, inner sep = 2ex, text width = \ mytikzwidth] {%
#1
};%
\ end {tikzpicture}%
}%
%% ERROR - verbatim doesn't work.
\ graybox {%
\ begin {minipage} [b] {\ mytikzwidth}
...
\ begin {verbatim}
java -cp \ $ CLOJUREJAR: \ $ CLASSPATH clojure.lang.Script \ $ 1
\ end {verbatim}
...
\ end {minipage}
}
, . - -.
\newenvironment{grayboxx}%
{\noindent\begin{tikzpicture}%
\draw node[draw=black,fill=black!10,rounded corners,inner
sep=2ex,text width=\mytikzwidth] {%
}%
{};%
\end{tikzpicture}%
}
, .
http://a.imageshack.us/img571/7828/screenshot20100802at148.png
\documentclass{article}
\usepackage{tikz}
\newlength{\mytikzwidth}
\setlength{\mytikzwidth}{\textwidth}
\addtolength{\mytikzwidth}{-4ex} % this 10ex is just rule of thumb.
\newcommand{\graybox}[1]{%
\noindent\begin{tikzpicture}%
\draw node[draw=black,fill=black!10,rounded corners,inner sep=2ex,text width=\mytikzwidth] {%
#1
};%
\end{tikzpicture}%
}%
\newenvironment{grayboxx}%
{\noindent\begin{tikzpicture}%
\draw node[draw=black,fill=black!10,rounded corners,inner
sep=2ex,text width=\mytikzwidth] {%
}%
{};%
\end{tikzpicture}%
}
\begin{document}
%%%% CASE 1 - OK
\begin{minipage}[b]{\mytikzwidth}
clj command is as follows.
\begin{verbatim}
java -cp \$CLOJUREJAR:\$CLASSPATH clojure.lang.Script \$1
\end{verbatim}
hello.clj needs a namespace (ns) to let the modules know about this code.
\end{minipage}
%%%% CASE 2 - not working with verbatim
\graybox{%
\begin{minipage}[b]{\mytikzwidth}
clj command is as follows.
%\begin{verbatim}
java -cp \$CLOJUREJAR:\$CLASSPATH clojure.lang.Script \$1
%\end{verbatim}
hello.clj needs a namespace (ns) to let the modules know about this code.
\end{minipage}
}
%%%% CASE 3 - not inside the tikz
\begin{grayboxx}
\begin{minipage}[b]{\mytikzwidth}
clj command is as follows.
%\begin{verbatim}
java -cp \$CLOJUREJAR:\$CLASSPATH clojure.lang.Script \$1
%\end{verbatim}
hello.clj needs a namespace (ns) to let the modules know about this code.
\end{minipage}
\end{grayboxx}
\end{document}