diff --git a/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.fig.pdf b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.fig.pdf new file mode 100755 index 0000000..cedc1fc Binary files /dev/null and b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.fig.pdf differ diff --git a/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.fig.svg b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.fig.svg new file mode 100755 index 0000000..25311fe --- /dev/null +++ b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.fig.svg @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.fig.tex b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.fig.tex new file mode 100755 index 0000000..1b701df --- /dev/null +++ b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.fig.tex @@ -0,0 +1,13 @@ +\documentclass{article} + +\usepackage{graphicx} +\usepackage{caption} + +\begin{document} +\begin{figure} + \centering + \includegraphics[scale=1]{sum_odd_numbers_to_square} + \setcounter{figure}{2} + \caption{The sum of odd numbers is a square} +\end{figure} +\end{document} \ No newline at end of file diff --git a/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.pdf b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.pdf new file mode 100755 index 0000000..17c45f3 Binary files /dev/null and b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.pdf differ diff --git a/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.png b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.png new file mode 100755 index 0000000..cc896c7 Binary files /dev/null and b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.png differ diff --git a/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.svg b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.svg new file mode 100755 index 0000000..5db57ee --- /dev/null +++ b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.tex b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.tex new file mode 100755 index 0000000..a882c45 --- /dev/null +++ b/tex/content/figures/part01/ch1/sum_odd_numbers_to_square.tex @@ -0,0 +1,25 @@ +% Draw a 6 by 6 grid of squares, with thicker line on outer borders. + +\documentclass[margin=0.5cm]{standalone} + +\usepackage{tikz} +\usetikzlibrary{calc} + +\begin{document} + +\begin{tikzpicture} + % Draw grid + \draw (0, 0) grid (6, 6); + % Draw thicker lines on outer borders + \draw[thick] (0, 0) -- (6, 0) -- (6, 6) -- (0, 6) -- (0, 0); + + % Draw for each square with bottom left corner at (0, 0) to (6, 6) the thicker border + \foreach \i in {0, 1, 2, 3, 4, 5, 6} + \draw[very thick] (0, 0) -- (\i, 0) -- (\i, \i) -- (0, \i) -- (0, 0); + + % For each $i$-th odd number from 1 to 11, add a node at the top right corner of the $i$-th square + \foreach \i [evaluate={\x=int(\i*2+1);}] in {0, 1, 2, 3, 4, 5} + \node at (\i+0.5, \i+0.5) {$\x$}; +\end{tikzpicture} + +\end{document} \ No newline at end of file diff --git a/tex/definitions.tex b/tex/definitions.tex old mode 100644 new mode 100755 diff --git a/tex/preamble.tex b/tex/preamble.tex index 52f58e2..4aff2c0 100755 --- a/tex/preamble.tex +++ b/tex/preamble.tex @@ -10,7 +10,6 @@ } % Create a new environment {exercise} to refer to exercises from the KNUTH book. -% Add a TODO switch option to show unresolved exercises \newenvironment{myexercise}[2] { \addcontentsline{toc}{subsubsection}{Exercise #1}