<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.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;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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>Thanks to Dave I did a little reading, and have come up with a partial solution.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>In the screenshot below, the top line shows that …<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'>point 0 0 u:graffiti -align b (or centre or t)<o:p></o:p></span></p><p class=MsoNormal>works correctly.<o:p></o:p></p><p class=MsoNormal>The second line shows that -scale xs, s, l and xl work OK for the circle and box, but not the label.<o:p></o:p></p><p class=MsoNormal>Similar for -orientation (rotation) on the third line.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>For some reason the centre of the scale and rotation transformation is in the wrong place for the label.  There is something I am doing wrong with the label part of the symbol definition.  Any ideas?<o:p></o:p></p><p class=MsoNormal><img width=519 height=499 style='width:5.4062in;height:5.1979in' id="_x0000_i1027" src="cid:image002.png@01D3F923.EB9357F0"><o:p></o:p></p><p class=MsoNormal><img width=338 height=64 style='width:3.5208in;height:.6666in' id="Picture_x0020_2" src="cid:image003.png@01D3F924.AC8D8110"><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My code so far looks like…<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><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='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'>def p_u_graffiti (expr pos,theta,sc,al)=<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><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='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><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='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><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='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'>  %# pos and al work fine in label below, but theta and sc transformed about far off point???<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'>  label (btex Gr etex, pos) rotated theta scaled sc aligned al;  % btex and etex are wrappers around code to be process by tex<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><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='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><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='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'>  thdraw fullcircle scaled u withpen PenD;  <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><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='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><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='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'>initsymbol("p_u_graffiti")<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:7.45pt;margin-bottom:7.5pt;margin-left:7.45pt;background:whitesmoke;word-break:break-all'><span style='font-size:10.0pt;font-family:Consolas;color:#333333;mso-fareast-language:EN-NZ'>text en "point u:graffiti" "Historic graffiti"<o:p></o:p></span></p><p class=MsoNormal>Bruce<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='mso-fareast-language:EN-NZ'>From:</span></b><span lang=EN-US style='mso-fareast-language:EN-NZ'> Bruce Mutton <bruce@tomo.co.nz> <br><b>Sent:</b> Tuesday, 29 May 2018 10:15 PM<br><b>To:</b> 'List for Therion users' <therion@speleo.sk><br><b>Subject:</b> Defining a user symbol that contains a short text string<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><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='border:solid #CCCCCC 1.0pt;padding:7.0pt 7.0pt 7.0pt 7.0pt'><p class=MsoNormal style='margin-bottom:7.5pt;background:whitesmoke;word-break:break-all'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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'><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>