Code: Select all
\begin{myenv}[line width=5pt,scale=3]{myoptions}
\draw (-1.5,-1.5) -- (1.5,1.5);
\end{myenv}
Code: Select all
\begin{tikzpicture}[line width=5pt,scale=3]
\draw (-1.5,-1.5) -- (1.5,1.5);
\end{tikzpicture}
Code: Select all
You have choosen: myoptions. Hence, the tikzpicture is not displayed.
Code: Select all
\newenvironment{\myenv}[2][]{
\ifthenelse{\equal{#2}{conditon}}{%
\begin{tikzpicture}[#1]
}{%
You have choosen: #2. Hence, the tikzpicture is not displayed.
}
}{%
\ifthenelse{\equal{#2}{conditon}}{%
\end{tikzpicture}
}{}
}
Code: Select all
\long\def\myenv[#1]#2#3\endmyenv{
\ifthenelse{\equal{#2}{conditon}}{%
\begin{tikzpicture}[#1]%
#3
\end{tikzpicture}
}{%
You have choosen: #2. Hence, the tikzpicture is not displayed.
}
}
! File ended while scanning use of \myenv.
<inserted text>
\par