Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on tikz.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/tikz.e>
#           or at <http://angg.twu.net/e/tikz.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.mailing-list»		(to "mailing-list")
# «.matrix-chat»		(to "matrix-chat")
# «.tikz-git»			(to "tikz-git")
# «.tikz-upstream»		(to "tikz-upstream")
# «.pgf-upstream»		(to "pgf-upstream")
# «.draw»			(to "draw")
# «.introduction»		(to "introduction")
# «.isoterma»			(to "isoterma")
# «.clip»			(to "clip")
# «.axes»			(to "axes")
# «.rectangle»			(to "rectangle")
# «.let»			(to "let")
# «.node-cs»			(to "node-cs")
# «.shape»			(to "shape")
# «.shape-single-arrow»		(to "shape-single-arrow")
# «.data-visualization»		(to "data-visualization")
# «.block»			(to "block")
# «.luacode»			(to "luacode")
# «.mygrid»			(to "mygrid")
# «.dots-labels-vectors»	(to "dots-labels-vectors")
# «.node»			(to "node")
# «.styles»			(to "styles")
# «.calc»			(to "calc")
# «.placement»			(to "placement")
# «.tut-petri-nets»		(to "tut-petri-nets")
# «.tut-petri-nets-styles»	(to "tut-petri-nets-styles")
# «.tut-petri-nets-naming»	(to "tut-petri-nets-naming")
# «.tut-petri-nets-relative»	(to "tut-petri-nets-relative")
# «.tut-coords»			(to "tut-coords")
# «.tut-path-syntax»		(to "tut-path-syntax")
# «.tut-path-move-to»		(to "tut-path-move-to")
# «.tut-path-line-to»		(to "tut-path-line-to")
# «.tut-nodes»			(to "tut-nodes")
# «.tut-nodes-text»		(to "tut-nodes-text")
# «.tut-nodes-positioning»	(to "tut-nodes-positioning")
# «.tut-pics»			(to "tut-pics")
# «.tut-child»			(to "tut-child")
#   «.tut-child-elpeg»		(to "tut-child-elpeg")
# «.tut-3D»			(to "tut-3D")
#   «.magnetic-field»		(to "magnetic-field")
# 
# PGF keys:
#   «.keys»			(to "keys")
#   «.tikzset»			(to "tikzset")
#   «.tikzoption»		(to "tikzoption")
#   «.show-value»		(to "show-value")
#   «.show-code»		(to "show-code")
#   «.pgfkeysgetvalue»		(to "pgfkeysgetvalue")
#   «.store-in»			(to "store-in")
#   «.luarepl»			(to "luarepl")
#
# StackOverflow:
#   «.so-notions-of-rectangle»	(to "so-notions-of-rectangle")
#   «.so-pgfkeys»		(to "so-pgfkeys")
#   «.se-alternative-to-edef»	(to "se-alternative-to-edef")
#
# «.tikz-3dplot»		(to "tikz-3dplot")
# «.nodes-and-arrows»		(to "nodes-and-arrows")
# «.dimension-too-large»	(to "dimension-too-large")
# «.squiggly-arrows»		(to "squiggly-arrows")
# «.usetikzlibrary»		(to "usetikzlibrary")
# «.square-of-oppositions»	(to "square-of-oppositions")
# «.dialectica-categories»	(to "dialectica-categories")
# «.placing-nodes»		(to "placing-nodes")
# «.eetikz»			(to "eetikz")
# «.naming-nodes»		(to "naming-nodes")
# «.arrows»			(to "arrows")
# «.tikzwd»			(to "tikzwd")
# «.seven-sketches-src»		(to "seven-sketches-src")
# «.bouzid-tahiri»		(to "bouzid-tahiri")
# «.quantaloids»		(to "quantaloids")
# «.ctusd»			(to "ctusd")
# «.ellis-from-hand-drawn»	(to "ellis-from-hand-drawn")
# «.open-logic»			(to "open-logic")
# «.functorialwiki»		(to "functorialwiki")
# «.loregian-eyes»		(to "loregian-eyes")
# «.grid-on-image»		(to "grid-on-image")
# «.c_tikzref»			(to "c_tikzref")
# «.included-files»		(to "included-files")
# «.repl»			(to "repl")
# «.rounded-corners»		(to "rounded-corners")
# «.horiz-and-vert»		(to "horiz-and-vert")
# «.pyramid»			(to "pyramid")
#
# External packages:
#   «.commutative-diagrams»	(to "commutative-diagrams")
#   «.quiver»			(to "quiver")
#   «.freetikz»			(to "freetikz")
#   «.tikzit»			(to "tikzit")
#   «.tikzit-tmp»		(to "tikzit-tmp")
#   «.ktikz»			(to "ktikz")
#   «.kodi»			(to "kodi")
#   «.tikz-cd»			(to "tikz-cd")
#   «.tikzcd-editor»		(to "tikzcd-editor")
#   «.sane_tikz»		(to "sane_tikz")
#   «.circuitikz»		(to "circuitikz")
#     «.voltage-no-inversion»	(to "voltage-no-inversion")
#   «.tikzducks»		(to "tikzducks")



# (find-es "diagrams" "tikz")
# (find-es "xypic" "pgf")
# (find-angg ".emacs.papers" "pgf")
# http://en.wikipedia.org/wiki/PGF/TikZ
# http://tex.stackexchange.com/questions/2044/how-to-install-a-current-version-of-tikz
# http://www.gnuplotting.org/installing-the-tikz-terminal/

# http://www.texample.net/tikz/examples/

# https://stackoverflow.com/questions/tagged/tikz
# https://tex.stackexchange.com/questions/tagged/tikz-pgf



#####
#
# mailing-list
# 2022oct23
#
#####

# «mailing-list»  (to ".mailing-list")
# https://tug.org/mailman/listinfo/pgf-tikz
# https://tug.org/pipermail/pgf-tikz/



#####
#
# matrix-chat
# 2022nov01
#
#####

# «matrix-chat»  (to ".matrix-chat")
# (find-es "matrix")
# https://github.com/pgf-tikz/pgf
# We also have a chat on the Matrix network at #pgf-tikz:matrix.org
# https://matrix.to/#/#pgf-tikz:matrix.org




#####
#
# PGF/TikZ: the git repository
# 2022oct23
#
#####

# «tikz-git»  (to ".tikz-git")
# (find-angg ".emacs" "tikzgit")
# https://github.com/pgf-tikz/pgf
# (find-git-links "https://github.com/pgf-tikz/pgf" "tikzgit")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/usrc/pgf/
cd      ~/usrc/
git clone https://github.com/pgf-tikz/pgf
cd      ~/usrc/pgf/

git pull

# (code-c-d "tikzgit"    "~/usrc/pgf/")
# (code-c-d "tikzgittgp" "~/usrc/pgf/tex/generic/pgf/")
# (code-c-d "tikzman"    "~/usrc/pgf/doc/generic/pgf/")
# (find-tikzgitfile "")
# (find-tikzgittgpfile "")
# (find-tikzmanfile "")
# (find-tikzgitsh "find * | sort")
# (find-tikzgitfile "tex/generic/pgf/basiclayer/")

# (tiks)
# (find-angg "LUA/tikz1.el" "find-tikzsearch-links")
# (find-angg "LUA/tikz1.el" "tiks")




#####
#
# tikz and pgf from upstream
# 2015dec06
#
#####

# «tikz-upstream» (to ".tikz-upstream")
# «pgf-upstream» (to ".pgf-upstream")
# http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf
# http://mirrors.ctan.org/graphics/pgf/base.zip

;; (find-angg ".emacs.papers" "tikz")

(code-pdf-page "tikzman" "$S/http/mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf")
(code-pdf-text "tikzman" "$S/http/mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf")
;; (find-tikzmanpage)
;; (find-tikzmantext)




#####
#
# \draw
# 2019jan22
#
#####

# «draw» (to ".draw")
# (find-tikzmanpage 1235 "Index")
# (find-tikzmantext 1235 "Index")
# (find-tikzmanpage 1242 "\\draw")
# (find-tikzmantext 1242 "\\draw")
# (find-tikzmanpage  167 "\\draw")
# (find-tikzmantext  167 "\\draw")
# (find-tikzmanpage  173 "15.4    Adding Arrow Tips to a Path")
# (find-tikzmantext  173 "15.4    Adding Arrow Tips to a Path")
# (find-tikzmanpage  185 "16     Arrows")
# (find-tikzmantext  185 "16     Arrows")
# (find-tikzmanpage  185 "\\draw[->]")
# (find-tikzmantext  185 "\\draw[->]")
# (find-tikzmanpage  187 "\\tikz [<->]")
# (find-tikzmantext  187 "\\tikz [<->]")



#####
#
# introduction
# 2022oct15
#
#####

# «introduction»  (to ".introduction")
# (find-tikzmanpage 26 "1     Introduction")
# (find-tikzmantext 26 "1     Introduction")
# (find-tikzmanpage 32 "2.3    Straight Path Construction")
# (find-tikzmantext 32 "2.3    Straight Path Construction")
# (find-tikzmanpage 32 "2.4    Curved Path Construction")
# (find-tikzmantext 32 "2.4    Curved Path Construction")
# (find-tikzmanpage 33 "2.6    Rectangle Path Construction")
# (find-tikzmantext 33 "2.6    Rectangle Path Construction")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
tikzbody = tikz [=[
  \draw[thick,rounded corners=8pt]
  (0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);
]=]
show()
* (tikz-show)

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
tikzbody = tikz [=[
  \filldraw [gray] (0,0) circle   [radius=2pt]
                   (1,1) circle   [radius=2pt]
                   (2,1) circle   [radius=2pt]
                   (2,0) circle   [radius=2pt];
  \draw (0,0) .. controls (1,1)   and (2,1) .. (2,0);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw (-1.5,0) -- (1.5,0);
  \draw (0,-1.5) -- (0,1.5);
  \draw (-1,0) .. controls (-1,0.555) and (-0.555,1) .. (0,1)
               .. controls (0.555,1) and (1,0.555) .. (1,0);
]=]
show()
* (tikz-show)







#####
#
# isoterma
# 2014may16 / 2022oct14
#
#####

# «isoterma» (to ".isoterma")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-angg "LUA/tikz1.lua")
tikzbody = tikz [=[
  \draw[very thin,color=gray] (0,0) grid (6,5);
  \draw[->] (0,0) -- (7,0) node[right] {$P$};
  \draw[->] (0,0) -- (0,6) node[above,left] {$V$};
  \draw[color=blue][domain=1.6:6][mark=x,mark indices={2,8,20},smooth]
    plot (\x,{8/\x})
  node[right] {$\theta_{0}$};
  \node at (2.6,4.7) {$(P_{A_{0}},V_{A_{0}})$};
  \node at (3.5,3.1) {$(P^{\prime}_{A_{0}},V^{\prime}_{A_{0}})$};
  \node at (5.3,2) {$(P^{\prime\prime}_{A_{0}},V^{\prime\prime}_{A_{0}})$};
]=]
options  = "[scale=0.75]"
show()
* (tikz-show)

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-angg "LUA/tikz1.lua")
tikzbody = tikz [=[
  \draw[step=.5cm,gray,very thin] (-1.4,-1.4) grid (1.4,1.4);
  \draw (-1.5,0) -- (1.5,0);
  \draw (0,-1.5) -- (0,1.5);
  \draw (0,0) circle (1cm);
  \draw (3mm,0mm) arc (0:30:3mm);
]=]
show()
* (tikz-show)

options  = "[scale=0.5]"
tikzbody = tikz [=[
  \draw[step=1cm,gray,very thin] (-2,-3) grid (4,4);
  \draw[very thick] (-2,0) -- (4,0);
  \draw[very thick] (0,-3) -- (0,4);
  \draw (-1.5,0) -- (1.5,0);
  \draw (0,-1.5) -- (0,1.5);
  \draw (0,0) circle (1cm);
  \draw (3mm,0mm) arc (0:30:3mm);
]=]
show()
* (tikz-show)




#####
#
# clip
# 2022oct14
#
#####

# «clip»  (to ".clip")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-angg "LUA/tikz1.lua")
options  = "[scale=0.5]"
tikzbody = tikz [=[
  <<clip>>
  \draw[very thick] (-10,0) -- (10,0);
  \draw[very thick] (0,-10) -- (0,10);
  \foreach \x in {-10,...,10} \draw (\x,-0.2) -- (\x,0.2);
  \foreach \y in {-10,...,10} \draw (-0.2,\y) -- (0.2,\y);
  %
  \draw (2,1) circle (0.2) node [anchor=west] {(2,1)};
]=]
clip = [=[ \clip (-2 -0.4, -2 -0.4) rectangle (3 +0.4, 4 +0.4); ]=]
show()
* (tikz-show)

clip = [=[ \clip (-3 -0.4, -2 -0.4) rectangle (3 +0.4, 4 +0.4); ]=]
show()
* (tikz-show)




#####
#
# axes
# 2022oct12
#
#####

# «axes»  (to ".axes")
# (find-tikzmanpage 34 "2.7    Grid Path Construction")
# (find-tikzmantext 34 "2.7    Grid Path Construction")
# (find-tikzmanpage 36 "[scale=3]")
# (find-tikzmantext 36 "[scale=3]")
# (find-tikzmanpage 42 "2.20    Repeating Things: For-Loops")
# (find-tikzmantext 42 "2.20    Repeating Things: For-Loops")
# (find-tikzmanpage 43 "\\foreach \\x in {1,...,10}")
# (find-tikzmantext 43 "\\foreach \\x in {1,...,10}")
# (find-tikzmanpage 62 "label=left")
# (find-tikzmantext 62 "label=left")
# (find-tikzmanpage 846 "81       Axes")
# (find-tikzmantext 846 "81       Axes")
# (find-tikzmanpage 859 "school book axes")
# (find-tikzmantext 859 "school book axes")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-angg "LUA/tikz1.lua")
tikzbody = tikz [=[
  \draw[very thin,color=GrayPale] (0,0) grid (6,4);
  \draw[->] (0,0) -- (6.5,0) node[right] {$x$};
  \draw[->] (0,0) -- (0,4.5) node[above,left] {$y$};
  \foreach \x in {0,...,6} \draw (\x,-0.125) -- (\x,0.125);
  \foreach \y in {0,...,4} \draw <<ticksoptions>> (-0.125,\y) -- (0.125,\y);
  \draw[thick, color=orange] (0,1)--(1,3)--(4,2);
]=]
show()
* (tikz-show)

options = "[scale=0.5]"
show()
* (tikz-show)

ticksoptions = "[very thick, color=red]"
show()
* (tikz-show)




#####
#
# rectangle
# 2022oct18
#
#####

# «rectangle»  (to ".rectangle")
# (find-tikzmanpage  33 "2.6    Rectangle Path Construction")
# (find-tikzmantext  33 "2.6    Rectangle Path Construction")
# (find-tikzmanpage 153 "14.4    The Rectangle Operation")
# (find-tikzmantext 153 "14.4    The Rectangle Operation")
# (find-tikzmanpage 760 "70     Shape Library")
# (find-tikzmantext 760 "70     Shape Library")
# (find-tikzmanpage 761   "Shape rectangle")
# (find-tikzmantext 761   "Shape rectangle")

# (find-tikzmanpage  33 "2.6    Rectangle Path Construction")
# (find-tikzmantext  33 "2.6    Rectangle Path Construction")
# (find-tikzmanpage  34 "2.7    Grid Path Construction")
# (find-tikzmantext  34 "2.7    Grid Path Construction")
# (find-tikzmanpage  39   "++(2cm,0cm)")
# (find-tikzmantext  39   "++(2cm,0cm)")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
tikzbody = tikz [=[
  [scale=0.5, rounded corners]
  \draw[very thin,color=GrayPale] (0,0) grid (10,7);
  \draw (1,2) rectangle (3,3);
  \draw (4,1) rectangle ++ (1,1);
  \draw (2,5) +(0,1) rectangle (4,5);
]=]
show()
* (tikz-show)




#####
#
# let
# 2022oct24
#
#####

# «let»  (to ".let")
# (tiks "The Let Operation")
# (find-tikzmanpage 164 "14.15     The Let Operation")
# (find-tikzmantext 164 "14.15     The Let Operation")
# (find-tikzmanfile "pgfmanual-en-tikz-paths.tex" "The Let Operation")




#####
#
# The Node Coordinate System
# 2022oct24
#
#####

# «node-cs»  (to ".node-cs")
# (tiks "Node Coordinate System")
# (find-tikzmanpage 137 "13.2.3     Node Coordinate System")
# (find-tikzmantext 137 "13.2.3     Node Coordinate System")
# (find-tikzmanfile "pgfmanual-en-tikz-coordinates.tex" "Node Coordinate System")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
usepackages = [=[
  \usetikzlibrary{arrows.meta}
]=]
tikzbody = tikz [=[
  \node (shape)   at   (0,2)    [draw]   {class   Shape};
  \node (rect)    at   (-2,0)   [draw]   {class   Rectangle};
  \node (circle)  at   (2,0)    [draw]   {class   Circle};
  \node (ellipse) at   (6,0)    [draw]   {class   Ellipse};

  \draw (node cs:name=circle,anchor=north) |- (0,1);
  \draw (node cs:name=ellipse,anchor=north) |- (0,1);
  \draw [arrows = -{Triangle[open, angle=60:3mm]}]
           (node cs:name=rect,anchor=north)
        |- (0,1) -| (node cs:name=shape,anchor=south);
]=]
show()
* (tikz-show)

= Show.log


# (find-angg ".emacs.papers" "tikz")
# (find-angg ".emacs.papers" "tikz" "Node Coordinate System")
# (find-tikzmanpage 1 "Node Coordinate System")
# (find-tikzmantext 1 "Node Coordinate System")
# (find-tikzgitfile "")
# (find-tikzmanfile "")
# (find-tikzgitgrep "grep --color=auto -nH --null -e 'Node Coordinate System' *.tex")
# (find-tikzgitmanualgrep "grep --color=auto -nH --null -e 'Node Coordinate System' *.tex")



#####
#
# shape
# 2022oct24
#
#####

# «shape»  (to ".shape")
# (tiks "Shape Library")
# (find-tikzmanpage 760 "70     Shape Library")
# (find-tikzmantext 760 "70     Shape Library")
# (find-tikzmanpage 761   "Shape rectangle")
# (find-tikzmantext 761   "Shape rectangle")
# (find-tikzmanfile "pgfmanual-en-library-shapes.tex" "Shape Library")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
usepackages = [=[
  \usetikzlibrary{shapes.geometric}
]=]
defs = [=[
  \tikzset{
    shape example/.style= {color      = black!30,
                           fill       = yellow!30,
                           draw,
                           line width =  .5cm,
                           inner xsep = 2.5cm,
                           inner ysep = 0.5cm}
}
]=]
tikzbody = tikz [=[
  \node[name=s,shape=rectangle,shape example] {Rectangle\vrule width 1pt height 2cm};
  \foreach \anchor/\placement in
    {north west/above left, north/above, north east/above right,
     west/left, center/above, east/right,
     mid west/right, mid/above, mid east/left,
     base west/left, base/below, base east/right,
     south west/below left, south/below, south east/below right,
     text/left, 10/right, 130/above}
     \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)}
       node[\placement] {\scriptsize\texttt{(s.\anchor)}};
]=]
show()
* (tikz-show)




#####
#
# shape-single-arrow
# 2022nov02
#
#####

# «shape-single-arrow»  (to ".shape-single-arrow")
# (tiks "Shape single arrow")
# (find-tikzmanpage 785 "Shape single arrow")
# (find-tikzmantext 785 "Shape single arrow")
# (find-tikzmanfile "pgfmanual-en-library-shapes.tex" "shape=single arrow, shape example")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
usepackages = [=[
  \usetikzlibrary{shapes.arrows}
]=]
defs = [=[
  \tikzset{
    shape example/.style= {color      = black!30,
                           fill       = yellow!30,
                           draw,
                           line width =  .5cm,
                           inner xsep = 2.5cm,
                           inner ysep = 0.5cm}
}
]=]
tikzbody = tikz [=[
  \node[name=s,shape=single arrow, shape example, single arrow head extend=1.5cm]
    {Single Arrow\vrule width1pt height2cm};
  \foreach \anchor/\placement in
    {text/above,      center/above, 20/above,
     mid west/left,   mid/above,    mid east/above left,
     base west/below, base/below,   base east/below,
     tip/above, before tip/above, after tip/below, before head/above,
     after head/below, after tail/above, before tail/below, tail/right,
     north/above, south/below, east/below, west/above,
     north west/above, north east/below, south west/below, south east/above}
     \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)}
       node[\placement] {\scriptsize\texttt{(s.\anchor)}};
]=]
scale = 0.5
show()
* (tikz-show)










#####
#
# data-visualization
# 2022oct14
#
#####

# «data-visualization»  (to ".data-visualization")
# (find-tikzmanpage 825 "Data Visualization")
# (find-tikzmantext 825 "Data Visualization")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-angg "LUA/tikz1.lua")
usepackages = [=[
  \usetikzlibrary{datavisualization}
]=]
tikzbody = [=[
  \datavisualization [scientific axes, visualize as smooth line]
    data [format=function] {
    var x : interval [0:100];
    func y = sqrt(\value x);
  };
]=]
= texbody:try()
= Show.log
** ! Package pgf Error: Unknown data format 'function'.
* (tikz-show)



#####
#
# block
# 2014may26
#
#####

# «block» (to ".block")
# (find-angg ".emacs.papers" "pgf")


* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
defs = [=[
  \tikzset{axis/.style=very thick}
  \tikzset{tick/.style=thick}
  \tikzset{grid/.style=gray,very thin}
  \tikzset{dot/.style=circle,draw=red,fill=blue}
]=]
tikzbody = tikz [=[
  [scale=0.5]
  \clip (-2-0.4, -3-0.4) rectangle (4+0.4, 5+0.4);
  \draw[step=1cm,grid] (-2,-3) grid (4,5);
  \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);
  %
  \coordinate [label=left:\textcolor{blue}{$A$}] (A) at (0,1);
  \coordinate [label=right:\textcolor{blue}{$B$}] (B) at (3,2);
  \draw [thick] [->] (A) -- (B);
  \foreach \point in {A,B}
    \fill [black] (\point) circle (4pt);
]=]
show()
* (tikz-show)



#####
#
# luacode
# 2014jun08
#
#####

# «luacode» (to ".luacode")
* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)

#*
# (defun c  () (interactive) (eev-bounded) (find-zsh0 "ee"))
# (defun cc () (interactive) (eev-bounded) (find-zsh  "ee"))
# (defun d  () (interactive) (find-pdf-page "/tmp/tikz/test1.pdf"))
# (find-angg ".emacs.papers" "tikz")

mkdir /tmp/tikz/
cd    /tmp/tikz/
cat > test1.tex <<'%%%'
\documentclass{book}
\usepackage{tikz}
\usepackage{luacode}
\begin{document}
\tikzset{axis/.style=very thick}
\tikzset{tick/.style=thick}
\tikzset{grid/.style=gray,very thin}
%
\begin{luacode*}
xyfromuv0 = function (u,v) return u + v, u - v end
xyfromuv  = function (u,v) return (u + v)..","..(u - v) end
xyfromt0  = function (t)   return u + v, u - v end

strpath = function (xy, a, b, step)
    local T = {}
    for t=a,b,step do
      table.insert(T, string.format("(%d,%d)", xy(y)))
    end
    return table.concat(T, " -- ")
  end
\end{luacode*}
\def\xyfromuv#1#2{\directlua{xyfromuv(#1, #2)}}

\xyfromuv 4 {1/4}

\xyfromuv 8 {1/8}

\directlua{tex.print(strpath(function (t) return xyfromuv0(t, 1/t) end, 1, 2, 0.125))}

\begin{tikzpicture}[scale=0.5]
  \clip (-2-0.4, -3-0.4) rectangle (4+0.4, 5+0.4);
  \draw[step=1cm,grid] (-2,-3) grid (4,5);
  \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);
  %
  \draw (\xyfromuv 2 {1/2}) -- (\xyfromuv 4 {1/4}) ;
  %
\end{tikzpicture}
\end{document}
%%%
lualatex test1.tex
#*




#####
#
# mygrid
# 2015apr02 / 2022oct18
#
#####

# «mygrid» (to ".mygrid")
# «dots-labels-vectors» (to ".dots-labels-vectors")
# (find-angg ".emacs.papers" "tikz")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
defs = [=[
  % Part 1:
  \tikzset{axis/.style=very thick}
  \tikzset{tick/.style=thick}
  \tikzset{grid/.style=gray!20,very thin}
  \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);
  }
  % Part 2:
  \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\vv{\vec v}
  \def\VEC#1{{\overrightarrow{(#1)}}}
]=]
tikzbody = tikz [=[
  [scale=0.75]
  \mygrid (-2,-2) (6,4);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [scale=0.75,auto]
  \mygrid (-1,-1) (4,3);
  \node (A) at ( 1,1) [cldot,label=below:$A$] {};
  \node (B) at ( 3,2) [cldot,label=above:$B$] {};
  \draw [->] (A) to node [swap] {$\vv = \VEC{2,1}$} (B);
]=]
show()
= Show.log
* (tikz-show)




#####
#
# \node
# 2022oct15
#
#####

# «node»  (to ".node")
# (find-tikzmanpage  50 "3.3     Introduction to Nodes")
# (find-tikzmantext  50 "3.3     Introduction to Nodes")
# (find-tikzmanpage  52 "3.6    Node Size")
# (find-tikzmantext  52 "3.6    Node Size")




#####
#
# styles
# 2022oct15
#
#####

# «styles»  (to ".styles")
# (to "keys")
# (find-tikzmanpage 131 "12.4     Using Graphic Options")
# (find-tikzmantext 131 "12.4     Using Graphic Options")
# (find-tikzmanpage 131 "12.4.2   Using Styles to Manage How Pictures Look")
# (find-tikzmantext 131 "12.4.2   Using Styles to Manage How Pictures Look")



#####
#
# calc
# 2022nov03
#
#####

# «calc»  (to ".calc")
# (tiks "Coordinate Calculations")
# (find-tikzmanpage 573 "46 Calc Library")
# (find-tikzmanpage 133 "13 Specifying Coordinates")
# (find-tikzmanpage 145 "13.5     Coordinate Calculations")
# (find-tikzmantext 145 "13.5     Coordinate Calculations")
# (find-tikzmanpage 146 "13.5.1   The General Syntax")
# (find-tikzmantext 146 "13.5.1   The General Syntax")
# (find-tikzmanpage 146 "13.5.2   The Syntax of Factors")
# (find-tikzmantext 146 "13.5.2   The Syntax of Factors")
# (find-tikzmanpage 146 "13.5.3   The Syntax of Partway Modifiers")
# (find-tikzmantext 146 "13.5.3   The Syntax of Partway Modifiers")
# (find-tikzmanpage 148 "13.5.4   The Syntax of Distance Modifiers")
# (find-tikzmantext 148 "13.5.4   The Syntax of Distance Modifiers")
# (find-tikzmanpage 148 "13.5.5   The Syntax of Projection Modifiers")
# (find-tikzmantext 148 "13.5.5   The Syntax of Projection Modifiers")
# (find-tikzgitsh "find * | sort")
# (find-tikzgitsh "find * | sort | grep calc")
# (find-tikzgittgpfile "frontendlayer/tikz/libraries/tikzlibrarycalc.code.tex")
# (find-tikzgittgpfile "math/pgfmathcalc.code.tex")
# (find-tikzmanfile "pgfmanual-en-tikz-coordinates.tex" "{The Syntax of Factors}")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
usepackages = [=[
  \usetikzlibrary{calc}
]=]
tikzbody = tikz [=[
  \draw [help lines] (0,0) grid (3,2);
  \fill [red]   ($2*(1,1)$)              circle (2pt);
  \fill [green] (${1+1}*(1,.5)$)         circle (2pt);
  \fill [blue]  ($cos(0)*sin(90)*(1,1)$) circle (2pt);
  \fill [black] (${3*(4-3)}*(1,0.5)$)    circle (2pt);
]=]
show()
* (tikz-show)





#####
#
# placement
# 2022nov04
#
#####

# «placement»  (to ".placement")
# (tiks "node[anchor=north]")
# (tiks "/tikz/anchor")
# (tiks "basic placement")
# (find-tikzmanpage 44 "node[anchor=north]")
# (find-tikzmantext 44 "node[anchor=north]")
# (find-tikzmanpage 232 "17.5     Positioning Nodes")
# (find-tikzmantext 232 "17.5     Positioning Nodes")
# (find-tikzmanpage 232 "17.5.1   Positioning Nodes Using Anchors")
# (find-tikzmantext 232 "17.5.1   Positioning Nodes Using Anchors")
# (find-tikzmanpage 233   "/tikz/anchor")
# (find-tikzmantext 233   "/tikz/anchor")
# (find-tikzmanpage 233 "17.5.2   Basic Placement Options")
# (find-tikzmantext 233 "17.5.2   Basic Placement Options")
# (find-tikzmanpage 234 "17.5.3   Advanced Placement Options")
# (find-tikzmantext 234 "17.5.3   Advanced Placement Options")
# (find-tikzmanpage 320 "/tikz/anchor")
# (find-tikzmantext 320 "/tikz/anchor")




#####
#
# tut-petri-nets
# 2022oct15
#
#####

# «tut-petri-nets»  (to ".tut-petri-nets")
# (find-tikzmanpage 49 "3       Tutorial: A Petri-Net for Hagen")
# (find-tikzmantext 49 "3       Tutorial: A Petri-Net for Hagen")
# (find-tikzmanpage 50 "two nodes of shape rectangle")
# (find-tikzmantext 50 "two nodes of shape rectangle")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
usepackages = [=[
  \usetikzlibrary{arrows,decorations.pathmorphing,
                  backgrounds,positioning,fit,petri}
]=]

-- (find-tikzmanpage 50 "3.3     Introduction to Nodes")
-- (find-tikzmantext 50 "3.3     Introduction to Nodes")
--
tikzbody = tikz [=[
  \path ( 0,2) node   [shape=circle,draw] {}
        ( 0,1) node   [shape=circle,draw] {}
        ( 0,0) node   [shape=circle,draw] {}
        ( 1,1) node   [shape=rectangle,draw] {}
        (-1,1) node   [shape=rectangle,draw] {};
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 51 "3.4    Placing Nodes Using the At Syntax")
-- (find-tikzmantext 51 "3.4    Placing Nodes Using the At Syntax")
tikzbody = tikz [=[
  \path node at ( 0,2)   [shape=circle,draw] {}
        node at ( 0,1)   [shape=circle,draw] {}
        node at ( 0,0)   [shape=circle,draw] {}
        node at ( 1,1)   [shape=rectangle,draw] {}
        node at (-1,1)   [shape=rectangle,draw] {};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \node at ( 0,2) [circle,draw] {};
  \node at ( 0,1) [circle,draw] {};
  \node at ( 0,0) [circle,draw] {};
  \node at ( 1,1) [rectangle,draw] {};
  \node at (-1,1) [rectangle,draw] {};
]=]
show()
* (tikz-show)

-- «tut-petri-nets-styles»  (to ".tut-petri-nets-styles")
-- (find-tikzmanpage 51 "3.5    Using Styles")
-- (find-tikzmantext 51 "3.5    Using Styles")
--
tikzbody = tikz [=[
  \node at ( 0,2) [circle,draw=blue!50,fill=blue!20] {};
  \node at ( 0,1) [circle,draw=blue!50,fill=blue!20] {};
  \node at ( 0,0) [circle,draw=blue!50,fill=blue!20] {};
  \node at ( 1,1) [rectangle,draw=black!50,fill=black!20] {};
  \node at (-1,1) [rectangle,draw=black!50,fill=black!20] {};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [place/.style={circle,draw=blue!50,fill=blue!20,thick},
   transition/.style={rectangle,draw=black!50,fill=black!20,thick}]
  \node at ( 0,2) [place] {};
  \node at ( 0,1) [place] {};
  \node at ( 0,0) [place] {};
  \node at ( 1,1) [transition] {};
  \node at (-1,1) [transition] {};
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 52 "3.6   Node Size")
-- (find-tikzmantext 52 "3.6   Node Size")
--
tikzbody = tikz [=[
  [inner sep=2mm,
   place/.style={circle,draw=blue!50,fill=blue!20,thick},
   transition/.style={rectangle,draw=black!50,fill=black!20,thick}]
  \node at ( 0,2) [place] {};
  \node at ( 0,1) [place] {};
  \node at ( 0,0) [place] {};
  \node at ( 1,1) [transition] {};
  \node at (-1,1) [transition] {};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [place/.style={circle,draw=blue!50,fill=blue!20,thick,
                 inner sep=0pt,minimum size=6mm},
   transition/.style={rectangle,draw=black!50,fill=black!20,thick,
                      inner sep=0pt,minimum size=4mm}]
  \node at ( 0,2) [place] {};
  \node at ( 0,1) [place] {};
  \node at ( 0,0) [place] {};
  \node at ( 1,1) [transition] {};
  \node at (-1,1) [transition] {};
]=]
show()
* (tikz-show)

-- «tut-petri-nets-naming»  (to ".tut-petri-nets-naming")
-- (find-tikzmanpage 52 "3.7   Naming Nodes")
-- (find-tikzmantext 52 "3.7   Naming Nodes")
--
tikzbody = tikz [=[
  \node (waiting 1) at ( 0,2)        [place] {};
  \node (critical 1) at ( 0,1)       [place] {};
  \node (semaphore) at ( 0,0)        [place] {};
  \node (leave critical) at ( 1,1)   [transition] {};
  \node (enter critical) at (-1,1)   [transition] {};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \node[place]        (waiting 1)        at   ( 0,2)   {};
  \node[place]        (critical 1)       at   ( 0,1)   {};
  \node[place]        (semaphore)        at   ( 0,0)   {};
  \node[transition]   (leave critical)   at   ( 1,1)   {};
  \node[transition]   (enter critical)   at   (-1,1)   {};
]=]
show()
* (tikz-show)

-- «tut-petri-nets-relative»  (to ".tut-petri-nets-relative")
-- (find-tikzmanpage 53 "3.8    Placing Nodes Using Relative Placement")
-- (find-tikzmantext 53 "3.8    Placing Nodes Using Relative Placement")
--
tikzbody = tikz [=[
  \node[place]        (waiting)                                {};
  \node[place]        (critical)         [below=of waiting]    {};
  \node[place]        (semaphore)        [below=of critical]   {};
  \node[transition]   (leave critical)   [right=of critical]   {};
  \node[transition]   (enter critical)   [left=of critical]    {};
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 53 "3.9    Adding Labels Next to Nodes")
-- (find-tikzmantext 53 "3.9    Adding Labels Next to Nodes")
--
tikzbody = tikz [=[
  \node[place]        (waiting)                                {};
  \node[place]        (critical)         [below=of waiting]    {};
  \node[place]        (semaphore)        [below=of critical]   {};
  \node[transition]   (leave critical)   [right=of critical]   {};
  \node[transition]   (enter critical)   [left=of critical]    {};
  \node [red,above] at (semaphore.north) {$s\le 3$};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \node[place]      (waiting)                              {};
  \node[place]      (critical)       [below=of waiting]    {};
  \node[place]      (semaphore)      [below=of critical,
                                      label=above:$s\le3$] {};
  \node[transition] (leave critical) [right=of critical]   {};
  \node[transition] (enter critical) [left=of critical]    {};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \node [circle,draw,label=60:$60^\circ$,label=below:$-90^\circ$] {my circle};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 55 "3.10    Connecting Nodes")
-- (find-tikzmantext 55 "3.10    Connecting Nodes")
--
tikzbody = tikz [=[
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 57 "3.11    Adding Labels Next to Lines")
-- (find-tikzmantext 57 "3.11    Adding Labels Next to Lines")
--
tikzbody = tikz [=[
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 57 "3.12    Adding the Snaked Line and Multi-Line Text")
-- (find-tikzmantext 57 "3.12    Adding the Snaked Line and Multi-Line Text")
--
tikzbody = tikz [=[
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 58 "3.13    Using Layers: The Background Rectangles")
-- (find-tikzmantext 58 "3.13    Using Layers: The Background Rectangles")
--
tikzbody = tikz [=[
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 59 "3.14    The Complete Code")
-- (find-tikzmantext 59 "3.14    The Complete Code")
--
tikzbody = tikz [=[
]=]
show()
* (tikz-show)





#####
#
# tut-coords
# 2022oct18
#
#####

# «tut-coords»  (to ".tut-coords")
# (find-tikzmanpage 133 "13       Specifying Coordinates")
# (find-tikzmantext 133 "13       Specifying Coordinates")
# (find-tikzmanpage 133 "13.1     Overview")
# (find-tikzmantext 133 "13.1     Overview")
# (find-tikzmanpage 133 "13.2     Coordinate Systems")
# (find-tikzmantext 133 "13.2     Coordinate Systems")
# (find-tikzmanpage 133 "13.2.1    Canvas, XYZ, and Polar Coordinate Systems")
# (find-tikzmantext 133 "13.2.1    Canvas, XYZ, and Polar Coordinate Systems")
# (find-tikzmanpage 137 "13.2.3     Node Coordinate System")
# (find-tikzmantext 137 "13.2.3     Node Coordinate System")
# (find-tikzmanpage 139 "13.2.4   Tangent Coordinate Systems")
# (find-tikzmantext 139 "13.2.4   Tangent Coordinate Systems")
# (find-tikzmanpage 140 "13.2.5    Defining New Coordinate Systems")
# (find-tikzmantext 140 "13.2.5    Defining New Coordinate Systems")
# (find-tikzmanpage 140 "13.3      Coordinates at Intersections")
# (find-tikzmantext 140 "13.3      Coordinates at Intersections")
# (find-tikzmanpage 140 "13.3.1    Intersections of Perpendicular Lines")
# (find-tikzmantext 140 "13.3.1    Intersections of Perpendicular Lines")
# (find-tikzmanpage 141 "13.3.2   Intersections of Arbitrary Paths")
# (find-tikzmantext 141 "13.3.2   Intersections of Arbitrary Paths")
# (find-tikzmanpage 143 "13.4           Relative and Incremental Coordinates")
# (find-tikzmantext 143 "13.4           Relative and Incremental Coordinates")
# (find-tikzmanpage 143 "13.4.1         Specifying Relative Coordinates")
# (find-tikzmantext 143 "13.4.1         Specifying Relative Coordinates")
# (find-tikzmanpage 144 "13.4.2   Rotational Relative Coordinates")
# (find-tikzmantext 144 "13.4.2   Rotational Relative Coordinates")
# (find-tikzmanpage 145 "13.4.3   Relative Coordinates and Scopes")
# (find-tikzmantext 145 "13.4.3   Relative Coordinates and Scopes")
# (find-tikzmanpage 145 "13.5     Coordinate Calculations")
# (find-tikzmantext 145 "13.5     Coordinate Calculations")
# (find-tikzmanpage 146 "13.5.1   The General Syntax")
# (find-tikzmantext 146 "13.5.1   The General Syntax")
# (find-tikzmanpage 146 "13.5.2   The Syntax of Factors")
# (find-tikzmantext 146 "13.5.2   The Syntax of Factors")
# (find-tikzmanpage 146 "13.5.3   The Syntax of Partway Modifiers")
# (find-tikzmantext 146 "13.5.3   The Syntax of Partway Modifiers")
# (find-tikzmanpage 148 "13.5.4   The Syntax of Distance Modifiers")
# (find-tikzmantext 148 "13.5.4   The Syntax of Distance Modifiers")
# (find-tikzmanpage 148 "13.5.5   The Syntax of Projection Modifiers")
# (find-tikzmantext 148 "13.5.5   The Syntax of Projection Modifiers")




#####
#
# tut-path-syntax
# 2022oct16
#
#####

# «tut-path-syntax»  (to ".tut-path-syntax")
# (tiks "Syntax for Path Specifications")
# (find-pgfmanualpage 149 "14      Syntax for Path Specifications")
# (find-pgfmanualtext 149 "14      Syntax for Path Specifications")
# (find-tikzmanfile "pgfmanual-en-tikz-paths.tex" "Syntax for Path Specifications")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
-- (find-tikzmanpage 149 "14      Syntax for Path Specifications")
-- (find-tikzmantext 149 "14      Syntax for Path Specifications")

tikzbody = tikz [=[
  \draw (0,0) -- (1,1)
       [rounded corners] -- (2,0) -- (3,1)
       [sharp corners] -- (3,0) -- (2,1);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw (0,0) -- (1,1)
       {[rounded corners] -- (2,0) -- (3,1)}
       -- (3,0) -- (2,1);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw (0,0) -- (1,1)
       [color=red] -- (2,0) -- (3,1)
       [color=blue] -- (3,0) -- (2,1);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw (0,0) -- (1,1);
  \draw [color=red] (2,0) -- (3,1);
  \draw [color=blue] (3,0) -- (2,1);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
    [fill=yellow!80!black,      % only sets the color
     every path/.style={draw}] % all paths are drawn
    \fill (0,0) rectangle +(1,1);
    \shade (2,0) rectangle +(1,1);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [c/.style={insert path={circle[radius=2pt]}}]
    \draw (0,0) -- (1,1) [c] -- (3,2) [c];
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw node [append after command={(foo)--(1,1)},draw] (foo){foo};
]=]
show()
* (tikz-show)


#####
#
# tut-path-move-to
# 2022oct16
#
#####

# «tut-path-move-to»  (to ".tut-path-move-to")
# (find-tikzmanpage 150 "14.1    The Move-To Operation")
# (find-tikzmantext 150 "14.1    The Move-To Operation")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
-- (find-tikzmanpage 150 "14.1    The Move-To Operation")
-- (find-tikzmantext 150 "14.1    The Move-To Operation")

tikzbody = tikz [=[
  \draw (0,0) --(2,0) (0,1) --(2,1);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [line width=2mm]
  \draw (0,0) -- (1,0) -- (1,1)
     -- (0,1) -- (current subpath start);
]=]
show()
* (tikz-show)



#####
#
# tut-path-line-to
# 2022oct16
#
#####

# «tut-path-line-to»  (to ".tut-path-line-to")
# (find-tikzmanpage 151 "14.2     The Line-To Operation")
# (find-tikzmantext 151 "14.2     The Line-To Operation")
-- (find-tikzmanpage 151 "14.2     The Line-To Operation")
-- (find-tikzmantext 151 "14.2     The Line-To Operation")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")

-- (find-tikzmanpage 152 "14.2.2    Horizontal and Vertical Lines")
-- (find-tikzmantext 152 "14.2.2    Horizontal and Vertical Lines")
-- (find-tikzmanpage 152 "14.3     The Curve-To Operation")
-- (find-tikzmantext 152 "14.3     The Curve-To Operation")
-- (find-tikzmanpage 153 "14.4    The Rectangle Operation")
-- (find-tikzmantext 153 "14.4    The Rectangle Operation")
-- (find-tikzmanpage 153 "14.5    Rounding Corners")
-- (find-tikzmantext 153 "14.5    Rounding Corners")
-- (find-tikzmanpage 154 "14.6    The Circle and Ellipse Operations")
-- (find-tikzmantext 154 "14.6    The Circle and Ellipse Operations")
-- (find-tikzmanpage 155 "14.7     The Arc Operation")
-- (find-tikzmantext 155 "14.7     The Arc Operation")
-- (find-tikzmanpage 156 "14.8    The Grid Operation")
-- (find-tikzmantext 156 "14.8    The Grid Operation")
-- (find-tikzmanpage 158 "14.9    The Parabola Operation")
-- (find-tikzmantext 158 "14.9    The Parabola Operation")
-- (find-tikzmanpage 159 "14.10     The Sine and Cosine Operation")
-- (find-tikzmantext 159 "14.10     The Sine and Cosine Operation")
-- (find-tikzmanpage 160 "14.11     The SVG Operation")
-- (find-tikzmantext 160 "14.11     The SVG Operation")
-- (find-tikzmanpage 160 "14.12     The Plot Operation")
-- (find-tikzmantext 160 "14.12     The Plot Operation")
-- (find-tikzmanpage 160 "14.13     The To Path Operation")
-- (find-tikzmantext 160 "14.13     The To Path Operation")
-- (find-tikzmanpage 163 "14.14      The Foreach Operation")
-- (find-tikzmantext 163 "14.14      The Foreach Operation")
-- (find-tikzmanpage 164 "14.15     The Let Operation")
-- (find-tikzmantext 164 "14.15     The Let Operation")
-- (find-tikzmanpage 165 "14.16     The Scoping Operation")
-- (find-tikzmantext 165 "14.16     The Scoping Operation")
-- (find-tikzmanpage 165 "14.17     The Node and Edge Operations")
-- (find-tikzmantext 165 "14.17     The Node and Edge Operations")
-- (find-tikzmanpage 166 "14.18     The Graph Operation")
-- (find-tikzmantext 166 "14.18     The Graph Operation")
-- (find-tikzmanpage 166 "14.19     The Pic Operation")
-- (find-tikzmantext 166 "14.19     The Pic Operation")
-- (find-tikzmanpage 166 "14.20     The Attribute Animation Operation")
-- (find-tikzmantext 166 "14.20     The Attribute Animation Operation")
-- (find-tikzmanpage 166 "14.21     The PGF-Extra Operation")
-- (find-tikzmantext 166 "14.21     The PGF-Extra Operation")

-- (find-tikzmanpage 150 "14.1    The Move-To Operation")
-- (find-tikzmantext 150 "14.1    The Move-To Operation")
-- (find-tikzmanpage 151 "14.2     The Line-To Operation")
-- (find-tikzmantext 151 "14.2     The Line-To Operation")
-- (find-tikzmanpage 152 "14.2.2    Horizontal and Vertical Lines")
-- (find-tikzmantext 152 "14.2.2    Horizontal and Vertical Lines")
-- (find-tikzmanpage 152 "14.3     The Curve-To Operation")
-- (find-tikzmantext 152 "14.3     The Curve-To Operation")
-- (find-tikzmanpage 153 "14.4    The Rectangle Operation")
-- (find-tikzmantext 153 "14.4    The Rectangle Operation")
-- (find-tikzmanpage 153 "14.5    Rounding Corners")
-- (find-tikzmantext 153 "14.5    Rounding Corners")
-- (find-tikzmanpage 154 "14.6    The Circle and Ellipse Operations")
-- (find-tikzmantext 154 "14.6    The Circle and Ellipse Operations")




#####
#
# The chapter "17. Nodes and Edges" in the manual
# 2022oct16
#
#####

# «tut-nodes»  (to ".tut-nodes")
# (tiks "Introduction to Nodes")
# (tiks "Nodes and Edges")
# (find-tikzmanpage 50 "3.3     Introduction to Nodes")
# (find-tikzmantext 50 "3.3     Introduction to Nodes")
# (find-tikzmanpage 218 "17       Nodes and Edges")
# (find-tikzmantext 218 "17       Nodes and Edges")
# (find-tikzmanfile "pgfmanual-en-tutorial-nodes.tex" "Introduction to Nodes")
# (find-tikzmanfile "pgfmanual-en-tikz-shapes.tex" "Nodes and Edges")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
-- (find-tikzmanpage 218 "17       Nodes and Edges")
-- (find-tikzmantext 218 "17       Nodes and Edges")
-- (find-tikzmanpage 218 "17.1     Overview")
-- (find-tikzmantext 218 "17.1     Overview")
-- (find-tikzmanpage 218 "17.2     Nodes and Their Shapes")
-- (find-tikzmantext 218 "17.2     Nodes and Their Shapes")

tikzbody = tikz [=[
  \fill [fill=yellow!80!black]
     (0,0) node              {first node}
  -- (1,1) node[behind path] {second node}
  -- (2,0) node              {third node};
]=]
show()
* (tikz-show)

-- (tiks "Syntax of the Node Command")
-- (find-tikzmanpage 218 "17.2.1    Syntax of the Node Command")
-- (find-tikzmantext 218 "17.2.1    Syntax of the Node Command")
-- (find-tikzmanfile "pgfmanual-en-tikz-shapes.tex" "Syntax of the Node Command")
tikzbody = tikz [=[
  \path (0,0)   node   [red]                    {A}
        (1,0)   node   [blue]                   {B}
        (2,0)   node   [green, node contents=C]
        (3,0)   node   [node contents=D]           ;
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \fill [fill=blue!50, draw=blue, very thick]
       (0,0)   node [behind path, fill=red!50]   {first node}
    -- (1.5,0) node [behind path, fill=green!50] {second node}
    -- (1.5,1) node [behind path, fill=brown!50] {third node}
    -- (0,1)   node [             fill=blue!30]  {fourth node};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \fill[fill=yellow!80!black]
      (0,0) node {first node}
   -- (1,1) node[draw, behind path] {second node}
   -- (0,2) node[fill=red!20,draw,double,rounded corners] {third node};
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 220 "shapes.geometric")
-- (find-tikzmantext 220 "shapes.geometric")
usepackages = [=[
  \usetikzlibrary{shapes.geometric}
]=]
tikzbody = tikz [=[
  \fill[fill=yellow!80!black]
     (0,0) node                            {first node}
  -- (1,1) node[ellipse,draw, behind path] {second node}
  -- (0,2) node[circle,fill=red!20]        {third node};
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 221 ":rotate")
-- (find-tikzmantext 221 ":rotate")
tikzbody = tikz [=[
  \node :fill opacity = { 0s="1", 2s="0",  begin on=click }
        :rotate       = { 0s="0", 2s="90", begin on=click }
          [fill = blue!20, draw = blue, ultra thick, circle]
   {Click me!};
]=]
-- show()
-- * (tikz-show)

tikzbody = tikz [=[
  \draw (0,0) node foreach \x in {1,2,3} at (\x,0) {\x};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw (0,0) node at (1,0) {1} node at (2,0) {2} node at (3,0) {3};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \node foreach \x in {1,...,4} foreach \y in {1,2,3}
    [draw] at (\x,\y) {\x,\y};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [every node/.style={draw}]
  \draw (0,0) node {A} -- (1,1) node {B};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [every rectangle node/.style={draw},
   every circle node/.style={draw,double}]
  \draw (0,0) node[rectangle] {A} -- (1,1) node[circle] {B};
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 222 "/tikz/execute at begin")
-- (find-tikzmantext 222 "/tikz/execute at begin")
tikzbody = tikz [=[
  [execute at begin node={A},
   execute at end node={D}]
  \node[execute at begin node={B}] {C};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \begin{scope}[name prefix = top-]
    \node (A) at (0,1) {A};
    \node (B) at (1,1) {B};
    \draw (A) -- (B);
  \end{scope}
  \begin{scope}[name prefix = bottom-]
    \node (A) at (0,0) {A};
    \node (B) at (1,0) {B};
    \draw (A) -- (B);
  \end{scope}
  \draw [red] (top-A) -- (bottom-B);
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 223 "17.2.2   Predefined Shapes")
-- (find-tikzmantext 223 "17.2.2   Predefined Shapes")
-- (find-tikzmanpage 223   "The coordinate shape")
-- (find-tikzmantext 223   "The coordinate shape")

tikzbody = tikz [=[
  [every node/.style={draw}]
  \path[yshift=1.5cm,shape=rectangle]
    (0,0) node(a1){} (1,0) node(a2){}
    (1,1) node(a3){} (0,1) node(a4){};
  \filldraw[fill=yellow!80!black] (a1) -- (a2) -- (a3) -- (a4);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \path[shape=coordinate]
    (0,0) coordinate(b1) (1,0) coordinate(b2)
    (1,1) coordinate(b3) (0,1) coordinate(b4);
  \filldraw[fill=yellow!80!black] (b1) -- (b2) -- (b3) -- (b4);
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 223 "17.2.3   Common Options:")
-- (find-tikzmantext 223 "17.2.3   Common Options:")
tikzbody = tikz [=[
  \draw (0,0)     node[inner sep=0pt,draw] {tight}
        (0cm,2em) node[inner sep=5pt,draw] {loose}
        (0cm,4em) node[fill=yellow!80!black]   {default};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw[line width=5pt]
    (0,0) node[fill=yellow!80!black] (f) {filled}
    (2,0) node[draw]                 (d) {drawn}
    (1,-2) node[draw,scale=2]        (s) {scaled};
  \draw[->] (1,-1) -- (f);
  \draw[->] (1,-1) -- (d);
  \draw[->] (1,-1) -- (s);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [outer sep=auto]
  \draw[line width=5pt]
    (0,0) node[fill=yellow!80!black] (f) {filled}
    (2,0) node[draw]                 (d) {drawn}
    (1,-2) node[draw,scale=2]        (s) {scaled};
  \draw[->] (1,-1) -- (f);
  \draw[->] (1,-1) -- (d);
  \draw[->] (1,-1) -- (s);
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw (0,0) node[minimum height=1cm,draw] {1cm}
        (2,0) node[minimum height=0cm,draw] {0cm};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw (0,0) node[minimum height=2cm,minimum width=3cm,draw] {$3 \times 2$};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw (0,0) node[minimum size=2cm,draw] {square};
  \draw (0,-2) node[minimum size=2cm,draw,circle] {circle};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw (0,0) node[shape aspect=1,diamond,draw] {aspect 1};
  \draw (0,-2) node[shape aspect=2,diamond,draw] {aspect 2};
]=]
show()
* (tikz-show)



--   \tikzset{every node/.style={dart, shape border uses incircle,
--     inner sep=1pt, draw}}
--   \tikz \node foreach \a/\b/\c in {A/0/0, B/45/0, C/0/45, D/45/45}
--               [shape border rotate=\b, rotate=\c] at (\b/36,-\c/36) {\a};
-- 
--   \tikzset{every node/.style={isosceles triangle, draw}}
--   \begin{tikzpicture}
--     \node {abc};
--     \node [shape border uses incircle] at (2,0) {abc};
--   \end{tikzpicture}
-- 
--   \tikzset{every node/.style={shape=trapezium, draw, shape border uses incircle}}
--   \begin{tikzpicture}
--     \node at (0,0) (A) {A};
--     \node [shape border rotate=30] at (1.5,0) (B) {B};
--     \foreach \s/\t in
--       {left side/base east, bottom side/north, bottom left corner/base}{
--          \fill[red] (A.\s) circle(1.5pt) (B.\s) circle(1.5pt);
--          \fill[blue] (A.\t) circle(1.5pt) (B.\t) circle(1.5pt);
--     }
--   \end{tikzpicture}


-- (find-tikzmanpage 226 "17.3    Multi-Part Nodes")
-- (find-tikzmantext 226 "17.3    Multi-Part Nodes")
-- circle split?

-- tikzbody = tikz [=[
--   \node [circle split,draw,double,fill=red!20]
--   {
--     % No \nodepart has been used, yet. So, the following is put in the
--     % ``text'' node part by default.
--     $q_1$
--     \nodepart{lower} % Ok, end ``text'' part, start ``output'' part
--     $00$
--   }; % output part ended.
-- ]=]
-- show()
-- = Show.log
-- * (tikz-show)
-- 
-- tikzbody = tikz [=[
--   [every lower node part/.style={red}]
--   \node [circle split,draw] {$q_1$ \nodepart{lower} $00$};
-- ]=]
-- show()
-- * (tikz-show)







#####
#
# tut-nodes-text
# 2022oct16
#
#####

# «tut-nodes-text»  (to ".tut-nodes-text")
# (find-tikzmanpage 227 "17.4     The Node Text")
# (find-tikzmantext 227 "17.4     The Node Text")
# (find-tikzmanpage 227 "17.4.1    Text Parameters: Color and Opacity")
# (find-tikzmantext 227 "17.4.1    Text Parameters: Color and Opacity")
# (find-tikzmanpage 227 "17.4.2    Text Parameters: Font")
# (find-tikzmantext 227 "17.4.2    Text Parameters: Font")
# (find-tikzmanpage 228 "17.4.3   Text Parameters: Alignment and Width for Multi-Line Text")
# (find-tikzmantext 228 "17.4.3   Text Parameters: Alignment and Width for Multi-Line Text")
# (find-tikzmanpage 232 "17.4.4   Text Parameters: Height and Depth of Text")
# (find-tikzmantext 232 "17.4.4   Text Parameters: Height and Depth of Text")



#####
#
# tut-nodes-positioning
# 2022oct16
#
#####

# «tut-nodes-positioning»  (to ".tut-nodes-positioning")
# (find-tikzmanpage 232 "17.5     Positioning Nodes")
# (find-tikzmantext 232 "17.5     Positioning Nodes")
# (find-tikzmanpage 232 "17.5.1   Positioning Nodes Using Anchors")
# (find-tikzmantext 232 "17.5.1   Positioning Nodes Using Anchors")
# (find-tikzmanpage 233 "17.5.2   Basic Placement Options")
# (find-tikzmantext 233 "17.5.2   Basic Placement Options")
# (find-tikzmanpage 234 "17.5.3   Advanced Placement Options")
# (find-tikzmantext 234 "17.5.3   Advanced Placement Options")
# (find-tikzmanpage 238 "17.5.4       Advanced Arrangements of Nodes")
# (find-tikzmantext 238 "17.5.4       Advanced Arrangements of Nodes")

# (find-tikzmanpage 239 "17.6    Fitting Nodes to a Set of Coordinates")
# (find-tikzmantext 239 "17.6    Fitting Nodes to a Set of Coordinates")
# (find-tikzmanpage 239 "17.7    Transformations")
# (find-tikzmantext 239 "17.7    Transformations")
# (find-tikzmanpage 240 "17.8       Placing Nodes on a Line or Curve Explicitly")
# (find-tikzmantext 240 "17.8       Placing Nodes on a Line or Curve Explicitly")
# (find-tikzmanpage 244 "17.9      Placing Nodes on a Line or Curve Implicitly")
# (find-tikzmantext 244 "17.9      Placing Nodes on a Line or Curve Implicitly")
# (find-tikzmanpage 244 "17.10      The Label and Pin Options")
# (find-tikzmantext 244 "17.10      The Label and Pin Options")
# (find-tikzmanpage 244 "17.10.1    Overview")
# (find-tikzmantext 244 "17.10.1    Overview")
# (find-tikzmanpage 245 "17.10.2    The Label Option")
# (find-tikzmantext 245 "17.10.2    The Label Option")
# (find-tikzmanpage 247 "17.10.3    The Pin Option")
# (find-tikzmantext 247 "17.10.3    The Pin Option")
# (find-tikzmanpage 248 "17.10.4    The Quotes Syntax")
# (find-tikzmantext 248 "17.10.4    The Quotes Syntax")
# (find-tikzmanpage 251 "17.11     Connecting Nodes: Using Nodes as Coordinates")
# (find-tikzmantext 251 "17.11     Connecting Nodes: Using Nodes as Coordinates")
# (find-tikzmanpage 251 "17.12     Connecting Nodes: Using the Edge Operation")
# (find-tikzmantext 251 "17.12     Connecting Nodes: Using the Edge Operation")
# (find-tikzmanpage 251 "17.12.1    Basic Syntax of the Edge Operation")
# (find-tikzmantext 251 "17.12.1    Basic Syntax of the Edge Operation")
# (find-tikzmanpage 253 "17.12.2      Nodes on Edges: Quotes Syntax")
# (find-tikzmantext 253 "17.12.2      Nodes on Edges: Quotes Syntax")
# (find-tikzmanpage 254 "17.13        Referencing Nodes Outside the Current Picture")
# (find-tikzmantext 254 "17.13        Referencing Nodes Outside the Current Picture")
# (find-tikzmanpage 254 "17.13.1      Referencing a Node in a Different Picture")
# (find-tikzmantext 254 "17.13.1      Referencing a Node in a Different Picture")
# (find-tikzmanpage 255 "17.13.2    Referencing the Current Page Node \255 Absolute Positioning")
# (find-tikzmantext 255 "17.13.2    Referencing the Current Page Node \255 Absolute Positioning")
# (find-tikzmanpage 255 "17.14     Late Code and Late Options")
# (find-tikzmantext 255 "17.14     Late Code and Late Options")




#####
#
# tut-pics
# 2022oct17
#
#####

# «tut-pics»  (to ".tut-pics")
# (find-tikzmanpage 257 "18     Pics: Small Pictures on Paths")
# (find-tikzmantext 257 "18     Pics: Small Pictures on Paths")
# (find-tikzmanpage 257 "18.1     Overview")
# (find-tikzmantext 257 "18.1     Overview")
# (find-tikzmanpage 257 "18.2     The Pic Syntax")
# (find-tikzmantext 257 "18.2     The Pic Syntax")
# (find-tikzmanpage 261 "18.2.1     The Quotes Syntax")
# (find-tikzmantext 261 "18.2.1     The Quotes Syntax")
# (find-tikzmanpage 262 "18.3     Defining New Pic Types")
# (find-tikzmantext 262 "18.3     Defining New Pic Types")


* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
-- (find-tikzmanpage 257 "18.1     Overview")
-- (find-tikzmantext 257 "18.1     Overview")
-- (find-tikzmantext 257 "18.1     Overview" "seagull/.pic=")
defs = [=[
  \tikzset{
    seagull/.pic={
      % Code for a "seagull". Do you see it?...
      \draw (-3mm,0) to [bend left] (0,0) to [bend left] (3mm,0);
    }
  }
]=]
tikzbody = tikz [=[
  \fill [fill=blue!20]
       (1,1)
    -- (2,2) pic                {seagull}
    -- (3,2) pic                {seagull}
    -- (3,1) pic [rotate=30]    {seagull}
    -- (2,1) pic [red]          {seagull};
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 257 "18.2     The Pic Syntax")
-- (find-tikzmantext 257 "18.2     The Pic Syntax")
-- (find-tikzmantext 257 "18.2     The Pic Syntax" "/tikz/pic type=")
--
tikzbody = tikz [=[
  \path (0,0) pic [pic type = seagull]
        (1,0) pic                      {seagull};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  % different ways of placing pics
  \draw   [help lines] (0,0) grid (3,2);
  \pic    at (1,0)     {seagull};
  \path   (2,1)    pic {seagull};
  \pic    [at={(3,2)}] {seagull};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [scale=2]
  \pic at (0,0)                   {seagull};
  \pic at (1,0) [transform shape] {seagull};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [rotate=30]
  \pic at (0,0)             {seagull};
  \pic at (1,0) [rotate=90] {seagull};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw
  (0,0) to [bend left]
           pic [near start]       {seagull}
           pic                    {seagull}
           pic [sloped, near end] {seagull} (4,0);
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 259 "/tikz/pics/code=")
-- (find-tikzmantext 259 "/tikz/pics/code=")

tikzbody = tikz [=[
  \pic [pics/code={\draw (-3mm,0) to[bend left] (0,0)
                                  to[bend left] (3mm,0);}]
    {}; % no pic type specified
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  \draw (0,0) .. controls(1,0) and (2,1) .. (3,1)
  foreach \t in {0, 0.1, ..., 1} {
    pic [pos=\t] {code={\draw circle [radius=2pt];}}
  };
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 259 "/tikz/pic actions")
-- (find-tikzmantext 259 "/tikz/pic actions")
-- defs = [=[
--   \tikzset{
--     my pic/.pic = {
--       \path [pic actions] (0,0) circle[radius=3mm];
--       \draw (-3mm,-3mm) rectangle (3mm,3mm);
--     }
--   }
-- ]=]

-- \tikz   \pic                          {my   pic};   \space
-- \tikz   \pic   [red]                  {my   pic};   \space
-- \tikz   \pic   [draw]                 {my   pic};   \space
-- \tikz   \pic   [draw=red]             {my   pic};   \space
-- \tikz   \pic   [draw, shading=ball]   {my   pic};   \space
-- \tikz   \pic   [fill=red!50]          {my   pic};

tikzbody = tikz [=[
  \fill [fill=blue!20]
       (1,1)
    -- (2,2) pic [behind path]        {seagull}
    -- (3,2) pic                      {seagull}
    -- (3,1) pic [rotate=30]          {seagull}
    -- (2,1) pic [red, behind path]   {seagull};
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 260 "The foreach statement for pics")
-- (find-tikzmantext 260 "The foreach statement for pics")
tikzbody = tikz [=[
  \pic foreach \x in {1,2,3} at (\x,0) {seagull};
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 260 "/tikz/every pic")
-- (find-tikzmantext 260 "/tikz/every pic")
tikzbody = tikz [=[
  [every node/.style={draw}]
  \draw (0,0) node {A} -- (1,1) node {B};
]=]
show()
* (tikz-show)

-- (find-tikzmanpage 260 "Name scopes")
-- (find-tikzmantext 260 "Name scopes")
defs = [=[
  \tikzset{
    seagull/.pic={
      % Code for a "seagull". Do you see it?...
      \coordinate (-left wing) at (-3mm,0);
      \coordinate (-head)      at (0,0);
      \coordinate (-right wing) at (3mm,0);
      \draw (-left wing) to [bend left] (0,0) (-head) to [bend left] (-right wing);
      }
  }
]=]
tikzbody = tikz [=[
  \pic (Emma)               {seagull};
  \pic (Alexandra) at (0,1) {seagull};
  \draw (Emma-left wing) -- (Alexandra-right wing);
]=]
show()
* (tikz-show)

usepackages = [=[
  \usetikzlibrary{animations}
]=]
tikzbody = tikz [=[
  \pic :rotate={0s="0", 20s="90"} {seagull};
  \pic at (1.5,1.5)               {seagull};
]=]
show()
* (tikz-show)

tikzbody = tikz [=[
  [flapping seagull/.pic={
      \draw (0,0) :path={
        0s= {"{(180:3mm) to [bend left] (0,0) to [bend left] (0:3mm)}"=base},
        1s= "{(160:3mm) to [bend left] (0,0) to [bend left] (20:3mm)}",
        2s= "{(180:3mm) to [bend left] (0,0) to [bend left] (0:3mm)}",
        repeats };
    }]
    \pic :rotate={0s="0", 20s="90"} {flapping seagull};
    \pic at (1.5,1.5)               {flapping seagull};
]=]
show()
* (tikz-show)




#####
#
# tut-child
# 2022oct20
#
#####

# «tut-child»  (to ".tut-child")
-- (find-tikzmanpage 325 "21     Making Trees Grow")
-- (find-tikzmantext 325 "21     Making Trees Grow")
-- (find-tikzmanpage 325 "21.1     Introduction to the Child Operation")
-- (find-tikzmantext 325 "21.1     Introduction to the Child Operation")
-- (find-tikzmanpage 326 "21.2     Child Paths and Child Nodes")
-- (find-tikzmantext 326 "21.2     Child Paths and Child Nodes")
-- (find-tikzmanpage 326 "21.3     Naming Child Nodes")
-- (find-tikzmantext 326 "21.3     Naming Child Nodes")
-- (find-tikzmanpage 327 "21.4    Specifying Options for Trees and Children")
-- (find-tikzmantext 327 "21.4    Specifying Options for Trees and Children")
-- (find-tikzmanpage 328 "21.5     Placing Child Nodes")
-- (find-tikzmantext 328 "21.5     Placing Child Nodes")
-- (find-tikzmanpage 328 "21.5.1    Basic Idea")
-- (find-tikzmantext 328 "21.5.1    Basic Idea")
-- (find-tikzmanpage 329 "21.5.2   Default Growth Function")
-- (find-tikzmantext 329 "21.5.2   Default Growth Function")
-- (find-tikzmanpage 331 "21.5.3    Missing Children")
-- (find-tikzmantext 331 "21.5.3    Missing Children")
-- (find-tikzmanpage 332 "21.5.4     Custom Growth Functions")
-- (find-tikzmantext 332 "21.5.4     Custom Growth Functions")
-- (find-tikzmanpage 332 "21.6      Edges From the Parent Node")
-- (find-tikzmantext 332 "21.6      Edges From the Parent Node")

-- (find-tikzmanpage 331 "node[coordinate,midway] {}")
-- (find-tikzmantext 331 "node[coordinate,midway] {}")
-- (find-tikzmanfile "pgfmanual-en-tikz-trees.tex")
-- (find-tikzmanfile "pgfmanual-en-tikz-trees.tex" "Making Trees Grow")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-anchor "~/LUA/tikz1.lua")
tikzbody = tikz [=[
  \node {A}
    child {node {AA}}
    child {node {AB}
      child {node {ABA}}
      child {node {ABB}}
    };
]=]
show()
* (tikz-show)


\node {A} child {node {AA}} child {node {AB} child {node {ABA}} child {node {ABB}}};
                 ---------                          ----------         ----------
                 node "AA"                          node "ABA"         node "ABB"
          -----------------                  ------------------ ------------------
          child (node "AA")                  child (node "ABA") child (node "ABB")
                                   -----------------------------------------------
                                   node("AB", child (node"ABA"), child (node"ABB"))
                            --------------------------------------------------------
                            child (node("AB", child (node"ABA"), child (node"ABB")))
 -----------------------------------------------------------------------------------
 node("A", child (node"AA"), child (node("AB", child (node"ABA"), child (node"ABB"))))




#####
#
# tut-child-elpeg
# 2023apr25
#
#####

# «tut-child-elpeg»  (to ".tut-child-elpeg")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
loadelpeg1()   -- (find-angg "LUA/ELpeg1.lua")
               -- (find-angg "LUA/Show2.lua")
               -- (find-es "tikz" "tut-child")
gr,V,VA,VE,PE = Gram.new()
_ = S(" ")^0
usepackages = "\\usepackage{tikz}"

node  = function (...) return mkast("node",  ...) end
child = function (...) return mkast("child", ...) end
topnode = function (...) return mkast("topnode", ...) end

ttn = function (nodename, ...)
    return node(nodename, unpack(map(ttc, {...})))
  end
ttc = function (o)
    if type(o) == "string" then return child(node(o)) end
    return child(o)
  end

children = function (o)
    local f = function (n) return totex(o[n]) end
    return mapconcat(f, seq(2,#o))
  end

fmts        = VTable {}
totex00     = ToTeX0 {fmts=fmts}
fmts["node"]  = "node {<1>}<':'>"
fmts["node"]  = "node {<1>}<children(o)>"
fmts["child"] = " child {<1>}"
fmts["topnode"] = "\\begin{tikzpicture}\n\\<1>;\n\\end{tikzpicture}"

= node "ABA"
= node("AB", child (node"ABA"), child (node"ABB"))
o = node("A", child (node"AA"), child (node("AB", child (node"ABA"), child (node"ABB"))))
= o
oo = topnode(o)
= oo

= node("AB", child (node"ABA"), child (node"ABB"))
= node("AB", child (node"ABA"), child (node"ABB")):totex()
= o[2]
= o[2]:totex()
= o:totex()
= oo:totex()
= oo:totex():show0()
= ("Hello"):show()
= Show.log
= Show.bigstr
* (etv)

= ttn("AB", ttn"ABA")
= ttn("AB", ttn"ABA", ttn"ABB")
= ttn("A", ttn"AA", ttn("AB", ttn"ABA", ttn"ABB"))
= ttn("A", ttn"AA", ttn("AB", ttn"ABA", ttn"ABB")):totex()
= ttn("A", ttn"AA", ttn("AB", ttn"ABA",    "ABB")):totex()
= ttn("A",    "AA", ttn("AB",    "ABA",    "ABB")):totex()
= topnode(ttn("A",    "AA", ttn("AB",    "ABA",    "ABB"))):totex()
= topnode(ttn("A",    "AA", ttn("AB",    "ABA",    "ABB"))):totex():show0()
= topnode(ttn("A",    "AA", ttn("AB",    "ABA",    "ABC"))):totex():show0()

* (etv)





#####
#
# tut-3D
# 2022oct15
#
#####

# «tut-3D»  (to ".tut-3D")
# (find-tikzmanpage 557 "40     Three Dimensional Drawing Library")
# (find-tikzmantext 557 "40     Three Dimensional Drawing Library")
# (find-tikzmanpage 559 "40.3    Examples")
# (find-tikzmantext 559 "40.3    Examples")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
usepackages = [=[
  \usetikzlibrary{3d}
]=]
tikzbody = tikz [=[
  [->]
  \draw (0,0,0) -- (xyz cylindrical cs:radius=1);
  \draw (0,0,0) -- (xyz cylindrical cs:radius=1,angle=90);
  \draw (0,0,0) -- (xyz cylindrical cs:z=1);
]=]
show()
= Show.log
* (tikz-show)



#####
#
# magnetic-field
# 2022nov10
#
#####

# «magnetic-field»  (to ".magnetic-field")
# (tiks "{magnetic field}")
# (find-tikzmanpage 557 "40     Three Dimensional Drawing Library")
# (find-tikzmantext 557 "40     Three Dimensional Drawing Library")
# (find-tikzmanpage 559 "40.3    Examples")
# (find-tikzmantext 559 "40.3    Examples")
# (find-tikzmanpage 559 "{magnetic field}")
# (find-tikzmantext 559 "{magnetic field}")
# (find-tikzmanfile "pgfmanual-en-library-3d.tex" "{magnetic field}")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
usepackages = [=[
  \usetikzlibrary{3d}
]=]
tikzbody = tikz [=[
  [z={(10:10mm)},x={(-45:5mm)}]
  \def\wave{
    \draw[fill,thick,fill opacity=.2]
     (0,0) sin (1,1) cos (2,0) sin (3,-1) cos (4,0)
           sin (5,1) cos (6,0) sin (7,-1) cos (8,0)
           sin (9,1) cos (10,0)sin (11,-1)cos (12,0);
    \foreach \shift in {0,4,8}
    {
      \begin{scope}[xshift=\shift cm,thin]
        \draw (.5,0) -- (0.5,0 |- 45:1cm);
        \draw (1,0)   -- (1,1);
        \draw (1.5,0) -- (1.5,0 |- 45:1cm);
        \draw (2.5,0) -- (2.5,0 |- -45:1cm);
        \draw (3,0)   -- (3,-1);
        \draw (3.5,0) -- (3.5,0 |- -45:1cm);
      \end{scope}
    }
  }
  \begin{scope}[canvas is zy plane at x=0,fill=blue]
    \wave
    \node at (6,-1.5) [transform shape] {magnetic field};
  \end{scope}
  \begin{scope}[canvas is zx plane at y=0,fill=red]
    \draw[help lines] (0,-2) grid (12,2);
    \wave
    \node at (6,1.5) [rotate=180,xscale=-1,transform shape] {electric field};
  \end{scope}
]=]
show()
* (tikz-show)



#####
#
# keys
# 2022oct22
#
#####

# «keys»  (to ".keys")
# (to "styles")
-- (find-tikzmanfile "pgfmanual-en-pgfkeys.tex")
-- (find-tikzmanpage 946 "86       Key Management")
-- (find-tikzmantext 946 "86       Key Management")
-- (find-tikzmanpage 946 "86.1     Introduction")
-- (find-tikzmantext 946 "86.1     Introduction")
-- (find-tikzmanpage 946 "86.1.1   Comparison to Other Packages")
-- (find-tikzmantext 946 "86.1.1   Comparison to Other Packages")
-- (find-tikzmanpage 946 "86.1.2   Quick Guide to Using the Key Mechanism")
-- (find-tikzmantext 946 "86.1.2   Quick Guide to Using the Key Mechanism")
-- (find-tikzmanpage 947   "/my style/.style=")
-- (find-tikzmantext 947   "/my style/.style=")


* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
defs = [=[
  \pgfkeys{/a/.code=(a:#1)}
  \pgfkeys{/b/.code=(b:#1)}
  \pgfkeys{/my style/.style={/a=foo,/b=bar,/a=#1}}
  \pgfkeys{/my style=wow}
  %
  \nonstopmode
  \pgfkeys{/my style/.show value}
  \pgfkeys{/my style/.show code}
  \pgfkeys{/tikz/rounded corners/.show value}
  \pgfkeys{/tikz/rounded corners/.show code}
]=]
show()
= Show.log
* (tikz-show)


-- (find-tikzmanpage 947 "86.2     The Key Tree")
-- (find-tikzmantext 947 "86.2     The Key Tree")
-- (find-tikzmanpage 949 "86.3     Setting Keys")
-- (find-tikzmantext 949 "86.3     Setting Keys")
-- (find-tikzmanpage 949 "86.3.1   First Char Syntax Detection")
-- (find-tikzmantext 949 "86.3.1   First Char Syntax Detection")
-- (find-tikzmanpage 951 "86.3.2   Default Arguments")
-- (find-tikzmantext 951 "86.3.2   Default Arguments")
-- (find-tikzmanpage 952 "86.3.3   Keys That Execute Commands")
-- (find-tikzmantext 952 "86.3.3   Keys That Execute Commands")
-- (find-tikzmanpage 953 "86.3.4     Keys That Store Values")
-- (find-tikzmantext 953 "86.3.4     Keys That Store Values")
-- (find-tikzmanpage 953 "86.3.5     Keys That Are Handled")
-- (find-tikzmantext 953 "86.3.5     Keys That Are Handled")
-- (find-tikzmanpage 955 "86.3.6   Keys That Are Unknown")
-- (find-tikzmantext 955 "86.3.6   Keys That Are Unknown")
-- (find-tikzmanpage 955 "86.3.7   Search Paths And Handled Keys")
-- (find-tikzmantext 955 "86.3.7   Search Paths And Handled Keys")
-- (find-tikzmanpage 956 "86.4     Key Handlers")
-- (find-tikzmantext 956 "86.4     Key Handlers")
-- (find-tikzmanpage 956 "86.4.1   Handlers for Path Management")
-- (find-tikzmantext 956 "86.4.1   Handlers for Path Management")
-- (find-tikzmanpage 956 "86.4.2   Setting Defaults")
-- (find-tikzmantext 956 "86.4.2   Setting Defaults")
-- (find-tikzmanpage 957 "86.4.3   Defining Key Codes")
-- (find-tikzmantext 957 "86.4.3   Defining Key Codes")
-- (find-tikzmanpage 958 "86.4.4   Defining Styles")
-- (find-tikzmantext 958 "86.4.4   Defining Styles")
-- (find-tikzmanpage 959 "86.4.5   Defining Value-, Macro-, If- and Choice-Keys")
-- (find-tikzmantext 959 "86.4.5   Defining Value-, Macro-, If- and Choice-Keys")
-- (find-tikzmanpage 961 "86.4.6   Expanded and Multiple Values")
-- (find-tikzmantext 961 "86.4.6   Expanded and Multiple Values")
-- (find-tikzmanpage 962 "86.4.7   Handlers for Forwarding")
-- (find-tikzmantext 962 "86.4.7   Handlers for Forwarding")
-- (find-tikzmanpage 964 "86.4.8   Handlers for Testing Keys")
-- (find-tikzmantext 964 "86.4.8   Handlers for Testing Keys")
-- (find-tikzmanpage 964 "86.4.9   Handlers for Key Inspection")
-- (find-tikzmantext 964 "86.4.9   Handlers for Key Inspection")
-- (find-tikzmanpage 964 "86.5     Error Keys")
-- (find-tikzmantext 964 "86.5     Error Keys")
-- (find-tikzmanpage 965 "86.6     Key Filtering")
-- (find-tikzmantext 965 "86.6     Key Filtering")
-- (find-tikzmanpage 965 "86.6.1    Starting With An Example")
-- (find-tikzmantext 965 "86.6.1    Starting With An Example")
-- (find-tikzmanpage 966 "86.6.2    Setting Filters")
-- (find-tikzmantext 966 "86.6.2    Setting Filters")
-- (find-tikzmanpage 967 "86.6.3    Handlers For Unprocessed Keys")
-- (find-tikzmantext 967 "86.6.3    Handlers For Unprocessed Keys")
-- (find-tikzmanpage 967 "86.6.4    Family Support")
-- (find-tikzmantext 967 "86.6.4    Family Support")
-- (find-tikzmanpage 969 "86.6.5     Other Key Filters")
-- (find-tikzmantext 969 "86.6.5     Other Key Filters")
-- (find-tikzmanpage 970 "86.6.6   Programmer Interface")
-- (find-tikzmantext 970 "86.6.6   Programmer Interface")
-- (find-tikzmanpage 971 "86.6.7   Defining Own Filters Or Filter Handlers")
-- (find-tikzmantext 971 "86.6.7   Defining Own Filters Or Filter Handlers")




#####
#
# tikzset
# 2022oct23
#
#####

# «tikzset»     (to ".tikzset")
# «tikzoption»  (to ".tikzoption")
# (find-tikzgitgrep "grep --color=auto -nRH --null -e tikzoption *")
# (find-tikzgitgrep "grep --color=auto -nRH --null -e tikzset *")
# (find-tikzgitgrep "grep --color=auto -nRH --null -e pgfqkeys *")
# (find-tikzgittgpfile "frontendlayer/tikz/tikz.code.tex" "\\def\\tikzset")
# (find-tikzgittgpfile "frontendlayer/tikz/tikz.code.tex" "\\def\\tikzoption")
# (find-tikzmanfile "pgfmanual-en-pgfkeys.tex" "\\pgfqkeys")
# (find-tikzgitfile "tex/latex/pgf/utilities/tikzexternal.sty" "\\def\\tikzset#1")




#####
#
# /.show value and /.show code
# 2022oct23
#
#####

# «pgfkeysgetvalue»  (to ".pgfkeysgetvalue")
# «show-value»  (to ".show-value")
# «show-code»   (to ".show-code")
# (tiks     "pgfkeysgetvalue")
# (tiks "def.pgfkeysgetvalue")
# (tiks     "pgfkeyasetkey")
# (tiks "def.pgfkeyasetkey")
# (tiks "def.pgfkeys{")
# (tiks "pgfkeysgetvalueof")
# (tiks "pgfkeysvalueof")
# (find-tikzmanpage 964 "86.4.9   Handlers for Key Inspection")
# (find-tikzmantext 964 "86.4.9   Handlers for Key Inspection")
# (find-tikzgittgpgrep "grep --color=auto -nRH --null -e '\\.show' *")
# (find-tikzgitgrep    "grep --color=auto -nRH --null -e keysshower *")
# (find-tikzgitgrep    "grep --color=auto -nRH --null -e '.show value' *")
# (find-tikzgitgrep    "grep --color=auto -nRH --null -e shower *")
# (find-tikzgitgrep    "grep --color=auto -nRH --null -e pgfkeysvalueof *")
# (find-tikzgitgrep    "grep --color=auto -nRH --null -e pgfkeysgetvalue *")
# (find-tikzgitgrep    "grep --color=auto -nRH --null -e pgfkeyscurrentpath *")
# (find-tikzmanfile "pgfmanual-en-pgfkeys.tex" "{{.show value}}")
# (find-tikzmanfile "pgfmanual-en-pgfkeys.tex" "{{.show code}}")
# (find-tikzmanfile "pgfmanual-en-pgfkeys.tex" "\\pgfkeysgetvalue")
# (find-tikzmanfile "pgfmanual-en-pgfkeys.tex" "\\pgfkeysgetvalue\\marg{full key}\\marg{macro}")
# (find-tikzmanfile "pgfmanual-en-pgfkeys.tex" "\\pgfkeysvalueof\\marg{full key}")
# (find-tikzmanfile "pgfmanual-en-pgfkeys.tex" "\\pgfkeyscurrentpath")
# (find-tikzmanfile "pgfmanual-en-pgfkeys.tex" "\\pgfkeyscurrentname")
# (find-tikzgittgpfile "utilities/pgfkeys.code.tex" "/handlers/.show value/.code=")
# (find-tikzgittgpfile "utilities/pgfkeys.code.tex" "/handlers/.show code/.code=")
# (find-tikzgittgpfile "utilities/pgfkeys.code.tex" "\\def\\pgfkeysvalueof#1")

% From:
% (find-tikzgittgpfile "utilities/pgfkeys.code.tex" "/handlers/.show value/.code=")
\pgfkeys{/handlers/.show value/.code=%
  \pgfkeysgetvalue{\pgfkeyscurrentpath}{\pgfkeysshower}%
  \show\pgfkeysshower} % inspect the value

% From:
% (find-tikzgittgpfile "utilities/pgfkeys.code.tex" "/handlers/.show code/.code=")
\pgfkeys{/handlers/.show code/.code=%
  \pgfkeysgetvalue{\pgfkeyscurrentpath/.@cmd}{\pgfkeysshower}%
  \show\pgfkeysshower} % inspect the body of the command

% From:
% (find-tikzgittgpfile "utilities/pgfkeys.code.tex" "\\def\\pgfkeysgetvalue")
\long\def\pgfkeysgetvalue#1#2{%
  \pgfkeys@ifcsname{pgfk@#1}%
    {\expandafter\let\expandafter#2\csname pgfk@#1\endcsname}%
    {\let#2\relax}}

% From:
% (find-tikzgittgpfile "utilities/pgfkeys.code.tex" "def\\pgfkeys{")
\def\pgfkeys{\expandafter\pgfkeys@@set\expandafter{\pgfkeysdefaultpath}}%
\long\def\pgfkeys@@set#1#2{%
  \let\pgfkeysdefaultpath\pgfkeys@root%
  \pgfkeys@parse#2,\pgfkeys@mainstop%
  \def\pgfkeysdefaultpath{#1}}



# (find-LATEX "2022tikz-repl.tex" "tests")



#####
#
# .store in
# 2022oct30
#
#####

# «store-in»  (to ".store-in")
# (tiks ".store in")
# (find-tikzmanfile "pgfmanual-en-pgfkeys.tex" ".store in")
# (find-tikzmanfile "pgfmanual-en-pgfkeys.tex" "{.store in}")
# (find-tikzmanpage 946 "86       Key Management")
# (find-tikzmantext 946 "86       Key Management")
# (find-tikzmanpage 960 "/text/.store in=")
# (find-tikzmantext 960 "/text/.store in=")
# (find-tikzgittgpfile "utilities/pgfkeys.code.tex" "\\pgfkeys{/handlers/.store in/.code=")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"
repl = repl2
savetex()
**
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
  cd /tmp/ && lualatex tikz1.tex
texrun [=[
  \pgfkeys{/s/.store in=\sss}
  \pgfkeys{/s=42}
]=]
printpgfkey("/s")
printmeaning("sss")




#####
#
# luarepl
# 2022oct28
#
#####

# «luarepl»  (to ".luarepl")
# (find-angg "LUA/lua50init.lua" "Repl2.lua")
# (find-es "luatex" "token.get_meaning" "run_repl2_now()")
# (find-esgrep "grep --color=auto -nH --null -e get_meaning *.e")
pgfkeysgetvalue




#####
#
# notions-of-rectangle
# 2022oct24
#
#####

# «so-notions-of-rectangle»  (to ".so-notions-of-rectangle")
# https://stackoverflow.com/questions/74183697/two-notions-of-rectangle-in-tikz

How do I integrate the notions of rectangle that appear in the
sections "2.6 Rectangle Path Construction" and "71.2 Predefined
Shapes" of the PGF/TikZ manual? In section 2.6 the manual explains
that I can draw a rectangle by doing this:

\draw (1,2) rectangle (3,4);

but I'm not being able to find the syntax for treating that rectangle
as a particular case of the predefined shape "rectangle", and giving a
name to it and accessing its reference points...

# (find-tikzmanpage 34 "2.6   Rectangle Path Construction")
# (find-tikzmantext 34 "2.6   Rectangle Path Construction")
# (find-tikzmanpage 228 "17.2.2   Predefined Shapes")
# (find-tikzmantext 228 "17.2.2   Predefined Shapes")
# (find-tikzmanpage 785 "71.2    Predefined Shapes")
# (find-tikzmantext 785 "71.2    Predefined Shapes")

http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf#page=34
http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf#page=228
http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf#page=785

# (find-telegachat "-1001280113535#4555" "Categorias e Aplicações")
# (find-telegachat "@typetheorygroup#4528")

On #haskell:

<edrx> hi all... this is slightly off-topic, but right now this
       channel is the only in which I think I can an answer in less
       than one hour... =/ I'm trying to learn Tikz - mostly to
       draw string diagrams - and I'm mostly trying to translate
       its high-level constructs into lower-level ones...

<edrx> but 1) I don't know if the two notions of "rectangle" below
       can be integrated, and how... and 2) I don't know any chats
       in which I can ask those questions. Any ideas?
<edrx>
http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf#page=34
<edrx>
http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf#page=785

    own diagrams. So, practical questions: 1) can these two notions of
    "rectangle" be integrated? I mean, if I draw a rectangle if \draw
    (1,2) rectangle (3,4);, how do I access its reference points? By
    "these two notions" I mean the sections "2.6 Rectangle Path
    Construction" and "71.2 Predefined Shapes" in the manual, i.e.:
    http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf#page=34
    http://mirrors.ctan.org/graphics/pgf/base/doc/pgfmanual.pdf#page=785



#####
#
# How do I send the result of \pgfkeys to Lua? (Question at stackoverflow)
# 2022oct31
#
#####

# «so-pgfkeys»  (to ".so-pgfkeys")
# https://stackoverflow.com/questions/74260021/how-do-i-send-the-result-of-pgfkeys-to-lua
# (find-LATEXfile "2022pgf-test.tex")



#####
#
# Alternative to "\edef\c{\pgfkeys{/a}}"? (Question at stackexchange)
# 2022nov01
#
#####

# «se-alternative-to-edef»  (to ".se-alternative-to-edef")
# https://tex.stackexchange.com/questions/663740/alternative-to-edef-c-pgfkeys-a
# https://tex.stackexchange.com/questions/663740/alternative-to-edef-c-pgfkeys-a/663743#663743
# https://tex.stackexchange.com/questions/663740/alternative-to-edef-c-pgfkeys-a/663761#663761

\def\pgfkeyscall#1#2{\pgfkeysvalueof{#1/.@cmd}#2\pgfeov}






#####
#
# tikz-3dplot
# 2022oct18
#
#####

# «tikz-3dplot»  (to ".tikz-3dplot")
# (find-tlsh "find * | sort | grep tikz-3dplot")
(code-pdf-page "tikz3dplot" "/usr/local/texlive/2019/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.pdf")
(code-pdf-text "tikz3dplot" "/usr/local/texlive/2019/texmf-dist/doc/latex/tikz-3dplot/tikz-3dplot_documentation.pdf")
(code-c-d      "tikz3dplot" "/usr/local/texlive/2019/texmf-dist/doc/latex/tikz-3dplot/")
# (find-tikz3dplotfile "")
# (find-tikz3dplotpage)
# (find-tikz3dplottext)
# (find-tikz3dplotpage 10 "rotation matrix")
# (find-tikz3dplottext 10 "rotation matrix")




#####
#
# Nodes and arrows
# 2015mar12
#
#####

# «nodes-and-arrows» (to ".nodes-and-arrows")
# (find-angg ".emacs.papers" "tikz")
# (find-angg "LATEX/2015-1-C2-figuras1.tex")
# (find-angg "LATEX/2015-1-C2-figuras1.lua")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
tikzbody = tikz [=[
  [opdot/.style={circle,draw=black,fill=white,
                 inner sep=0pt,minimum size=1mm},
   cldot/.style={circle,draw=black,fill=black,thick,
                 inner sep=0pt,minimum size=1mm}]
  \node at ( 0,2) [opdot,label=left:$A$] {};
  \node at ( 0,1) [opdot] {};
  \node at ( 0,0) [opdot] {};
  \node at ( 1,1) [cldot] {};
  \node at (-1,1) [cldot] {};
]=]
show()
* (tikz-show)

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
defs = [=[
  \tikzset{opdot/.style={circle,inner sep=0pt,minimum size=1mm,
                         draw=black,fill=white}}
  \tikzset{cldot/.style={circle,inner sep=0pt,minimum size=1mm,
                         draw=black,fill=black,thick}}
]=]
tikzbody = tikz [=[
  \node at ( 0,2) [opdot] {};
  \node at ( 0,1) [opdot] {};
  \node at ( 0,0) [opdot] {};
  \node at ( 1,1) [cldot] {};
  \node at (-1,1) [cldot] {};
]=]
show()
* (tikz-show)




#####
#
# Dimension too large
# 2016jan28
#
#####

# «dimension-too-large» (to ".dimension-too-large")
# http://tex.stackexchange.com/questions/164277/dimension-too-large-in-pgf-plot
# http://tex.stackexchange.com/questions/33082/how-can-i-avoid-the-dimension-too-large-error-when-plotting-in-newer-pgf-versi
# http://tex.stackexchange.com/questions/170814/error-dimension-too-large-when-plotting-exponentials-with-tikz <- metapost
# http://tex.stackexchange.com/questions/13816/dimension-too-large-while-plotting-with-pgfplots

http://tex.stackexchange.com/questions/36169/pgfplots-and-calculations-without-fpu-dimension-too-large-with-fpu-illegal?rq=1
http://tex.stackexchange.com/questions/167914/pgfplots-dimension-too-large-returned-when-plotting-rational-function?rq=1






#####
#
# Squiggly arrows
# 2019jan19
#
#####

# «squiggly-arrows» (to ".squiggly-arrows")
# (find-es "tex" "pict2e-squigbij")
# (find-es "tex" "squiggly-arrows")
# (find-es "tex" "stix")
# https://tex.stackexchange.com/questions/149412/artins-squiggly-arrow
# https://tex.stackexchange.com/questions/149412/artins-squiggly-arrow/149416
# https://tex.stackexchange.com/questions/60216/how-to-create-a-squiggle-arrow-with-some-text-on-it-in-tikz
# https://tex.stackexchange.com/questions/12678/squiggly-arrows-in-tikz/442036#442036

this arrow is in unicode at U+27FF, so it should be in the stix and
xits fonts. the reference i have gives it the name
\longrightsquigarrow. There also is \longrightsquigarrow inside of the
mdsymbol package (it is a little shorter)

What makes this squiggly arrow so special? With the
decorations.pathmorphing library (and arrows) I can do \draw[decorate,
decoration={zigzag, segment length=+2pt, amplitude=+.75pt,post
length=+4pt}, -stealth'] (a) -- (c); which looks quite good to me.

# (find-tikzmanpage 1235 "Index")
# (find-tikzmantext 1235 "Index")
# (find-tikzmanpage 1241 "Decorations")
# (find-tikzmantext 1241 "Decorations")
# (find-tikzmanpage 1241 "decorations.pathmorphing")
# (find-tikzmantext 1241 "decorations.pathmorphing")
# (find-tikzmanpage  629 "decorations.pathmorphing")
# (find-tikzmantext  629 "decorations.pathmorphing")




#####
#
# usetikzlibrary
# 2020jun15
#
#####

# «usetikzlibrary» (to ".usetikzlibrary")
# (find-tikzmanpage 128 "\\usetikzlibrary")
# (find-tikzmantext 128 "\\usetikzlibrary")
# (find-tlsh "find * | sort | grep tikzlibrary")
# (find-tlsh "find * | sort | grep pgflibrary")
# (find-fline "/usr/local/texlive/2019/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex")





#####
#
# square-of-oppositions
# 2019apr25
#
#####

# «square-of-oppositions» (to ".square-of-oppositions")
# https://gitlab.com/snippets/1851127
# https://gitlab.com/snippets/1851127/raw

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
usepackages = [=[
  \usetikzlibrary{positioning,arrows,calc}
]=]
tikzbody = tikz [=[
  [node distance=4cm]
  \node (A) {A};
  \node (E) [right=of A] {E};
  \node (I) [below=of A] {I};
  \node (O) [below=of E] {O};

  \coordinate (CENTER) at ($(A)!0.5!(O)$);
  \node (contra) at (CENTER) {contradictory};

  \path[<->] (A) edge node[above] {contrary} (E);
  \path[<->] (I) edge node[below] {subcontrary} (O);
  \path[->] (A) edge node[above,rotate=90] {subaltern} (I);
  \path[->] (E) edge node[above,rotate=-90] {subaltern} (O);
  \path[->] (contra) edge (A);\path[->] (contra) edge (E);
  \path[->] (contra) edge (I);\path[->] (contra) edge (O);
]=]
show()
* (tikz-show)




#####
#
# dialectica-categories
# 2019oct10
#
#####

# «dialectica-categories» (to ".dialectica-categories")
# https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-213.pdf
# (code-pdf-page "dialecticacategories" "$S/https/www.cl.cam.ac.uk/techreports/UCAM-CL-TR-213.pdf")
# (code-pdf-text "dialecticacategories" "$S/https/www.cl.cam.ac.uk/techreports/UCAM-CL-TR-213.pdf")
# (find-dialecticacategoriespage)
# (find-dialecticacategoriestext)
# (find-dialecticacategoriespage 3 "Contents")
# (find-dialecticacategoriespage 7 "Introduction")
# (find-dialecticacategoriespage (+ 6 3) "1")
# (find-dialecticacategoriespage (+ 6 4) "diagram below")

I found the graphical notation, an arrow with two tails, above in an
old paper (https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-213.pdf). I
don't recall seeing it in any recent paper (though I have read only an
epsilon of the literature).

\newcommand{\dial}[6]{\begin{tikzcd}[sep=.2in,ampersand replacement=\&]
{#1}\ar[r,"{#5}"]\ar[-,dr,outer sep=-3,"{\text{\rotatebox{225}{$\to$}}}"']\ar[-,dr,pos=0.8,"{#6}"'] \& {#3} \\
{#2} \& {#4}
\end{tikzcd}}




#####
#
# eetikz and eetikz-bounded
# 2020feb16
#
#####

# «eetikz» (to ".eetikz")
# Defined in: (find-angg ".emacs" "eetikz")
# LaTeX file: (find-LATEX "2020tikz-test.tex")




#####
#
# placing-nodes
# 2020feb16
#
#####

# «placing-nodes» (to ".placing-nodes")
# (find-angg ".emacs.papers" "tikz")
# (find-tikzmanpage 51 "3.4   Placing Nodes Using the At Syntax")
# (find-tikzmantext 51 "3.4   Placing Nodes Using the At Syntax")
% (find-tikzmanpage 52 "\\node at ( 0,2) [place]")
% (find-tikzmantext 52 "\\node at ( 0,2) [place]")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
tikzbody = tikz [=[
  [inner sep=2mm,
   place/.style={circle,draw=blue!50,fill=blue!20,thick},
   transition/.style={rectangle,draw=black!50,fill=black!20,thick}]
  \node at ( 0,2) [place] {};
  \node at ( 0,1) [place] {};
  \node at ( 0,0) [place] {};
  \node at ( 1,1) [transition] {};
  % \node at (-1,1) [transition] {};
  \node at (-2,1) [transition] {};
  \node at (-2,2) {};
]=]
show()
* (tikz-show)




#####
#
# \tikzset
# 2020feb16
#
#####

# «tikzset» (to ".tikzset")
%*
% (eetikz-bounded)
% (find-tikzmanpage 34 "2.8    Adding a Touch of Style")
% (find-tikzmantext 34 "2.8    Adding a Touch of Style")

\tikzset{inner sep         = 2mm }
\tikzset{place/.style      = {circle,draw=blue!50,fill=blue!20,thick} }
\tikzset{transition/.style = {rectangle,draw=black!50,fill=black!20,thick} }

\begin{tikzpicture}
  % [inner sep=2mm,
  %  place/.style={circle,draw=blue!50,fill=blue!20,thick},
  %  transition/.style={rectangle,draw=black!50,fill=black!20,thick}]
  \node at ( 0,2) [place] {};
  \node at ( 0,1) [place] {};
  \node at ( 0,0) [place] {};
  \node at ( 1,1) [transition] {};
  % \node at (-1,1) [transition] {};
  \node at (-2,1) [transition] {};
  \node at (-2,2) {};
\end{tikzpicture}
%*




#####
#
# Naming nodes
# 2020feb16
#
#####

# «naming-nodes» (to ".naming-nodes")
# (find-tikzmanpage 52 "3.7   Naming Nodes")
# (find-tikzmantext 52 "3.7   Naming Nodes")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
scale = "2"
tikzbody = tikz [=[
  \node (AA) at (0,0) {$A$};
  \node (BB) at (3,0) {$B$};
  \node (CC) at (3,2) {$C$};
  \draw [->]  (AA) -- (BB);
  \draw [=>]  (BB) -- (CC);
  \draw [|->] (AA) -- (CC);
]=]
show()
* (tikz-show)




#####
#
# arrows
# 2020feb16
#
#####

# «arrows» (to ".arrows")
# (find-tikzmanpage 187 "16     Arrows")
# (find-tikzmantext 187 "16     Arrows")
# (find-tikzmanpage 187 "16.2    Where and When Arrow Tips Are Placed")
# (find-tikzmantext 187 "16.2    Where and When Arrow Tips Are Placed")
# (find-tikzmanpage 188 "<<->")
# (find-tikzmantext 188 "<<->")
# (find-tikzmanpage 190 "16.3.1   Size")
# (find-tikzmantext 190 "16.3.1   Size")
# (find-tikzmanpage 190 "double line")
# (find-tikzmantext 190 "double line")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
tikzbody = tikz [=[
  \node (AA) at (0,0) {$A$};
  \node (BB) at (3,0) {$B$};
  \node (CC) at (3,2) {$C$};
  \draw [->]                       (AA) -- (BB);
% \draw [|->]                      (AA) -- (CC);
  \draw [arrows = {|}-{>}]         (AA) -- (CC);
% \draw [=>]                       (BB) -- (CC);
  \draw [arrows =  {}-{>}, double] (BB) -- (CC);
]=]
show()
* (tikz-show)





#####
#
# tikzwd
# 2020mar25
#
#####

# «tikzwd» (to ".tikzwd")
# https://github.com/appliedcategorytheory/TikZWD
# (find-git-links "https://github.com/appliedcategorytheory/TikZWD" "tikzwd")
% (find-LATEX "2022tikzwd-1.tex")
# (find-es "git" "very-hard-reset")
# (code-pdf-page "tikzwd" "~/usrc/TikZWD/Collected_WDs_TikZ_Pictures_wiring_diagrams.pdf")
# (code-pdf-text "tikzwd" "~/usrc/TikZWD/Collected_WDs_TikZ_Pictures_wiring_diagrams.pdf")
# (code-c-d      "tikzwd" "~/usrc/TikZWD/")
# (find-tikzwdpage)
# (find-tikzwdtext)
# (find-tikzwdfile "")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/usrc/TikZWD/
cd      ~/usrc/
git clone https://github.com/appliedcategorytheory/TikZWD
cd      ~/usrc/TikZWD/
git clean -dfx
git reset --hard

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd      ~/usrc/TikZWD/
cp -v   ~/usrc/TikZWD/Collected_WDs_TikZ_Pictures_wiring_diagrams.tex \
        ~/usrc/TikZWD/src.tex
lualatex src.tex

# (find-tikzwdfile "src.tex" "% page and stock same size")

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-fline "~/usrc/")
# (find-fline "~/usrc/TikZWD/")
# (find-gitk  "~/usrc/TikZWD/")





#####
#
# The source code for Fong & Spivak's "Seven Sketches in Compositionality"
# 2020mar28
#
#####

# «seven-sketches-src» (to ".seven-sketches-src")
# (find-books "__cats/__cats.el" "fong-spivak")
# (find-psne-arxiv-links "https://arxiv.org/pdf/1803.05316.pdf" "sevensketches")
# https://arxiv.org/pdf/1803.05316.pdf
# https://arxiv.org/format/1803.05316
# (find-fline "~/tmp/fong_spivak_seven_sketches_src.tar")
# (find-fline "~/usrc/seven-sketches/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rv ~/usrc/seven-sketches/
mkdir  ~/usrc/seven-sketches/
cd     ~/usrc/seven-sketches/
tar -xvf ~/tmp/fong_spivak_seven_sketches_src.tar

# (code-c-d "7sketches" "~/usrc/seven-sketches/")
# (find-7sketchesfile "")
# (find-7sketchesgrep "grep --color=auto -nH --null -e meringue *")







#####
#
# "2-connections, a lattice point of view" - cubes with faces as cells
# 2020apr01
#
#####

# «bouzid-tahiri» (to ".bouzid-tahiri")
# https://arxiv.org/pdf/1803.00529v2
# (find-psne-arxiv-links "https://arxiv.org/pdf/1803.00529v2.pdf" "bouzidtahiri")
# (code-pdf-page "bouzidtahiri" "$S/https/arxiv.org/pdf/1803.00529v2.pdf")
# (code-pdf-text "bouzidtahiri" "$S/https/arxiv.org/pdf/1803.00529v2.pdf")
# (code-c-d      "bouzidtahiri" "~/usrc/arxiv-bouzidtahiri/")
# (find-bouzidtahiripage)
# (find-bouzidtahiritext)
# (find-bouzidtahirifile "")
# (find-bouzidtahirifile "cube_proof_1.tex" "\\foreach")




#####
#
# quantaloids
# 2022oct25
#
#####

# «quantaloids»  (to ".quantaloids")
# (find-telegachat "@anatenorio#206141")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
usepackages = [=[
  \usetikzlibrary{shapes,shadows,calc}
  \usepgflibrary{arrows}
]=]
defs = [=[
  \newcommand{\A}{\mathcal{A}}
  \newcommand{\K}{\mathcal{K}}
  \newcommand{\M}{\mathcal{M}}
  \newcommand{\T}{\mathcal{T}}
  \tikzset{
    sshadow/.style={opacity=.25, shadow xshift=0.05, shadow yshift=-0.06},
  }

%-----TBoxes
%-----#1 height, #2 width, #3 anchor for the label, #4 name of the node, #5
%-----coordinate, #6 label
\def\tboxl[#1,#2,#3,#4,#5]#6{%
  \node[draw, drop shadow={opacity=5.85}, minimum height=#1, minimum width=#2, %
  inner color=blue!25, outer color=blue!35, color=blue!10!black] (#4) at #5 {}; %
  \node[anchor=#3,inner sep=2pt] at (#4.#3) {#6};%
}

%-----#1 name of the node, #2 coordinate, #3 label
\def\entity[#1,#2]#3;{
  \node[draw,drop shadow={opacity=.4,shadow xshift=0.04, shadow yshift=-0.04},
        color=blue!30!black,fill=white,rounded corners=3] (#1) at #2 {#3};
}

%-----#1 from node, #2 to node, #3 specification of a node (label), #4
%-----dashed, or other parameters for draw
\def\isaedge[#1,#2,#3,#4];{ 
  \draw[-triangle 60,color=black!20!black,#4,fill=white] (#1) -- #3
  (#2);  
}


%-----#1 height, #2 width, #3 name of the node, #4
%-----coordinate, #5 label
\def\kbbox[#1,#2,#3,#4,#5]#6{
        \draw[dashed] node[draw,color=gray!80,minimum
        height=#1,minimum width=#2] (#4) at #5 {}; 
        \node[anchor=#3,inner sep=2pt] at (#4.#3)  {#6};
}

]=]

scale = 1
tikzbody = tikz [=[
    \kbbox[94,144,south,k1,(0,1.25)] {source KB $\K_1$};
    \tboxl[80,60,north east,t1,(0,2.5)] {$\T_1$};
    \entity[A1,(-0.9,3.1)] {$A_1$};
    \entity[B1,(-0.4,1.9)] {$B_1$};
    \entity[C1,(0.9,1.9)] {$C_1$};
    \entity[D1,(0.4,3.1)] {$D_1$};
]=]
show()
* (tikz-show)

scale = 0.5
tikzbody = tikz [=[
    % source KB
    \kbbox[347,544,north west,k1,(0,6.55)] {L-Grothendieck Topology};
    \tboxl[193,492,north east,t1,(0,4.2)] {Grothendieck Topology};
    \entity[A1,(-1.5,5.5)] {Locales};
    \entity[B1,(-3.9,3.5)] {Opens of $Y$};
    \entity[C1,(3.8,3.9)] {Schemes};
    \entity[D1,(1,1.9)] {...};
    \entity[E1,(-1.5,10.6)] {Quantales};
    \entity[F1,(-6.7,8.8)] {Quantaloids};
    \entity[G1,(4.7,9.5)] {To explore};
    \isaedge[A1,E1,,];
    %\isaedge[C1,B1,,];
    %\isaedge[C1,D1,,];
]=]
show()
* (tikz-show)




#####
#
# Dan Marsden: Category Theory Using String Diagrams
# 2020apr10
#
#####

# «ctusd» (to ".ctusd")
# (find-books "__cats/__cats.el" "marsden-ctusd")
# (find-psne-arxiv-links "https://arxiv.org/pdf/1401.7220.pdf" "ctusd")

* (eepitch-shell2)
* (eepitch-kill)
* (eepitch-shell2)
mkdir -p $S/https/arxiv.org/e-print/
cp -v /tmp/1401.7220 $S/https/arxiv.org/e-print/1401.7220.tar
rm -Rv ~/usrc/arxiv-ctusd/
mkdir  ~/usrc/arxiv-ctusd/
cd     ~/usrc/arxiv-ctusd/
tar -xvf $S/https/arxiv.org/e-print/1401.7220.tar

pdflatex string.tex
pdflatex string.tex

# (code-c-d "ctusd" "~/usrc/arxiv-ctusd/")
# (find-ctusdfile "")
# (code-pdf-page "myctusd" "~/usrc/arxiv-ctusd/string.pdf")
# (code-pdf-text "myctusd" "~/usrc/arxiv-ctusd/string.pdf")
# (find-ctusdpage)
# (find-ctusdpage   9)
# (find-myctusdpage 9)
# (find-myctusdtext)
# (find-myctusdpage 39 "Universality from Representables")
# (find-myctusdtext 39 "Universality from Representables")
# (find-ctusdfile "string.tex" "Universality from Representables")

# (find-ctusdfile "macros.sty")
# (find-ctusdfile "macros.sty" "\\adjunctionex")

# (find-ctusdpage  4           "Finally, we will sketch")
# (find-ctusdtext  4           "Finally, we will sketch")
# (find-ctusdfile "string.tex" "Finally, we will sketch")

# (find-ctusdgrep "grep --color=auto -nH --null -e catterm *")





#####
#
# Ellis, Ritchie et al: Learning to Infer Graphics Programs from Hand-Drawn Images
# 2020apr10
#
#####

# «ellis-from-hand-drawn» (to ".ellis-from-hand-drawn")
# (find-books "__comp/__comp.el" "ellis-ritchie")
# (find-ligpfromhandsuppage)
# (find-ligpfromhandsuptext)
# https://github.com/ellisk42/TikZ

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "~/usrc/ellishanddrawn/")
rm -Rfv ~/usrc/ellishanddrawn/
mkdir   ~/usrc/ellishanddrawn/
cd      ~/usrc/ellishanddrawn/
git clone https://github.com/ellisk42/TikZ
cd      ~/usrc/ellishanddrawn/TikZ/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (code-c-d "ellishanddrawn" "~/usrc/ellishanddrawn/TikZ/")
# (find-ellishanddrawnfile "")





#####
#
# open-logic
# 2020jun14
#
#####

# «open-logic» (to ".open-logic")
# (find-books "__logic/__logic.el" "open-logic")
# https://openlogicproject.org/
# https://openlogicproject.org/download/
# https://openlogicproject.org/about/
# https://openlogicproject.org/2019/03/29/sneak-peek-forall-x-now-with-modal-logic/
# http://builds.openlogicproject.org/
# http://builds.openlogicproject.org/open-logic-complete.pdf
# https://github.com/OpenLogicProject/OpenLogic

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/usrc/OpenLogic/
cd      ~/usrc/
git clone https://github.com/OpenLogicProject/OpenLogic
cd      ~/usrc/OpenLogic/

git reset
git pull
make |& tee om

# (find-fline "~/usrc/")
# (find-fline "~/usrc/OpenLogic/")
# (find-gitk  "~/usrc/OpenLogic/")

# (code-c-d "openlogic" "~/usrc/OpenLogic/")
# (find-openlogicfile "")
# (find-openlogicfile "Makefile")
# (find-openlogicsh "find * | sort")





#####
#
# functorialwiki
# 2020jun14
#
#####

# «functorialwiki» (to ".functorialwiki")
# https://wiki.functorialwiki.org/act/show/HomePage
# https://wiki.functorialwiki.org/act/show/Nine+lemma



#####
#
# \upeyes, \downeyes and \righteyes in Fosco Loregian's "Coend Calculus"
# 2020jul06
#
#####

# «loregian-eyes»  (to ".loregian-eyes")
# (find-books "__cats/__cats.el" "loregian")
# (find-psne-arxiv-links "https://arxiv.org/pdf/1501.02503.pdf" "coendcalculus")
# (code-c-d "coendcalculus" "~/usrc/arxiv-coendcalculus/")
# (find-coendcalculusfile "")
# (find-coendcalculusfile "layout/disegni.tex" "\\newcommand{\\upeyes}")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
tikzbody = tikz [=[
  [scale=10]
  \draw circle (3pt);
  \draw[fill,yshift=1.5pt] circle (1.5pt);
  \begin{scope}[xshift=7pt]
    \draw circle (3pt);
    \draw[fill,yshift=1.5pt] circle (1.5pt);
  \end{scope}
]=]
show()
* (tikz-show)





#####
#
# grid-on-image
# 2020sep06
#
#####

# «grid-on-image»  (to ".grid-on-image")
# (find-es "tex" "pict2e-grid-on-image")
# https://tex.stackexchange.com/questions/1449/how-can-should-i-include-annotated-images
# https://ff.cx/latex-overlay-generator/
# https://tex.stackexchange.com/questions/9559/drawing-on-an-image-with-tikz
# https://tex.stackexchange.com/questions/9559/drawing-on-an-image-with-tikz/9562#9562
# https://tex.stackexchange.com/questions/186389/how-can-i-annotate-an-image-with-arrow-and-text/186476

# https://texample.net/tikz/examples/tikz-listings/
# https://tex.stackexchange.com/questions/231487/positioning-tikz-figure-with-xetex




#####
#
# A.J. Cain's c_tikzref
# 2021may17
#
#####

# «c_tikzref»  (to ".c_tikzref")
# http://www-groups.mcs.st-and.ac.uk/~alanc/
# http://www-groups.mcs.st-and.ac.uk/~alanc/pub/c_tikzref/
# http://www-groups.mcs.st-and.ac.uk/~alanc/pub/c_tikzref/index.html
# http://www-groups.mcs.st-and.ac.uk/~alanc/pub/c_tikzref/c_tikzref.pdf
# (code-pdf-page "ctikzref" "$S/http/www-groups.mcs.st-and.ac.uk/~alanc/pub/c_tikzref/c_tikzref.pdf")
# (code-pdf-text "ctikzref" "$S/http/www-groups.mcs.st-and.ac.uk/~alanc/pub/c_tikzref/c_tikzref.pdf")
# (find-ctikzrefpage)
# (find-ctikzreftext)



#####
#
# The files that are read by \usepackage{tikz}
# 2022oct17
#
#####

# «included-files»  (to ".included-files")
# (find-angg "LUA/flsfiles.lua" "main")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd    /tmp/
cat > /tmp/tikz1.tex <<'%%%'
\documentclass{book}
\usepackage{tikz}
\begin{document}
  a
\end{document}
%%%

lualatex -record tikz1.tex 

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
-- (find-angg "LUA/flsfiles.lua" "main")
ee_dofile   "~/LUA/flsfiles.lua"
s = FlsFiles.from("/tmp/tikz1.fls"):allfiles()
bigstr = s:ksc("\n")
= bigstr
writefile("/tmp/o", bigstr)

# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/basiclayer/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/frontendlayer/tikz/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/libraries/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/math/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/modules/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/systemlayer/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/generic/pgf/utilities/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/latex/graphics-cfg/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/latex/pgf/basiclayer/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/latex/pgf/compatibility/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/latex/pgf/frontendlayer/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/latex/pgf/math/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/latex/pgf/systemlayer/")
# (find-fline "/usr/local/texlive/2020/texmf-dist/tex/latex/pgf/utilities/")




#####
#
# repl
# 2022oct22
#
#####

# «repl»  (to ".repl")
# (find-LATEX "2022tikz-repl.tex" "tests")
# (find-angg "LUA/lua50init.lua" "Repl2.lua")




#####
#
# rounded-corners
# 2022oct22
#
#####

# «rounded-corners»  (to ".rounded-corners")
# (to "included-files")
# (tiks "rounded corners")
# (find-tikzgitgrep "grep --color=auto -nRH --null -e 'rounded corners' *")
# (find-tikzmangrep "grep --color=auto -nH --null -e 'rounded corners' *.tex")





#####
#
# Horizontal and vertical lines, |-, and -|
# 2022oct28
#
#####

# «horiz-and-vert»  (to ".horiz-and-vert")
# (tiks "Horizontal and Vertical Lines")
# (find-tikzmanpage 152 "14.2.2    Horizontal and Vertical Lines")
# (find-tikzmantext 152 "14.2.2    Horizontal and Vertical Lines")
# (find-tikzmanfile "pgfmanual-en-tikz-paths.tex" "Horizontal and Vertical Lines")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-fline "~/LUA/tikz1.lua")
scale = 2
tikzbody = tikz [=[
  \draw (0,0) node(a) [draw] {A}  (1,1) node(b) [draw] {B};
  \draw (a.north) |- (b.west);
  \draw[color=red] (a.east) -| (2,1.5) -| (b.north);
]=]
show()
* (tikz-show)

savetex()
* (tikz-showtex)






#####
#
# pyramid
# 2022nov06
#
#####

# «pyramid»  (to ".pyramid")
# http://tex.stackexchange.com/questions/108612/how-to-draw-this-pyramid-with-tex

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-anchor "~/LUA/tikz1.lua")
usepackages = [=[
  \usepackage{tikz}
  \usepackage{tikz-3dplot}
  \usetikzlibrary{intersections,calc}
]=]
maincoords = [=[ \tdplotsetmaincoords{80}{100} ]=]
defs = tikz [=[
 \tikzset{ hidden/.style = {thin, dotted}}
   \tikzset{%
     add/.style args={#1 and #2}{
         to path={%
  ($(\tikztostart)!-#1!(\tikztotarget)$)--($(\tikztotarget)!-#2!(\tikztostart)$)%
   \tikztonodes}}}
  <<maincoords>>
]=]

tikzbody = tikz [=[
  [tdplot_main_coords,scale=2]
  \pgfmathsetmacro\a{2}

  % definitions 
    \path (0,0,0)                           coordinate (A) 
          (\a,0,0)                          coordinate (B) 
          (\a,\a,0)                         coordinate (C) 
          (0,\a,0)                          coordinate (D) 
          (0,0,{\a*sqrt(2)})                coordinate (S) 
          (0,0,{0.5*\a*sqrt(2)})            coordinate (M) 
          (0.5*\a,0.5*\a,0)                 coordinate (O) 
          (0,0.5*\a,{0.5*\a*sqrt(2)})       coordinate (I) 
          (2/5*\a,2/5*\a,{sqrt(2)/5*\a})    coordinate (H)
          ($(B)!2!(M)$)                     coordinate (N)
          (0,2*\a/3,{sqrt(2)/3*\a})         coordinate (E)
           (\a,2*\a/3,{sqrt(2)/3*\a})        coordinate (K) ;
  % drawing
  \begin{scope}
    \clip (S) -- (B) -- (D) --cycle;
    \draw[hidden] (B) -- (N);
  \end{scope}
  \begin{scope}
    \clip (S) -- (I) -- (N) --cycle;
    \draw (B) -- (N);
  \end{scope}

  \draw[hidden] 
        (A) -- (C)  (A) -- (B)  (A) -- (D) (A) -- (H) (A) -- (S)
        (A) -- (E) (B) -- (D)  (O) -- (S) (I) -- (M);
  \draw (B) -- (K) -- (E)   (C) -- (N) -- (K)
        (B) --(C) -- (D) (S) -- (D)  (S) -- (B)  (S) -- (C);
  \draw[add = 1 and 1]  (S) to (N); 

  % place black circles and labels
  \foreach \point/\position in {A/left,B/left,C/right,D/right,E/right,H/above,
    I/right,K/right,M/right,N/left,O/right,S/left}
  {
    \fill (\point) circle (.5pt);
    \node[\position=3pt] at (\point) {$\point$};
  }
]=]
scale = 0.5
show()
* (tikz-show)

maincoords = [=[ \tdplotsetmaincoords{80}{100} ]=]
show()
* (tikz-show)

maincoords = [=[ \tdplotsetmaincoords{70}{100} ]=]
show()
* (tikz-show)

maincoords = [=[ \tdplotsetmaincoords{60}{120} ]=]
show()
* (tikz-show)



































#####
#
# commutative-diagrams
# 2021may14
#
#####

# «commutative-diagrams»  (to ".commutative-diagrams")
# (find-fline "/usr/local/texlive/2021/texmf-dist/doc/generic/commutative-diagrams/")
# (find-pdf-page "/usr/local/texlive/2021/texmf-dist/doc/generic/commutative-diagrams/commutative-diagrams-doc.pdf")
# (find-pdf-text "/usr/local/texlive/2021/texmf-dist/doc/generic/commutative-diagrams/commutative-diagrams-doc.pdf")

(code-c-d      "codi" "/usr/local/texlive/2021/texmf-dist/doc/generic/commutative-diagrams/")
(code-pdf-page "codi" "/usr/local/texlive/2021/texmf-dist/doc/generic/commutative-diagrams/commutative-diagrams-doc.pdf")
(code-pdf-text "codi" "/usr/local/texlive/2021/texmf-dist/doc/generic/commutative-diagrams/commutative-diagrams-doc.pdf")
;; (find-codifile "")
;; (find-codipage)
;; (find-coditext)




#####
#
# quiver
# 2020nov25
#
#####

# «quiver»  (to ".quiver")
# https://q.uiver.app/
# https://varkor.github.io/blog/2020/11/25/announcing-quiver.html
# https://github.com/varkor/quiver
# https://categorytheory.zulipchat.com/#narrow/stream/229111-general/topic/quiver.3A.20a.20modern.20commutative.20diagram.20editor

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/usrc/quiver/
cd      ~/usrc/
git clone https://github.com/varkor/quiver
cd      ~/usrc/quiver/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-fline "~/usrc/")
# (find-fline "~/usrc/quiver/")
# (find-gitk  "~/usrc/quiver/")

# (code-c-d "quiver" "~/usrc/quiver/")
# (find-quiverfile "")
# (find-quiverfile "src/quiver.js")
# (find-quiverfile "src/quiver.sty")




#####
#
# FreeTikZ
# 2018jan24
#
#####

# «freetikz» (to ".freetikz")
# https://golem.ph.utexas.edu/category/2018/01/freetikz.html
# http://homepages.inf.ed.ac.uk/cheunen/freetikz/
# http://homepages.inf.ed.ac.uk/cheunen/freetikz/freetikz.sty
# https://github.com/chrisheunen/freetikz

However, string diagrams are also a pain to typeset. First, there is
the entrance fee of learning a modern LaTeX drawing package, like
TikZ. Then, there is the learning period of setting up macros tailored
to string diagrams and internalizing them in your muscle memory. But
even after all that investment, it still takes a lot of time. And
unlike that glorious moment when you realise that you have cycled
about twice the circumference of the Earth in your life, this time is
mostly wasted. I estimate I’ve wasted over 2000 string diagrams’ worth
of time by now.

\begin{tikzpicture}
  \node[dot]      (d0) at (4.25, 5.5) {};
  \node[dot]      (d1) at (6.25, 3.8) {};
  \node[morphism] (m0) at (7.5, 5.3) {};
  \draw (d0.center)     to[out=-90, in=180] (d1.center);
  \draw (d1.center)     to[out=60, in=-90] (m0.south west);
  \draw (m0.south east) to[out=-60, in=90] (8.25, 2);
  \draw (m0.north)      to[out=90, in=-90] (7.5, 8.8);
  \draw (d1.center)     to[out=-90, in=90] (6.25, 1.8);
\end{tikzpicture}

# (find-git-links "https://github.com/chrisheunen/freetikz" "freetikz")
# (code-c-d "freetikz" "~/usrc/freetikz/")
# (find-freetikzfile "")




#####
#
# TikZit - a super simple GUI editor for graphs and string diagrams
# 2019jan08
#
#####

# «tikzit» (to ".tikzit")
# https://tikzit.github.io/ 
# https://github.com/tikzit/tikzit
# https://github.com/tikzit/tikzit/releases/download/v2.1/tikzit-linux.tar.gz

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv ~/usrc/tikzit/
cd      ~/usrc/
git clone  https://github.com/tikzit/tikzit
cd      ~/usrc/tikzit/

# (find-fline "~/usrc/")
# (find-fline "~/usrc/tikzit/")
# (find-gitk "~/usrc/tikzit/")

# (code-c-d "tikzit" "~/usrc/tikzit/")
# (find-tikzitfile "")
# (find-tikzitfile "README.md")
# (find-tikzitsh "find * | sort")
# (find-tikzitfile "tex/sample/")
# (find-tikzitfile "tex/sample/tikzit.sty")
# (find-pdf-page "/usr/local/texlive/2019/texmf-dist/doc/latex/tools/bm.pdf")
# (find-zsh "installeddebs | sort | grep qt5")
# (find-zsh "availabledebs | sort | grep qt5")

sudo apt -y install flex bison qt5-default   libpoppler-dev libpoppler-qt5-dev
sudo apt -y install flex bison qt5-assistant libpoppler-dev libpoppler-qt5-dev libpoppler-cpp-dev
qmake -r
make               |& tee om
sudo make install  |& tee omi

tikzit

# (find-man "tikzit")




#####
#
# Running tikzit in /tmp/tikzit-test/
# 2022oct10
#
#####

# «tikzit-tmp»  (to ".tikzit-tmp")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)

# (find-tikzitfile "tex/sample/")
# (find-tikzitfile "tex/sample/tikzit.sty")
# (find-fline "/tmp/tikzit-test/")

rm -Rv   /tmp/tikzit-test/
mkdir    /tmp/tikzit-test/
cd     ~/usrc/tikzit/tex/
cp -av * /tmp/tikzit-test/
cd       /tmp/tikzit-test/

tikzit


# To get a portable directory, you can then (optionally) run:
# ./deploy-linux.sh





#####
#
# ktikz
# 2019jan22
#
#####

# «ktikz» (to ".ktikz")
# http://www.hackenberger.at/blog/ktikz-editor-for-the-tikz-language
# https://github.com/fhackenberger/ktikz
# http://latexbr.blogspot.com/2011/01/desenhando-em-tikz-com-ktikz.html

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv ~/usrc/ktikz/
cd      ~/usrc/
git clone https://github.com/fhackenberger/ktikz
cd      ~/usrc/ktikz/

# (code-c-d "ktikz" "~/usrc/ktikz/")
# (find-ktikzfile "")
# (find-ktikzfile "INSTALL")
# (find-gitk "~/usrc/ktikz/")




#####
#
# kodi
# 2020jan18
#
#####

# «kodi» (to ".kodi")
# https://github.com/paolobrasolin/kodi
# https://github.com/paolobrasolin/kodi/issues/21
# https://ctan.org/pkg/kodi <- 404
# (find-tlsh "find * | sort | grep -i kodi")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv ~/usrc/kodi/
cd      ~/usrc/
git clone https://github.com/paolobrasolin/kodi
cd      ~/usrc/kodi/

make install |& tee omi
# (find-fline "~/texmf/doc/generic/kodi/")
# (find-pdf-page "~/texmf/doc/generic/kodi/kodi-doc.pdf")
# (find-pdf-text "~/texmf/doc/generic/kodi/kodi-doc.pdf")

git reset

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-fline "~/usrc/")
# (find-fline "~/usrc/kodi/")
# (find-gitk  "~/usrc/kodi/")

# (code-c-d "kodi" "~/usrc/kodi/")
# (find-kodifile "")
# (find-kodifile "omi")
# (find-kodifile "doc/")
# (find-kodifile "doc/latexmkrc")

rm -Rfv ~/usrc/kodi/
cd      ~/usrc/
git clone https://github.com/paolobrasolin/kodi
cd      ~/usrc/kodi/
# git reset
cd      ~/usrc/kodi/doc/
pdflatex main.tex

;; (find-fline "~/tmp/" "kodi-doc--2020-01-19.pdf")
;; (find-pdf-page "~/tmp/kodi-doc--2020-01-19.pdf")
;; (find-pdf-text "~/tmp/kodi-doc--2020-01-19.pdf")




#####
#
# tikz-cd
# 2015feb23 / 2020feb16
#
#####

# «tikz-cd» (to ".tikz-cd")
# http://mirrors.ibiblio.org/CTAN/graphics/pgf/contrib/tikz-cd/tikz-cd-doc.pdf
# (find-tlsh "find * | sort | grep tikz-cd")
# (find-tlsh "find * | sort | grep tikz | grep commutative")
# (find-tlsh "find * | sort | grep tikz | grep cd")
# (find-fline "/usr/local/texlive/2019/texmf-dist/doc/latex/tikz-cd/")
# (code-pdf-page "tikzcd" "/usr/local/texlive/2019/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf")
# (code-pdf-text "tikzcd" "/usr/local/texlive/2019/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf")
# (find-fline "/usr/local/texlive/2019/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty")
# (find-tikzcdpage)
# (find-tikzcdtext)
# (find-tikzcdpage 2 "\\arrow[")
# (find-tikzcdtext 2 "\\arrow[")
# (find-tikzcdpage 3 "Basic arrows")
# (find-tikzcdtext 3 "Basic arrows")
# (find-tikzcdpage 5 "/tikz/commutative diagrams")
# (find-tikzcdtext 5 "/tikz/commutative diagrams")
# (find-tlfile "texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex" "/tikz/commutative diagrams")
# (find-tlfile "texmf-dist/tex/generic/tikz-cd/")




#####
#
# tikzcd-editor
# 2020jun01
#
#####

# «tikzcd-editor» (to ".tikzcd-editor")
# https://tikzcd.yichuanshen.de/
# https://github.com/yishn/tikzcd-editor
# (find-es "javascript" "nodejs")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv ~/usrc/tikzcd-editor/
cd      ~/usrc/
git clone https://github.com/yishn/tikzcd-editor
cd      ~/usrc/tikzcd-editor/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-fline "~/usrc/")
# (find-fline "~/usrc/tikzcd-editor/")
# (find-gitk  "~/usrc/tikzcd-editor/")

# (code-c-d "tikzcdeditor" "~/usrc/tikzcd-editor/")
# (find-tikzcdeditorfile "")
# (find-tikzcdeditorfile "README.md")

cd      ~/usrc/tikzcd-editor/
npm install     |& tee oni
npm run build   |& tee onrb

# file:///home/edrx/usrc/tikzcd-editor/index.html
# ^ not working =(

# (find-dednat6 "demo-tikz.tex")
# http://angg.twu.net/dednat6/demo-tikz.pdf






#####
#
# tikz-cd
# 2020jan22
#
#####

# «tikz-cd» (to ".tikz-cd")

# (find-tlsh "find * | sort | grep tikz-cd")
;; (find-fline "/usr/local/texlive/2019/texmf-dist/doc/latex/tikz-cd/")
;; (find-pdf-page "/usr/local/texlive/2019/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf")
;; (find-pdf-text "/usr/local/texlive/2019/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf")




#####
#
# sane_tikz
# 2020feb16
#
#####

# «sane_tikz» (to ".sane_tikz")
# https://github.com/negrinho/sane_tikz
# https://github.com/negrinho/sane_tikz/blob/master/examples/deep_architect.pdf
# (find-git-links "https://github.com/negrinho/sane_tikz" "sanetikz")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/usrc/sane_tikz/
cd      ~/usrc/
git clone https://github.com/negrinho/sane_tikz
cd      ~/usrc/sane_tikz/

export PAGER=cat
git branch --list -a
git for-each-ref
git log --oneline --graph --all -20

# (find-fline "~/usrc/")
# (find-fline "~/usrc/sane_tikz/")
# (find-gitk  "~/usrc/sane_tikz/")

# (code-c-d "sanetikz" "~/usrc/sane_tikz/")
# (find-sanetikzfile "")
# (find-sanetikzfile "examples/")
# (find-sanetikzfile "examples/xlnet.py")
# (find-sanetikzfile "examples/xlnet.tex")




#####
#
# circuitikz
# 2022nov11
#
#####

# «circuitikz»  (to ".circuitikz")
# https://ctan.org/pkg/circuitikz?lang=en
# (find-tlsh "find * | sort | grep circuitikz")
# (code-pdf-page "circuitikz" "/usr/local/texlive/2019/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf")
# (code-pdf-text "circuitikz" "/usr/local/texlive/2019/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf")
# (find-circuitikzpage)
# (find-circuitikztext)




#####
#
# voltage-no-inversion
# 2022nov11
#
#####

# «voltage-no-inversion»  (to ".voltage-no-inversion")
# https://tikz.net/
# https://tikz.net/voltage-no-inversion/

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-anchor "~/LUA/tikz1.lua")
usepackages = [=[
  \usepackage[european, straightvoltages, RPvoltages,
              americanresistor, americaninductors]{circuitikz}
  \tikzset{every picture/.style={line width=0.2mm}}
  \usepackage{amsmath}
  \usetikzlibrary{calc}
  \ctikzset{bipoles/thickness=1.2, label distance=1mm, voltage shift = 1}
  \newcommand{\fixedvlen}[3][0.4cm]{% [semilength]{node}{label}
      % get the center of the standard arrow
      \coordinate (#2-Vcenter) at ($(#2-Vfrom)!0.5!(#2-Vto)$);
      % draw an arrow of a fixed size around that center and on the same line
      \draw[-{Triangle[round,open]}] ($(#2-Vcenter)!#1!(#2-Vfrom)$) -- ($(#2-Vcenter)!#1!(#2-Vto)$);
      % position the label as it where if standard voltages were used
      \node[ anchor=\ctikzgetanchor{#2}{Vlab}] at (#2-Vlab) {#3};
  }
  \newcommand{\fixedvlendashed}[3][0.75cm]{% [semilength]{node}{label}
      % get the center of the standard arrow
      \coordinate (#2-Vcenter) at ($(#2-Vfrom)!0.5!(#2-Vto)$);
      % draw an arrow of a fixed size around that center and on the same line
      \draw[dashed,-{Triangle[round,open]}]
        ($(#2-Vcenter)!#1!(#2-Vfrom)$) -- ($(#2-Vcenter)!#1!(#2-Vto)$);
      % position the label as it where if standard voltages were used
      \node[ anchor=\ctikzgetanchor{#2}{Vlab}] at (#2-Vlab) {#3};
  }
]=]
hello = tikz [=[
  \scalebox{<<scale>>}{
  \begin{circuitikz}
        \node[op amp, noinv input up] at (0,0) (opamp) {};
        \node[ground] at (-4.69,-5.5) (ground) {};
        \draw (opamp.-) -- ++(-1.15,0) -- ++(0,-2)
              to[R, l_=$R_1$] ++(0,-2.5)
              to[short,-*] ++(-2.35,0);
        \draw (opamp.+) -- ++(-3.5,0) to[sV, l_=$v_\text{IN}$,] ++(0,-3) -- (ground);
        \draw (1.66,0) to[short,*-] ++(0,-2.5) to[R, l^=$R_2$, -*] ++(-4,0);
        \draw (opamp.out) to[short,-*] ++(1.5,0) node[shift={(0.6,0)}] {$v_\text{O}$};
        \draw[-latex] (opamp.up) -- ++(0,0.5) node[above] {$V_+$};
        \draw[-latex] (opamp.down) -- ++(0,-0.5) node[below] {$V_-$};
        %Voltage
  %     \fixedvlen[0.4]{R1}{$V_{R_1}$};
  %     \fixedvlen[0.4]{R2}{$V_{R_2}$};
        %Nodes
        \node[shift={(0,-0.3)}] at (opamp.-) {\scriptsize$v_-$};
        \node[shift={(0,+0.3)}] at (opamp.+) {\scriptsize$v_+$};
  \end{circuitikz}
  }
]=]
scale = 0.5
show()
* (tikz-show)





#####
#
# tikzducks
# 2022nov11
#
#####

# «tikzducks»  (to ".tikzducks")
# (find-sh "locate ducks")
# (find-tl2021file "texmf-dist/doc/generic/tikzducks/")





















* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
function f(x,y) print(x/4 + y/2 - 1) end
f(0, 0)
f(2, -1)



#*
# (defun c  () (interactive) (eev-bounded) (find-zsh0 "ee"))
# (defun cc () (interactive) (eev-bounded) (find-zsh  "ee"))
# (defun d  () (interactive) (find-pdf-page "/tmp/tikz/test1.pdf"))
# (find-angg ".emacs.papers" "tikz")

mkdir /tmp/tikz/
cd    /tmp/tikz/
cat > test1.tex <<'%%%'
\documentclass{book}
\usepackage{tikz}
\begin{document}
\tikzset{axis/.style=very thick}
\tikzset{tick/.style=thick}
\tikzset{grid/.style=gray,very thin}
\usetikzlibrary{calc}
%

\def\xyfromuv#1#2{2*(#1)-2*(#2),2+(#1)+(#2)}
\def\xyfromt#1{\xyfromuv{#1}{1/(#1)}}
\def\twothree{2,3}
\xyfromt 1

\begin{tikzpicture}[scale=1]
  \clip (-4-0.4, -3-0.4) rectangle (4+0.4, 5+0.4);
  \draw[step=1cm,grid] (-4,-3) grid (4,5);
  \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);
  \draw[color=blue] (-20,14) -- (20,-6);    % = U=1
  \draw (-20,12) -- (20,-8);    % = U=0
  \draw (-20,10) -- (20,-10);   % = U=-1
  \draw[axis,color=yellow] (1,2) -- (3,4);
  %\draw[axis,color=yellow] (\xyfromt 1) -- (\xyfromt 2);
  \draw[axis,color=yellow] (2*1, 3) -- (4, 5);
  \draw[axis,color=red] (\twothree) -- (4, 5);
  %
  \draw[color=orange] (20,14) -- (-20,-6);    % = V=1
  \draw (20,12) -- (-20,-8);    % = 0
  \draw (20,10) -- (-20,-10);   % = -1
  %
  \draw[color=red]    plot (\x,\x)             node[right] {$f(x) =x$};
  \draw[color=blue]   plot (\x,{sin(\x r)})    node[right] {$f(x) = \sin x$};
  \draw[color=orange] plot (\x,{0.05*exp(\x)}) node[right] {$f(x) = \frac{1}{20} \mathrm e^x$};
  %
  %  \draw (0,0) -- $(1,2) + (3,4)$;
  % (x,y)=(0,2)+u(2,1)+v(-2,1)
  % (x,y)=(2u-2v,2+u+v)
\end{tikzpicture}
\end{document}
%%%
pdflatex test1.tex
#*

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/tikz/
lualatex test1.tex








# (find-man "luatex")

#*
# (defun c  () (interactive) (eev-bounded) (find-zsh0 "ee"))
# (defun cc () (interactive) (eev-bounded) (find-zsh  "ee"))
# (defun d  () (interactive) (find-dvipage "/tmp/tikz/test1.dvi"))
# (find-angg ".emacs.papers" "tikz")

mkdir /tmp/tikz/
cd    /tmp/tikz/
cat > test1.tex <<'%%%'
\documentclass{book}
\usepackage{luacode}
\usepackage{color}
\begin{document}

% (find-dn4ex "edrx08.sty" "colors")
%
\def\blue  #1{{\color{blue}#1}}
\def\red   #1{{\color{red}#1}}
\def\orange#1{{\color{orange}#1}}
\def\yellow#1{{\color{yellow}#1}}
\def\smashedvrule#1#2#3{\vrule width#1 height#2 depth#3 \kern-#1}
\def\bicolorhbox#1{{%
  \setbox0\hbox{#1}%
  \yellow{\smashedvrule{\wd0}{\ht0}{0pt}}%
  \orange{\smashedvrule{\wd0}{0pt}{\dp0}}%
  \box0%
  }}
\definecolor{orange}{rgb}{1,.64,0}

% (find-dn4ex "edrx08.sty" "dags")
%
\newdimen\mypictureunit
\setbox0=\hbox{\rm0}
\mypictureunit=.085\wd0
\mypictureunit=.084\wd0
%
\def\cput  (#1,#2)#3{\put(#1,#2){\hbox to 0pt{\hss           #3\hss}}}
\def\dagput(#1,#2)#3{\put(#1,#2){\hbox to 0pt{\hss\scriptsize#3\hss}}}
\def\dagpicture(#1,#2)(#3,#4)[#5]#6{{%
  \unitlength=\mypictureunit
  \lower #5\unitlength\hbox{%
    \begin{picture}(#1,#2)(#3,#4)
      #6
    \end{picture}%
  }}}
\def\cdagpicture(#1,#2)(#3,#4)[#5]#6{\bicolorhbox{}\dagpicture}


\mypictureunit=1em

$\dagpicture(3,4)(5,6)[0]{
   \dagput(0,0){0,0}
   \dagput(2,3){2,3}
}
$

% \dagpicture

\bicolorhbox{Hellp}


Hello
\end{document}
%%%
lualatex --output-format=dvi test1.tex

#*







http://repositorios.cpai.unb.br/ctan/graphics/pgf/contrib/tikzducks/tikzducks-doc.pdf
http://www.tug.org/TUGboat/tb39-1/tb121duck-tikz.pdf
https://www.mathcha.io/editor

https://www.reddit.com/r/orgmode/comments/ialsz3/using_tikz_in_orgmode/
https://dl.dropbox.com/s/t8ol05kun428i15/Tikz-in-Markup.pdf?dl=0
https://texample.net/tikz/examples/totoro/


https://news.ycombinator.com/item?id=28260875 Tikz.net – Graphics with TikZ in LaTeX (tikz.net)
http://www.tikzedt.org/
https://pgfplots.net/

https://www.tug.org/TUGboat/tb41-1/tb127duck-matrix.pdf

https://news.ycombinator.com/item?id=29721787 LaTeX Finite Automata and State Diagrams with Tikz (hayesall.com)
https://madebyevan.com/fsm/
https://hayesall.com/blog/latex-automata/ LaTeX Finite Automata and State Diagrams with Tikz





* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
ee_dofile "~/LUA/tikz1.lua"  -- (find-anchor "~/LUA/tikz1.lua")
tikzbody = tikz [=[
  [scale=0.5]
  \draw[color=gray!20] (0,0) grid (6,4);
  \draw[color=orange] (0,0)--(1,2)--(2,0)--cycle;
  \node at (3,2) {foo};
]=]
show()
* (tikz-show)





#  Local Variables:
#  coding:    utf-8-unix
#  modes:     (fundamental-mode emacs-lisp-mode latex-mode)
#  End: