Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
/*
 * This file:
 *   http://anggtwu.net/MAXIMA/2025-1-leithold-reta.mac.html
 *   http://anggtwu.net/MAXIMA/2025-1-leithold-reta.mac
 *          (find-angg "MAXIMA/2025-1-leithold-reta.mac")
 * Author: Eduardo Ochs <eduardoochs@gmail.com>
 *
 * (defun e () (interactive) (find-angg "MAXIMA/2025-1-leithold-reta.mac"))
 * (c2m251carrop 4 "caso-particular-fig")
 * (c2m251carroa   "caso-particular-fig")
 *
 * «.topdf_dimensions»	(to "topdf_dimensions")
 * «.mylabel»		(to "mylabel")
*/


/* (find-myqdraw "myqdraw3.mac")
 * (find-myqdraw "topdf1.mac" "topdf-modes")
*/
load_myqdraw();

/* «topdf_dimensions»  (to ".topdf_dimensions")
 * See: (find-es "maxima" "leo-dimensions")
*/
topdf_dimensions () := [xmax-xmin,ymax-ymin]*120;
topdf_dimensions () := [xmax-xmin,ymax-ymin]*80;
topdf_terminalpdf() :=
  more(font="Arial", font_size=16,
       dimensions=topdf_dimensions(),
       terminal=pdf, file_name=topdf_abc());

/* «mylabel»  (to ".mylabel")
*/
mylabel_(P,text,[opts]) :=
  myapply_fl('label, [text,P[1],P[2]], opts)$
mylabel(P,adj,text,[opts]) :=
  [label_align(adj[1]),
   mylabel_(P+adj[2],text,[opts])]$

tow(P,Q,t) := P+t*(Q-P);

define_other_points() := (
              P2:[x2,y2],
  P1:[x1,y1],  R:[x2,y1],
  P0 : tow(P1,P2, -0.2),
  P3 : tow(P1,P2,  1.2),
  PH : tow(P1,R,   0.5),
  PV : tow(P2,R,   0.5)
  )$

define_labels_abstract() := (
  P1_label : "P1=(x1,y1)",
  P2_label : "P2=(x2,y2)",
   R_label :  "R=(x2,y1)",
  PH_label :   "Δx=x2-x1",
  PV_label :   "Δy=y2-y1"
  )$

define_labels_concrete() := (
  P1_label : concat("P1=(", x1, ",", y1, ")"),
  P2_label : concat("P2=(", x2, ",", y2, ")"),
   R_label : concat( "R=(", x2, ",", y1, ")"),
  PH_label : concat( "Δx=", x2, "-", x1),
  PV_label : concat( "Δy=", y2, "-", y1)
  )$

leithold_reta() := [
  pts([P0,  P3], pt(0), pj(2), pc(orange)),    /* diagonal */
  pts([P1,R,P2], ps(1), pj(2), pc(orange)),    /* _| */
  mylabel(P1, P1_adj, P1_label),
  mylabel(P2, P2_adj, P2_label),
  mylabel(R,   R_adj,  R_label),
  mylabel(PH, PH_adj, PH_label),
  mylabel(PV, PV_adj, PV_label)
  ]$


/*
* (eepitch-maxima)
* (eepitch-kill)
* (eepitch-maxima)
** (find-fline "~/LATEX/2025-1-C2/" "ict_")
load("2025-1-leithold-reta.mac");
[topdf_a,topdf_b,topdf_c,topdf_n] : ["~/LATEX/", "2025-1-C2/", "ict", 0];
myqdrawp_to_new_pdf();
myqdrawp_to_screen();

[xmin,ymin, xmax,ymax] : [-1,-1,12,10];
[x1,y1] : [3,2];
[x2,y2] : [7,8];

P1_adj : ['r,[-.1,.1]];
P2_adj : ['r,[-.1,.1]];
 R_adj : ['l,[ .1,-.1]];
PH_adj : ['c,[0,-.3]];
PV_adj : ['l,[.2,0]];

define_other_points();
define_labels_abstract();
myqdrawp(xyrange(), leithold_reta());

** (find-fline "~/LATEX/2025-1-C2/")

define_other_points();
define_labels_concrete();
myqdrawp(xyrange(), leithold_reta());

[x1,y1] : [4,3];
[x2,y2] : [8,6];

define_other_points();
define_labels_abstract();
myqdrawp(xyrange(), leithold_reta());

define_other_points();
define_labels_concrete();
myqdrawp(xyrange(), leithold_reta());

topdf_dimensions () := [xmax-xmin,ymax-ymin]*90;
[x1,y1] : [2,2];
[x2,y2] : [6,6];
[xmin,ymin, xmax,ymax] : [0,0, 8,8];
[topdf_a,topdf_b,topdf_c,topdf_n] : ["~/LATEX/", "2025-1-C2/", "ict", 4];

define_other_points();
define_labels_abstract();
** myqdraw (xyrange(), leithold_reta());
   myqdrawp(xyrange(), leithold_reta(), cut(all));

* (ee-kill-buffer "ict_002.pdf")
* (ee-kill-buffer "ict_004.pdf")
(find-2a '(find-fline "~/LATEX/2025-1-C2/ict_002.pdf")
         '(find-fline "~/LATEX/2025-1-C2/ict_004.pdf"))

(find-fline "~/LATEX/2025-1-C2/")

** Leit1p17
** file:///home/edrx/tmp/leithold-pt-cap1.pdf

*/