Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on pict2e, curve2e, and friends.
#
# 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/pict2e.e>
#           or at <http://angg.twu.net/e/pict2e.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/>.
#
#######




# «.dotemacs»			(to "dotemacs")
# «.manual»			(to "manual")
# «.manual-src»			(to "manual-src")
# «.picture-mode»		(to "picture-mode")
# «.picture-mode-source2e»	(to "picture-mode-source2e")
# «.pict2e-vector»		(to "pict2e-vector")
# «.linethickness»		(to "linethickness")
# «.xpicture»			(to "xpicture")


# (find-es "tex" "pict2e")




#####
#
# pict2e-related stuff in my .emacs* files
# 2021aug09
#
#####

# «dotemacs»  (to ".dotemacs")
# (find-angg ".emacs.papers" "pict2e")




#####
#
# manual
# 2021aug09
#
#####

# «manual»  (to ".manual")
# (find-angg ".emacs.papers" "pict2e")
# (find-sh "locate pict2e")
# (find-sh "locate pict2e | grep 2019")
# (find-pict2epage 3 "\\usepackage")
# (find-pict2etext 3 "\\usepackage")
# (find-pict2epage 4 "of any thickness")
# (find-pict2etext 4 "of any thickness")
# (find-pict2epage 4 "\\oval [ rad ]")
# (find-pict2etext 4 "\\oval [ rad ]")
# (find-pict2epage 7 "2.3.4     Oval")
# (find-pict2etext 7 "2.3.4     Oval")
# (find-pict2epage 8 "2.4      Extensions")
# (find-pict2etext 8 "2.4      Extensions")
# (find-pict2etext 8 "2.4      Extensions" "\\polyline")
# (find-pict2epage 9 "\\circlearc")
# (find-pict2etext 9 "\\circlearc")
# (find-pict2epage 9 "2.4.1   Circle arcs")
# (find-pict2etext 9 "2.4.1   Circle arcs")
# (find-pict2epage 9 "\\Line( X1,Y1 )( X2,Y2 )")
# (find-pict2etext 9 "\\Line( X1,Y1 )( X2,Y2 )")
# (find-pict2epage 9 "\\polyline( X1,Y1 )( X2,Y2 ). . . ( Xn,Yn )")
# (find-pict2etext 9 "\\polyline( X1,Y1 )( X2,Y2 ). . . ( Xn,Yn )")
# (find-pict2epage 9 "\\polygon( X1,Y1 )( X2,Y2 ). . . ( Xn,Yn )")
# (find-pict2etext 9 "\\polygon( X1,Y1 )( X2,Y2 ). . . ( Xn,Yn )")
# (find-pict2epage 9 "\\polygon*( X1,Y1 )( X2,Y2 ). . . ( Xn,Yn )")
# (find-pict2etext 9 "\\polygon*( X1,Y1 )( X2,Y2 ). . . ( Xn,Yn )")





#####
#
# Downloading and compiling the source of the manual of pict2
# 2021aug09
#
#####

# «manual-src»  (to ".manual-src")
# https://ctan.org/pkg/pict2e?lang=en
# https://ctan.org/tex-archive/macros/latex/contrib/pict2e?lang=en
# https://github.com/rolfn/pict2e
# (find-git-links "https://github.com/rolfn/pict2e" "pict2es")

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

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/usrc/pict2e/
git clean -dfx
git reset --hard

pdflatex pict2e.dtx
pdflatex pict2e.dtx
pdflatex pict2e.dtx

# (code-c-d      "pict2es" "~/usrc/pict2e/")
# (code-pdf-page "pict2es" "~/usrc/pict2e/pict2e.pdf")
# (code-pdf-text "pict2es" "~/usrc/pict2e/pict2e.pdf")
# (find-pict2esfile "")
# (find-pict2esfile "pict2e.dtx" "\\linethickness{2.6\\unitlength}")
# (find-pict2espage)
# (find-pict2estext)
# (find-pict2espage 25 "Figure 10: Sketch of the path")
# (find-pict2estext 25 "Figure 10: Sketch of the path")
# (find-pict2esfile "pict2e.dtx"  "Sketch of the path")








#####
#
# The original picture mode
# 2021aug09
#
#####

# «picture-mode»  (to ".picture-mode")
# (find-es "tex" "picture-mode")
# (find-kopkadaly4page (+ 12 287)  "13.1   The picture environment")
# (find-kopkadaly4text (+ 12 287)  "13.1   The picture environment")
# (find-kopkadaly4page (+ 12 288) "\\begin{picture}(x dimen,y dimen)")
# (find-kopkadaly4text (+ 12 288) "\\begin{picture}(x dimen,y dimen)")
# (find-kopkadaly4page (+ 12 289) "\\put(x,y){pic elem}")
# (find-kopkadaly4text (+ 12 289) "\\put(x,y){pic elem}")
# (find-kopkadaly4page (+ 12 289) "\\multiput(x,y)(x,y){num}{pic elem}")
# (find-kopkadaly4text (+ 12 289) "\\multiput(x,y)(x,y){num}{pic elem}")
# (find-kopkadaly4page (+ 12 291) "\\makebox(x dimen,y dimen)[pos]{text}")
# (find-kopkadaly4text (+ 12 291) "\\makebox(x dimen,y dimen)[pos]{text}")
# (find-kopkadaly4page (+ 12 293) "\\line(x,y){length}")
# (find-kopkadaly4text (+ 12 293) "\\line(x,y){length}")
# (find-kopkadaly4page (+ 12 295) "\\vector(x,y){length}")
# (find-kopkadaly4text (+ 12 295) "\\vector(x,y){length}")
# (find-kopkadaly4page (+ 12 295) "\\circle{diameter}")
# (find-kopkadaly4text (+ 12 295) "\\circle{diameter}")
# (find-kopkadaly4page (+ 12 296) "\\oval(x dimen,y dimen)[part]")
# (find-kopkadaly4text (+ 12 296) "\\oval(x dimen,y dimen)[part]")
# (find-kopkadaly4page (+ 12 299) "\\qbezier[num](x1 ,y1 )(x2 ,y2 )(x3 ,y3 )")
# (find-kopkadaly4text (+ 12 299) "\\qbezier[num](x1 ,y1 )(x2 ,y2 )(x3 ,y3 )")
# (find-kopkadaly4page (+ 12 300) "Line thickness")
# (find-kopkadaly4text (+ 12 300) "Line thickness")
# (find-kopkadaly4page (+ 12 300) "\\newsavebox{\\sub pic name}")
# (find-kopkadaly4text (+ 12 300) "\\newsavebox{\\sub pic name}")
# (find-kopkadaly4page (+ 12 300) "\\savebox{\\sub pic name}(x dimen,y dimen)[pos]{sub pic}")
# (find-kopkadaly4text (+ 12 300) "\\savebox{\\sub pic name}(x dimen,y dimen)[pos]{sub pic}")
# (find-kopkadaly4page (+ 12 301) "13.1.6 Shifting a picture environment")
# (find-kopkadaly4text (+ 12 301) "13.1.6 Shifting a picture environment")
# (find-kopkadaly4page (+ 12 302) "\\begin{picture}(x dimen,y dimen)(x offset,y offset)")
# (find-kopkadaly4text (+ 12 302) "\\begin{picture}(x dimen,y dimen)(x offset,y offset)")




#####
#
# The source code for picture mode (in source2e)
# 2021aug09
#
#####

# «picture-mode-source2e»  (to ".picture-mode-source2e")
# (find-fline "/usr/share/texmf/fonts/source/public/latex/")
# (find-fline "/usr/share/texmf/fonts/source/public/latex/circle.mf")
# (find-fline "/usr/share/texmf/fonts/source/public/latex/lcircle.mf")
# (find-texbookpage (+ 11 389) "\\def\\point")
# (find-texbooktext            "\\def\\point")
# (find-texbooktext)
# (find-source2epage (+ 10 342) "58     Picture Mode")
# (find-source2etext (+ 10 342) "58     Picture Mode")
# (find-angg "LATEX/edrx.sty" "showboxdims")

\bhbox{%
\begin{picture}(8,5)(-3,-2)
  \Line(0,2)(0,0)(3,0)
\end{picture}%
}





#####
#
# My first attempts to implement vectors in picture and pict2e
# 2021aug09
#
#####

# «pict2e-vector»  (to ".pict2e-vector")
# From: (find-es "tex" "pict2e-vector")

# (find-LATEX "edrxpict.lua" "pict2evector")
# (find-kopkadaly4page (+ 12 295) "25 allowed slope pairs")
# (find-kopkadaly4text (+ 12 295) "25 allowed slope pairs")
# (find-kopkadaly4page (+ 12 295) "\\vector(x,y){length}")
# (find-kopkadaly4text (+ 12 295) "\\vector(x,y){length}")
# (find-pict2epage 4 "\\vector Slopes")
# (find-pict2etext 4 "\\vector Slopes")
# (find-pict2epage 4 "\\vector Slopes" "These restrictions are eliminated")
# (find-pict2etext 4 "\\vector Slopes" "These restrictions are eliminated")

* (eepitch-lua51)
* (eepitch-kill)
* (eepitch-lua51)
pict2evector = function (x0, y0, x1, y1)
    local dx, dy = x1 - x0, y1 - y0
    local f = function (dx, dy, len)
        return format("\\put(%.3f,%.3f){\\vector(%.3f,%.3f){%.3f}}",
          x0, y0, dx, dy, len)
      end
    if dx > 0 then return f(1, dy/dx, dx) end
    if dx < 0 then return f(-1, dy/dx, -dx) end
    if dx == 0 and dy > 1 then return f(0, 1, dy) end
    if dx == 0 and dy < 1 then return f(0, -1, -dy) end
    error()
  end
= pict2evector(0, 0, 0, 5)
= pict2evector(0, 0, 3, 4)
= pict2evector(0, 0, 4, 3)
= pict2evector(0, 0, 5, 0)
= pict2evector(0, 0, 4, -3)
= pict2evector(0, 0, 3, -4)
= pict2evector(0, 0, 0, -5)
= pict2evector(0, 0, -3, -4)
= pict2evector(0, 0, -4, -3)
= pict2evector(0, 0, -5, 0)
= pict2evector(0, 0, -4, 3)
= pict2evector(0, 0, -3, 4)

\def\Vector(#1,#2)(#3,#4){\expr{pict2evector(#1, #2, #3, #4)}}
\pu

\begin{picture}(10,10)
  \Vector(0,0)(0,5)
  \Vector(0,0)(3,4)
  \Vector(0,0)(4,3)
  \Vector(0,0)(5,0)
  \Vector(0,0)(4,-3)
  \Vector(0,0)(3,-4)
  \Vector(0,0)(0,-5)
  \Vector(0,0)(-3,-4)
  \Vector(0,0)(-4,-3)
  \Vector(0,0)(-5,0)
  \Vector(0,0)(-4,3)
  \Vector(0,0)(-3,4)
\end{picture}%





#####
#
# \linethickness
# 2021aug09
#
#####

# «linethickness»  (to ".linethickness")




#####
#
# xpicture
# 2021aug09
#
#####

# «xpicture»  (to ".xpicture")
# https://ctan.org/pkg/xpicture
# (find-tlsh "find * | sort | grep xpicture")
# (find-fline "/usr/local/texlive/2019/texmf-dist/doc/latex/xpicture/")
# (code-pdf-page "xpicturedoc" "/usr/local/texlive/2019/texmf-dist/doc/latex/xpicture/xpicture-doc.pdf")
# (code-pdf-text "xpicturedoc" "/usr/local/texlive/2019/texmf-dist/doc/latex/xpicture/xpicture-doc.pdf")
# (code-pdf-page "xpicture"    "/usr/local/texlive/2019/texmf-dist/doc/latex/xpicture/xpicture.pdf")
# (code-pdf-text "xpicture"    "/usr/local/texlive/2019/texmf-dist/doc/latex/xpicture/xpicture.pdf")
# (find-xpicturedocpage)
# (find-xpicturedoctext)
# (find-xpicturepage)
# (find-xpicturetext)






# https://www.ctan.org/pkg/pict2e
# https://www.ctan.org/pkg/diagmac2
# (find-fline    "/usr/share/doc/texlive-doc/latex/pict2e/README")
# (find-pdf-page "/usr/share/doc/texlive-doc/latex/pict2e/pict2e.pdf")
# (find-pdf-page "/usr/share/doc/texlive-doc/latex/pict2e/p2e-drivers.pdf")
# (find-fline "/usr/share/texlive/texmf-dist/tex/latex/pict2e/pict2e.cfg")
# (find-fline "/usr/share/texlive/texmf-dist/tex/latex/pict2e/pict2e.sty")

# Thickness:
# https://en.wikibooks.org/wiki/LaTeX/Picture
# Color:
# http://tex.stackexchange.com/questions/174910/pict2e-doesnt-draw-filled-circles-at-specified-point
#
# (find-es "tex" "color-packages")

# «pict2e-example» (to ".pict2e-example")

% \setlength{\unitlength}{10pt}
% \linethickness{0.075mm}
% (find-es "tex" "pict2e")
% (find-angg ".emacs.papers" "pict2e")

%L foo = "\\polyline"
%L for x=-4,4,0.1 do
%L   p = v(x, (math.sin(x)+1)*4)
%L   foo = foo..tostring(p)
%L end

\pu
     
\def\PoQai{\vcenter{\hbox{\unitlength=10pt%
\celllower=2.5pt%
\def\cellfont{}%
\begin{picture}(10,10)(-5,-1)
  \polygon(0,-1)(-5,4)(0,9)(5,4)
  % \polyline(0,-1)(-5,4)(0,9)(5,4)
  % \put(0,-1){\line(-1,1){5}}
  % \put(-5,4){\line(1,1){5}}
  % \put(0,9){\line(1,-1){5}}
  % \put(5,4){\line(-1,-1){5}}
  \put(0,8){\cell{?}}
  \put(-1,7){\cell{\cdot}}
  \put(1,7){\cell{\cdot}}
  \put(-2,6){\cell{\cdot}}
  \put(0,6){\cell{\cdot}}
  \put(2,6){\cell{\cdot}}
  \put(-3,5){\cell{\cdot}}
  \put(-1,5){\cell{(()}}
  \put(1,5){\cell{\cdot}}
  \put(3,5){\cell{(\!?\!)}}
  \put(-4,4){\cell{\cdot}}
  \put(-2,4){\cell{P}}
  \put(0,4){\cell{\cdot}}
  \put(2,4){\cell{\cdot}}
  \put(4,4){\cell{\cdot}}
  \put(-3,3){\cell{\cdot}}
  \put(-1,3){\cell{\cdot}}
  \put(1,3){\cell{Q}}
  \put(3,3){\cell{\cdot}}
  \put(-2,2){\cell{\cdot}}
  \put(0,2){\cell{(\&)}}
  \put(2,2){\cell{\cdot}}
  \put(-1,1){\cell{\cdot}}
  \put(1,1){\cell{\cdot}}
  \put(0,0){\cell{?}}
  \Line(0,1)(2,2)
  \put(0,3){\circle{1}}
  {
  \linethickness{0.2mm}
  \Line(0,2)(2,3)
  }
  \Line(0,3)(2,4)
  \put(0,3){\circle{0.8}}
  \put(0,3){\circle*{0.6}}
  \expr{foo}
\end{picture}}}}

$\PoQai$     
     


https://tex.stackexchange.com/questions/473917/dashed-line-in-picture-environment
https://ctan.math.illinois.edu/macros/latex/contrib/epic/picman.pdf
https://ctan.org/tex-archive/macros/latex/contrib/bxeepic?lang=en
https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/curve2e/curve2e.pdf
https://github.com/zr-tex8r/BXeepic









#  Local Variables:
#  coding:               utf-8-unix
#  End: