<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";
mso-fareast-language:EN-NZ;}
.MsoChpDefault
{mso-style-type:export-only;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-NZ link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Good evening<o:p></o:p></p><p class=MsoNormal>I’d like to make a user defined symbol that is simply an ascii text string. A quick and dirty adhoc symbol if you like. If I was going to be fancy, I would add a box around it like in the example of Dave Clucas that I have copied and modified below.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So rather than defining the shape of the omega symbol using metapost, I’d like to hard code an ascii character, say “E”.<o:p></o:p></p><p class=MsoNormal>The yellow shaded text below needs to be replaced with some simple metapost, but I am too lazy to research and trial things.<o:p></o:p></p><p class=MsoNormal>I notice that other examples tend to use a copy of the p_label definition, and modify that. I would rather not head down that route, as then my custom code would overwrite potential future improvements to Therion’s source code. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My plan is not really to create an alternative to the entrance symbol, but rather to create a template quick and dirty creation of single use or unusual symbols, that can be enumerated in the legend.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Does anyone happen to know how to modify the code below to do what I describe?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks<o:p></o:p></p><p class=MsoNormal>Bruce<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:7.5pt;background:white'><a href="https://therion.speleo.sk/wiki/_detail/metapost:entrancesymbol.png?id=metapost" title=""metapost:entrancesymbol.png" "><span style='font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#337AB7;mso-fareast-language:EN-NZ;text-decoration:none'><img border=0 width=114 height=102 style='width:1.1875in;height:1.0625in' id="Picture_x0020_1" src="cid:image001.png@01D3F794.A6E396F0" alt="https://therion.speleo.sk/wiki/_media/metapost:entrancesymbol.png"></span></a><span style='font-size:10.5pt;font-family:"Helvetica",sans-serif;color:#333333;mso-fareast-language:EN-NZ'><o:p></o:p></span></p><div style='mso-element:para-border-div;border:solid #CCCCCC 1.0pt;padding:7.0pt 7.0pt 7.0pt 7.0pt;background:whitesmoke'><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'>code metapost<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'>def p_u_ent (expr pos,theta,sc,al)=<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'> U:=(.2u,.5u);<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'> T:=identity aligned al rotated theta scaled sc shifted pos;<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'> <span style='background:yellow;mso-highlight:yellow'>path p;<o:p></o:p></span></span></p><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;background:yellow;mso-highlight:yellow;mso-fareast-language:EN-NZ'> p = (-.3u,-.25u) -- (-.2u,-.25u){dir 135} .. (0u, .25u) .. {dir 225}(.2u,-.25u) -- (.3u,-.25u); % define omega shape<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;background:yellow;mso-highlight:yellow;mso-fareast-language:EN-NZ'> thdraw p withpen PenA; % draw it with fat pen</span><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'><o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'> thdraw unitsquare scaled u shifted (-0.5u,-0.5u) rotated 45 withpen PenD; % diagonal box with thin pen<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'>enddef;<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'><o:p> </o:p></span></p><pre style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-family:Consolas;color:#333333'>initsymbol("p_u_ent")<o:p></o:p></span></pre><pre style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-family:Consolas;color:#333333'> <o:p></o:p></span></pre><pre style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-family:Consolas;color:#333333'>def p_u_ent_legend =<o:p></o:p></span></pre><pre style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-family:Consolas;color:#333333'> p_u_ent( <span style='background:yellow;mso-highlight:yellow'><I forget where to find code for point drawing in the legend></span> )<o:p></o:p></span></pre><pre style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-family:Consolas;color:#333333'>enddef;<o:p></o:p></span></pre><pre style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-family:Consolas;color:#333333'>endcode<o:p></o:p></span></pre><pre style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-family:Consolas;color:#333333'>text en "point u:ent" "E for entrance" #text to appear in legend<o:p></o:p></span></pre><pre style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-family:Consolas;color:#333333'><o:p> </o:p></span></pre><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all;border:none;padding:0cm'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'><o:p> </o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>