का उपयोग करके ग्रेड-राउंड बॉक्स को कैसे बनाया जाए यह एक अनुवर्ती प्रश्न है here पूछा गया। मैं के रूप में दिखाया गया है एक गोल धूसर हो जाता बॉक्स बनाने की जरूरत है।टिक्स
http://img707.imageshack.us/img707/9705/screenshot20100718at913.png
जवाब के आधार पर, मैं कुछ करने की कोशिश की, लेकिन इतना उपयोगी नहीं। तो, एक और सवाल आ रहा है।
मैं निम्नलिखित आदेश के साथ आया, लेकिन यह काम नहीं करता है। शब्दशः minipage अंदर संकलन नहीं है।
\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} }
मैंने पर्यावरण के साथ भी प्रयास किया, जो काम नहीं करता है। minipage minipage अंदर बैठने के लिए नहीं है।
\newenvironment{grayboxx}% {\noindent\begin{tikzpicture}% \draw node[draw=black,fill=black!10,rounded corners,inner sep=2ex,text width=\mytikzwidth] {% }% {};% \end{tikzpicture}% }
प्रश्न
- क्या LaTeX कोड के साथ गलत क्या है? मैं कैसे tikzpicture में minipage साथ शब्दशः वातावरण का उपयोग कर सकते हैं?
- तुम मुझे के रूप में संलग्न चित्र में दिखाया गया है grayboxed पर्यावरण को लागू करने के लिए एक बेहतर तरीका सिखाना सकते हैं?
यह पूरा कोड है, और मैंने संकलित परिणाम के साथ संकलित परिणाम संलग्न किया है।
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}