<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
                
        
        
                <div class="page" title="Page 21">
                        <div class="layoutArea">
                                <div class="column"><p class=""><span style="font-size: 12.000000pt; font-family: 'CMBX12'" class="">Bruce, read </span><font face="CMBX12" size="3" class="">this</font></p><p class=""><span style="font-size: 12.000000pt; font-family: 'CMBX12'" class="">3.6 Text
</span></p><p class=""><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">You have already seen how the </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">dotlabel </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">command can be used to draw a dot and a label in
the neighborhood of the dot. If you do not want the dot, simply use the </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">label </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">command:
</span></p><p class=""><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">label</span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">.suffix</span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">(</span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">string expression</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">, </span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">pair</span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">);
</span></p><p class=""><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">It uses of the same suffices as the </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">dotlabel </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">command to position the label relative to the
given pair. No suffix means that the label is printed at the specified location. The directives
</span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">rt </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">(</span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">right</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">), </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">urt </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">(</span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">upper right</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">), </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">top </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">(</span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">top</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">), </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">ulft </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">(</span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">upper left</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">), </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">lft </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">(</span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">left</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">), </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">llft </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">(</span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">lower left</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">), </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">bot
</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">(</span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">bottom</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">), </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">lrt </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">(</span><span style="font-size: 11.000000pt; font-family: 'CMTI10'" class="">lower right</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">) can be used to specify the relative position of the label to the given
pair. The distance from the pair to the label is set by the numeric variable </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">labeloffset</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">.
</span></p><p class=""><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">The commands </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">label </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">and </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">dotlabel </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">both use a string expression for the label text and
typeset it in the default font, which is likely to be </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">"cmr10" </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">and which can changed through
the variables </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">defaultfont </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">and </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">defaultscale</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">. For example,
</span></p>
                                        <pre class=""><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">    defaultfont := "tir";
    defaultscale := 12pt/fontsize(defaultfont);
</span></pre><p class=""><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">makes labels come out as Adobe Times-Roman at about 12 points.
</span></p><p class=""><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">Until now the string expression in a text command has only been a string delimited by double
quotes (optionally joined to another string via the concatenation operator </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">&</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">). But you can
also bracket the text with </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">btex </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">and </span><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">etex </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">(do not put it in quotes this time) and pass it to
T</span><span style="font-size: 11.000000pt; font-family: 'CMR10'; vertical-align: -2.000000pt" class="">E</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">X for typesetting. This allows you to use </span><span style="font-size: 11.000000pt; font-family: 'LOGO10'" class="">METAPOST </span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">in combination with T</span><span style="font-size: 11.000000pt; font-family: 'CMR10'; vertical-align: -2.000000pt" class="">E</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">X for building
complex labels. Let us begin with a simple example:
</span></p>
                                </div>
                        </div>
                        <div class="layoutArea"><div class="column"><pre class=""><span style="font-size: 11.000000pt; font-family: 'CMTT10'" class="">beginfig(1);
z0 = (0,0);  z1 = (sqrt(3)*cm,0);
z2 = (sqrt(3)*cm,1cm);
draw z0--z1--z2--cycle;
label.bot(btex $\sqrt{3}$ etex, 1/2[z0,z1]);
label.rt(btex 1 etex, 1/2[z1,z2]);
<a href="http://label.top" class="">label.top</a>(btex 2 etex, 1/2[z0,z2]);
endfig;
end;
</span></pre>
                                </div>
                        </div>
                        <img alt="page21image655462592" apple-inline="yes" id="848CB79B-FEBA-4A7E-91D9-D98A5DB50DF4" src="cid:F424CEE5-E0D6-42E8-B976-D928EC7D3F5C@lan" class="">
                        <img alt="page21image655462928" apple-inline="yes" id="92C8E7B3-6A1A-4F8D-8A57-2E306B9DB0E6" src="cid:8EB5397C-E1D5-42AE-8AF1-49F3928E3132@lan" class="">
                </div><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dave Clucas<br class=""><a href="mailto:daveclucas@icloud.com" style="font-family: Helvetica; font-style: normal; font-weight: normal;" class="">dave.clucas@icloud.com</a><br class=""><br class=""><span style="font-size: 14px;" class=""><b class="">Exploring the World</b></span><span style="font-family: Helvetica; font-style: normal; font-weight: normal;" class=""> - One cave at a time<br class=""><br class=""></span></div></div></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 30 May 2018, at 11:00, <a href="mailto:therion-request@speleo.sk" class="">therion-request@speleo.sk</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Send Therion mailing list submissions to<br class=""><span class="Apple-tab-span" style="white-space:pre">   </span><a href="mailto:therion@speleo.sk" class="">therion@speleo.sk</a><br class=""><br class="">To subscribe or unsubscribe via the World Wide Web, visit<br class=""><span class="Apple-tab-span" style="white-space:pre">   </span>https://mailman.speleo.sk/listinfo/therion<br class="">or, via email, send a message with subject or body 'help' to<br class=""><span class="Apple-tab-span" style="white-space:pre">    </span>therion-request@speleo.sk<br class=""><br class="">You can reach the person managing the list at<br class=""><span class="Apple-tab-span" style="white-space:pre">       </span>therion-owner@speleo.sk<br class=""><br class="">When replying, please edit your Subject line so it is more specific<br class="">than "Re: Contents of Therion digest..."<br class=""><br class=""><br class="">Today's Topics:<br class=""><br class="">   1. Defining a user symbol that contains a short text string<br class="">      (Bruce Mutton)<br class=""><br class=""><br class="">----------------------------------------------------------------------<br class=""><br class="">Message: 1<br class="">Date: Tue, 29 May 2018 22:14:55 +1200<br class="">From: "Bruce Mutton" <bruce@tomo.co.nz><br class="">To: "'List for Therion users'" <therion@speleo.sk><br class="">Subject: [Therion] Defining a user symbol that contains a short text<br class=""><span class="Apple-tab-span" style="white-space:pre">   </span>string<br class="">Message-ID: <000401d3f735$e5d86d90$b18948b0$@tomo.co.nz><br class="">Content-Type: text/plain; charset="utf-8"<br class=""><br class="">Good evening<br class=""><br class="">I'd like to make a user defined symbol that is simply an ascii text string.<br class="">A quick and dirty adhoc symbol if you like. If I was going to be fancy, I<br class="">would add a box around it like in the example of Dave Clucas that I have<br class="">copied and modified below.<br class=""><br class=""><br class=""><br class="">So rather than defining the shape of the omega symbol using metapost, I'd<br class="">like to hard code an ascii character, say "E".<br class=""><br class="">The yellow shaded text below needs to be replaced with some simple metapost,<br class="">but I am too lazy to research and trial things.<br class=""><br class="">I notice that other examples tend to use a copy of the p_label definition,<br class="">and modify that.  I would rather not head down that route, as then my custom<br class="">code would overwrite potential future improvements to Therion's source code.<br class=""><br class=""><br class=""><br class=""><br class="">My plan is not really to create an alternative to the entrance symbol, but<br class="">rather to create a template quick and dirty creation of single use or<br class="">unusual symbols, that can be enumerated in the legend.<br class=""><br class=""><br class=""><br class="">Does anyone happen to know how to modify the code below to do what I<br class="">describe?<br class=""><br class=""><br class=""><br class="">Thanks<br class=""><br class="">Bruce<br class=""><br class=""><br class=""><br class=""><br class=""><https://therion.speleo.sk/wiki/_detail/metapost:entrancesymbol.png?id=metap<br class="">ost> <br class=""><br class="">code metapost<br class=""><br class="">def p_u_ent (expr pos,theta,sc,al)=<br class=""><br class="">  U:=(.2u,.5u);<br class=""><br class="">  T:=identity aligned al rotated theta scaled sc shifted pos;<br class=""><br class="">  path p;<br class=""><br class="">  p = (-.3u,-.25u) -- (-.2u,-.25u){dir 135} .. (0u, .25u) .. {dir<br class="">225}(.2u,-.25u) -- (.3u,-.25u); % define omega shape<br class=""><br class="">  thdraw p withpen PenA;  % draw it with fat pen<br class=""><br class="">  thdraw unitsquare scaled u shifted (-0.5u,-0.5u) rotated 45 withpen PenD;<br class="">% diagonal box with thin pen<br class=""><br class="">enddef;<br class=""><br class=""><br class=""><br class="">initsymbol("p_u_ent")<br class=""><br class="">def p_u_ent_legend =<br class="">         p_u_ent( <I forget where to find code for point drawing in the<br class="">legend> )<br class="">enddef;<br class="">endcode<br class="">text en "point u:ent" "E for entrance" #text to appear in legend<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">-------------- next part --------------<br class="">An HTML attachment was scrubbed...<br class="">URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20180529/7d16045b/attachment-0001.html><br class="">-------------- next part --------------<br class="">A non-text attachment was scrubbed...<br class="">Name: image001.png<br class="">Type: image/png<br class="">Size: 8640 bytes<br class="">Desc: not available<br class="">URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20180529/7d16045b/attachment-0001.png><br class=""><br class="">------------------------------<br class=""><br class="">Subject: Digest Footer<br class=""><br class="">_______________________________________________<br class="">Therion mailing list<br class="">Therion@speleo.sk<br class="">https://mailman.speleo.sk/listinfo/therion<br class=""><br class=""><br class="">------------------------------<br class=""><br class="">End of Therion Digest, Vol 149, Issue 34<br class="">****************************************<br class=""></div></div></blockquote></div><br class=""></body></html>