Skip to content

Commit

Permalink
another byrne.mp and byrne.sty update
Browse files Browse the repository at this point in the history
  • Loading branch information
jemmybutton committed Sep 17, 2024
1 parent ce04fe3 commit f025594
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions byrne.mp
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,9 @@ vardef byCircleABCDefine@#(suffix a, b, c)(expr col, dp, th, s) =
if str @# = "":
byCircleABCDefine.scantokens(str a & str b & str c)(a, b, c)(col, dp, th, s)
else:
if mainPictureMode:
appendList(allCirclesList, str @#, 1, true);
fi;
save o, r;
pair o;
numeric r;
Expand Down Expand Up @@ -3402,6 +3405,24 @@ vardef generateAngleSynonyms =
fi;
enddef;

vardef generateCircleSynonyms =
save pointName, originalName;
string pointName[], originalName;
if string allCirclesList:
forsuffixes i=scantokens(allCirclesList):
originalName := str i;
pointName0 := getAttribute("circle", "AName", originalName);
pointName1 := getAttribute("circle", "BName", originalName);
pointName2 := getAttribute("circle", "CName", originalName);
setAttribute("circle", "Synonym", pointName1 & pointName2 & pointName0, originalName);
setAttribute("circle", "Synonym", pointName2 & pointName0 & pointName1, originalName);
setAttribute("circle", "Synonym", pointName0 & pointName2 & pointName1, originalName);
setAttribute("circle", "Synonym", pointName1 & pointName0 & pointName2, originalName);
setAttribute("circle", "Synonym", pointName2 & pointName1 & pointName0, originalName);
endfor;
fi;
enddef;

vardef sortPointAnglesList (expr anglesListToSort) =
save preList, postList, nPre, nPost, isSorted, value, firstValue, lastValue, rv;
string preList, postList, rv;
Expand Down
1 change: 1 addition & 0 deletions byrne.sty
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ end
#3
scaleFactor := \sfA;
generateAngleSynonyms;
generateCircleSynonyms;
generateLineSynonyms;
stopMainPictureMode;
);
Expand Down

0 comments on commit f025594

Please sign in to comment.