I am tryting to learn Latex using the not so short introduction to latex. But I am having trouble reproduce one of the example from the book.
Here is my code
documentclass{article}
\usepackage{ifthen}
\ifthenelse{\equal{\blackandwhite}{true}}{
%"black and white"mode;do something..}
{%"color" mode; do something different...
}
\usepackage{pgf}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[scale=3]
\clip (-0.1,-0.2)
rectangle(1.8,1.2);
\draw[step=.25cm,gray,very thin]
(-1.4,-1.4) grid (3.4,3.4);
\draw (-1.5, 0) --(2.5,0);
\draw(0,-1.5)--(0,1.5);
\draw (0,0) circle (1cm);
\filldraw[fill=green!100!black,draw=green!50!black]
(0,0)--(3mm,0mm)
arc (0:30:3mm)--cycle;t
\end{tikzpicture}
\end{document}`
and here is my command line input under terminal
I admit I don't actually know what I am doing. I am merely trying to quickly skim through the book to have a rough idea of what Latex is capable of, and I will figure out the detail when I need it later. So excuse me if this is a very elementary mistake that I made.
}on the line after%"black and white"mode;do something..}as the}on that line has been commented out, but this is just a dummy code that you could delete it says: if blackandwhite do nothing else do nothing. – David Carlisle Apr 23 '20 at 09:59