Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
% (find-angg "LATEX/2018pict2e.tex") % (defun c () (interactive) (find-LATEXsh "lualatex -record 2018pict2e.tex")) % (defun d () (interactive) (find-xpdfpage "~/LATEX/2018pict2e.pdf")) % (defun b () (interactive) (find-zsh "bibtex 2018pict2e; makeindex 2018pict2e")) % (defun e () (interactive) (find-LATEX "2018pict2e.tex")) % (defun u () (interactive) (find-latex-upload-links "2018pict2e")) % (find-xpdfpage "~/LATEX/2018pict2e.pdf") % (find-sh0 "cp -v ~/LATEX/2018pict2e.pdf /tmp/") % (find-sh0 "cp -v ~/LATEX/2018pict2e.pdf /tmp/pen/") % file:///home/edrx/LATEX/2018pict2e.pdf % file:///tmp/2018pict2e.pdf % file:///tmp/pen/2018pict2e.pdf % http://angg.twu.net/LATEX/2018pict2e.pdf \documentclass[oneside]{book} \usepackage[colorlinks]{hyperref} % (find-es "tex" "hyperref") %\usepackage[latin1]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{pict2e} \usepackage{color} % (find-LATEX "edrx15.sty" "colors") \usepackage{colorweb} % (find-es "tex" "colorweb") %\usepackage{tikz} % % (find-dn6 "preamble6.lua" "preamble0") \usepackage{proof} % For derivation trees ("%:" lines) \input diagxy % For 2D diagrams ("%D" lines) %\xyoption{curve} % For the ".curve=" feature in 2D diagrams % \usepackage{edrx15} % (find-angg "LATEX/edrx15.sty") \input edrxaccents.tex % (find-angg "LATEX/edrxaccents.tex") \input edrxchars.tex % (find-LATEX "edrxchars.tex") \input edrxheadfoot.tex % (find-dn4ex "edrxheadfoot.tex") \input edrxgac2.tex % (find-LATEX "edrxgac2.tex") % \begin{document} \catcode`\^^J=10 \directlua{dednat6dir = "dednat6/"} \directlua{dofile(dednat6dir.."dednat6.lua")} \directlua{texfile(tex.jobname)} \directlua{verbose()} \directlua{output(preamble1)} \def\expr#1{\directlua{output(tostring(#1))}} \def\eval#1{\directlua{#1}} \def\pu{\directlua{pu()}} \directlua{dofile "edrxtikz.lua"} % (find-LATEX "edrxtikz.lua") \directlua{dofile "edrxpict.lua"} % (find-LATEX "edrxpict.lua") %L V.__tostring = function (v) return format("(%.3f,%.3f)", v[1], v[2]) end % (find-es "tex" "pict2e") % (find-es "tex" "picture-mode") % (find-pict2epage 3 "\\usepackage") % (find-pict2etext 3 "\\usepackage") \edrxcolors \unitlength=10pt % (find-es "tex" "picture-mode") % (find-es "tex" "picture-mode" "multiput") % (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-es "tex" "vcenter") \def\C{\circle*{0.5}} a \bhbox{% \begin{picture}(4,6)(-1,-2) \thinlines {\color{blue} % Grid: \multiput(-1,-2)(1,0)5{\line(0,1){6}} % vertical lines \multiput(-1,-2)(0,1)7{\line(1,0){4}} % horizontal lines } \thicklines \Line(-1,-2)(3,4) % Diagonal \Line(-1, 0)(3,0) % Horizontal axis \Line( 0,-2)(0,4) % Vertical axis \put ( 1, 2){\C} \put ( 1, 0){\oval[0.5](4,2)} \end{picture}% } b \bhbox{% \begin{picture}(4,2)(-2,-1) \put(0,0){\oval[0.5](4,2)} \end{picture}% } c % % \def\myvcenter#1{$\vcenter{\hbox{#1}}$}% \def\myvcenter#1{\ensuremath{\vcenter{\hbox{#1}}}}% % \bhbox{% \myvcenter{% \begin{picture}(6,2)(-3,-1) \put(0,0){\oval[0.5](6,2)} \end{picture}% }% } d % Lua-less version % Use like this: \myoval(4,6)(2,3)[0.5] % Args are: (diamx,diamy)(radx,rady)[curve] \def\myoval(#1,#2)(#3,#4)[#5]{% \myvcenter{% \begin{picture}(#1,#2)(-#3,-#4) \put(0,0){\oval[#5](#1,#2)} \end{picture}% }} e \bhbox{\myoval(4,6)(2,3)[0.5]} f % (find-LATEXgrep "grep -nH -e place *.tex") % (find-LATEXgrep "grep -nH -e midpoint *.tex") %D diagram ?? %D 2Dx 100 +30 %D 2D 100 A RA %D 2D %D 2D +20 LB B %D 2D %D %D (( A RA -> %D B LB -> %D A LB midpoint .TeX= \myoval(4,6)(2,3)[0.5] place %D B RA midpoint .TeX= HI place %D %D )) %D enddiagram %D $$\pu \diag{??} $$ %L -- Lua version, obsolete %L mypictoval = function (radx, rady, curve) %L fmt = [[ %L \myvcenter{%% %L \begin{picture}(%d,%d)(%d,%d) %L \put(0,0){\oval[%d](%d,%d)} %L \end{picture}%% %L }]] %L return format(fmt, 2*radx, 2*rady, -radx, -rady, curve, 2*radx, 2*rady) %L end %L print(mypictoval(3, 2, 0.5)) \pu \def\mypictoval#1{\expr{mypictoval(#1)}} \bhbox{hello} \end{document} % Local Variables: % coding: utf-8-unix % End: