summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/webquiz/examples/tikz-ex.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/webquiz/examples/tikz-ex.tex')
-rw-r--r--Master/texmf-dist/doc/latex/webquiz/examples/tikz-ex.tex19
1 files changed, 19 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/webquiz/examples/tikz-ex.tex b/Master/texmf-dist/doc/latex/webquiz/examples/tikz-ex.tex
new file mode 100644
index 00000000000..6fe3dc692f8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/webquiz/examples/tikz-ex.tex
@@ -0,0 +1,19 @@
+\documentclass[tikz]{webquiz}
+\usepackage{tikz}
+\title{A tikz example}
+\begin{document}
+ \begin{question} % a quiz question
+ What number is represented by the dot on the following number line?
+ \begin{center}
+ \begin{tikzpicture}
+ \foreach \x in {-3,...,3} { \draw(\x,0.25) --(\x,0)node[below]{$\x$}; }
+ \foreach \x in {-2.5,...,2.5} { \draw(\x,0.18) --(\x,0); }
+ \draw[thick,<->](-3.5,0)--(3.5,0);
+ \filldraw[blue!50!white](1.5,0) circle (1mm);
+ \end{tikzpicture}
+ \end{center}
+ \answer[number]{1.5} % inserts an answer box and specifies the answer as 1.5
+ \whenRight Correct!
+ \whenWrong Incorrect!
+ \end{question}
+\end{document}