% (find-angg "LATEX/2016-2-C2-integral.tex")
% (defun c () (interactive) (find-LATEXsh "lualatex -record 2016-2-C2-integral.tex"))
% (defun d () (interactive) (find-xpdfpage "~/LATEX/2016-2-C2-integral.pdf"))
% (defun e () (interactive) (find-LATEX "2016-2-C2-integral.tex"))
% (defun u () (interactive) (find-latex-upload-links "2016-2-C2-integral"))
% (find-xpdfpage "~/LATEX/2016-2-C2-integral.pdf")
% (find-sh0 "cp -v  ~/LATEX/2016-2-C2-integral.pdf /tmp/")
% (find-sh0 "cp -v  ~/LATEX/2016-2-C2-integral.pdf /tmp/pen/")
%   file:///home/edrx/LATEX/2016-2-C2-integral.pdf
%               file:///tmp/2016-2-C2-integral.pdf
%           file:///tmp/pen/2016-2-C2-integral.pdf
% http://angg.twu.net/LATEX/2016-2-C2-integral.pdf

% «.tikz»		(to "tikz")
% «.pict2e»		(to "pict2e")
% «.pictpiecewise»	(to "pictpiecewise")
% «.rotatebox»		(to "rotatebox")

\documentclass[oneside]{book}
\usepackage[colorlinks]{hyperref} % (find-es "tex" "hyperref")
%\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{pict2e}
\usepackage{colorweb}             % (find-es "tex" "colorweb")
%
\usepackage{edrx15}               % (find-angg "LATEX/edrx15.sty")
\input edrxaccents.tex            % (find-angg "LATEX/edrxaccents.tex")
\input edrxchars.tex              % (find-LATEX "edrxchars.tex")
\input edrxheadfoot.tex           % (find-dn4ex "edrxheadfoot.tex")
%
\begin{document}

\catcode`\^^J=10
\directlua{dednat6dir = "dednat6/"}
\directlua{dofile(dednat6dir.."dednat6.lua")}
\directlua{texfile(tex.jobname)}
\directlua{verbose()}
\directlua{output(preamble1)}
\def\expr#1{\directlua{output(tostring(#1))}}
\def\eval#1{\directlua{#1}}
\def\pu{\directlua{pu()}}

\directlua{dofile "edrxtikz.lua"} % (find-LATEX "edrxtikz.lua")
\directlua{dofile "edrxpict.lua"} % (find-LATEX "edrxtikz.lua")
%L V.__tostring = function (v) return format("(%.3f,%.3f)", v[1], v[2]) end
\pu


\input edrxgac2.tex           % (find-angg "LATEX/edrxgac2.tex")




% «tikz» (to ".tikz")
% tikz
% mygrid
% (find-angg ".emacs.papers" "tikz")
\tikzset{mycurve/.style=very thick}
\tikzset{axis/.style=semithick}
\tikzset{tick/.style=semithick}
\tikzset{grid/.style=gray!20,very thin}
\tikzset{anydot/.style={circle,inner sep=0pt,minimum size=1mm}}
\tikzset{opdot/.style={anydot, draw=black,fill=white}}
\tikzset{cldot/.style={anydot, draw=black,fill=black}}
%
\def\mygrid(#1,#2) (#3,#4){
  \clip              (#1-0.4, #2-0.4) rectangle (#3+0.4, #4+0.4);
  \draw[step=1,grid] (#1-0.2, #2-0.2) grid      (#3+0.2, #4+0.2);
  \draw[axis] (-10,0) -- (10,0);
  \draw[axis] (0,-10) -- (0,10);
  \foreach \x in {-10,...,10} \draw[tick] (\x,-0.2) -- (\x,0.2);
  \foreach \y in {-10,...,10} \draw[tick] (-0.2,\y) -- (0.2,\y);
}

\def\tikzp#1{\mat{\begin{tikzpicture}#1\end{tikzpicture}}}

% (find-LATEX "edrxtikz.lua" "drawdots0")
\def\drawdots#1{\directlua{output(drawdots0("#1"))}}


% «pict2e» (to ".pict2e")
%
\def\beginpicture(#1,#2)(#3,#4){\expr{beginpicture(v(#1,#2),v(#3,#4))}}
\def\pictaxes{\expr{pictaxes()}}
\def\pictaxes{{\linethickness{0.6pt}\expr{pictaxes()}}}
\def\pictaxes{{\linethickness{0.5pt}\expr{pictaxes()}}}
\def\pictgrid{{\color{GrayPale}\expr{pictgrid()}}}
\def\pictgrid{{\color{GrayPale}\linethickness{0.3pt}\expr{pictgrid()}}}
\def\pictdots#1{\expr{pictdots("#1")}}
\def\pictpiecewise#1{\expr{pictpiecewise("#1")}}
\def\pictpiecewise#1{{\linethickness{1pt}\expr{pictpiecewise("#1")}}}
\def\picturedots(#1,#2)(#3,#4)#5{%
  \vcenter{\hbox{%
  \beginpicture(#1,#2)(#3,#4)%
  \pictaxes%
  \pictdots{#5}%
  \end{picture}%
  }}%
}
\def\picturepiecewise(#1,#2)(#3,#4)#5{%
  \vcenter{\hbox{%
  \beginpicture(#1,#2)(#3,#4)%
  \pictgrid%
  \pictaxes%
  \pictpiecewise{#5}%
  \end{picture}%
  }}%
}

\unitlength=9pt
\def\closeddot{\circle*{0.3}}
\def\opendot  {\circle*{0.3}\color{white}\circle*{0.2}}




% (find-djvupage "~/2015.2-C2/2015.2-C2.djvu")
$f_1(x) = \tikzp{[scale=0.3,auto]
    \mygrid (-1,-2) (5,2);
    \drawdots{ (-2,1)--(2,1)c (2,-1)o--(3,-1)o (3,0)c--(6,0) };
  }
  %
  \quad
  %
  \picturepiecewise(-1,-2)(5,2){
    (-2,1)--(2,1)c (2,-1)o--(3,-1)o (3,0)c--(6,0)
  }
$

% (find-fline "~/2015.2-C2/20151130_C23.jpg")
$f_2(x) = \tikzp{[scale=0.3,auto]
    \mygrid (-1,-2) (4,3);
    \drawdots{ (-3,0)--(0,0)o (0,2)c--(1,0)c (1,-1)o--((5,-1) };
  }
$

% (find-fline "~/2015.2-C2/20151130_C23.jpg")
$f_3(x) = \tikzp{[scale=0.3,auto]
    \mygrid (-1,-2) (5,3);
    \drawdots{ (-2,0)--(1,0)c--(2,2)c--(6,2) };
  }
$

$f_4(x) = \tikzp{[scale=0.3,auto]
    \mygrid (-1,-1) (6,5);
    \drawdots{ (-2,0)--(0,0)c--(1,3)c--(2,4)c--(3,3)c--(4,0)c--(7,0) };
  }
$

$f_5(x) = \tikzp{[scale=0.3,auto]
    \mygrid (-1,-2) (8,3);
    \drawdots{ (-2,0)--(1,0)o (1,1)c--(2,1)c (2,2)o--(3,2)o (3,1)c--(4,1)c
               (4,0)o--(5,0)o (5,-1)c--(6,-1)c (6,0)o--(10,0) };
  }
$

\msk

$g_1(x) = \begin{cases}
           1  & \text{se $x≤1$} \\
           2  & \text{se $1<x<3$} \\
           -1 & \text{se $3≤x$} \\
         \end{cases}
$

$g_2(x) = \begin{cases}
           1  & \text{se $x≤1$} \\
           2x & \text{se $1<x<2$} \\
           0  & \text{se $x=2$} \\
           1  & \text{se $2<x$} \\
         \end{cases}
$





% (find-LATEX "edrxpict.lua" "pictdots")
% (find-LATEX "2016-2-GA-algebra.tex" "picturedots")
% (find-es "tex" "color")


\unitlength=10pt

% «pictpiecewise» (to ".pictpiecewise")

%L f = function (x) return 4-(x-2)^2 end
%L ps = Points.fromfx(0, 4, 16, f)
%L po = Points.fromfx(1, 3, 8, f):polyunder()
\pu

$\vcenter{\hbox{%
 \beginpicture(0,0)(4,4)
 \pictgrid%
 {\color{red}\expr{po:fill()}}%
 \expr{ps:line()}
 \put(1,2){\circle*{0.5}}
 \put(1,2){\color{yellow}\circle*{0.3}}
 \put(1,1){\circle*{0.5}\color{white}\circle*{0.3}}
 \put(2,1){\closeddot}
 \put(2,2){\opendot}
 \pictaxes%
 \end{picture}%
 }}
 %
 \quad
 %
 \vcenter{\hbox{%
 \beginpicture(0,0)(4,4)
 %{\color{gray}\Line(2,1)(3,1)}
 {\color{GrayPale}\expr{pictgrid()}}
 %{\color{GrayLight}\Line(2,1)(3,1)}
 {\linethickness{1pt}
  \expr{pictpiecewise("(0,1)o--(1,1)o (1,2)c (1,3)o--(2,3)c--(3,2)--(4,2)c")}
 }
 \pictaxes%
 \end{picture}%
 }}
 %
 \quad
 %
 \vcenter{\hbox{%
 \beginpicture(0,0)(4,4)
 \pictgrid%
 \pictpiecewise{(0,1)o--(1,1)o (1,2)c (1,3)o--(2,3)c--(3,2)--(4,2)c}%
 \pictaxes%
 \end{picture}%
 }}
 %
 \quad
 %
 \picturepiecewise(0,0)(4,4){
   (0,1)o--(1,1)o (1,2)c (1,3)o--(2,3)c--(3,2)--(4,2)c
 }
$



% «rotatebox» (to ".rotatebox")

% (find-es "tex" "rotatebox")
% (find-angg ".emacs.papers" "pict2e")
% (find-es "tex" "pict2e")


\def\req{\rotatebox{90}{$=$}}
\def\req{\hbox{\rotatebox{90}{$=$}}}
\def\req{\lower 1.5pt\hbox{\rotatebox{90}{$=$}}}
\def\ro#1{\rotatebox{90}{$=$}}

$\mat{a &=& b \\
      \verteq & & \verteq \\
      c &=& d \\
 }
 \mat{a \\ a \\ a}
$

$a \verteq b$

$a \bhbox{$\verteq$} b$



\end{document}

% Local Variables:
% ee-anchor-format: "«%s»"
% coding: utf-8-unix
% End:
