[Therion] Showing qestion mark texts broken?

alastair gott alastairgott at hotmail.com
Sat Dec 22 16:01:31 CET 2018


Hi Benedikt,

Adding a continuation ? should be a standard use of a TH2 file, check in:
points/All Symbols/Possible continuation/Type [continuation].

This should produce a ?, even without the code to produce the text as well. If it's not producing a ? then there's something going wrong before.

I've never tried adding continuation text, but I assume you're adding the text to the options box (much like producing a label). Options: -text "water too cold to continue" -code A

If you're not adding this to the options then this is what is causing your problems.

If it doesn't solve your problems, then we were having fun defining new rocks and Debris a couple of months ago. To insert these new icons, there were a few steps to go through.

The test example is on Wookey's website, so I can't take credit for that, but it does just reduce the problem of defining new symbols to a simple file, so is a good example for you to look at and work out. http://wookware.org/surveys/therion/index.html

In the Config file Wookey and Andrew defined the symbol in the layout. "Symbol-assign area debris TEST"

Then Initiated the Symbol within the Metapost wrapping "initsymbol ("a_debris_TEST")

and then defined the symbol.

At present I think you may have only defined the symbol. So i'd advise also trying to define your continuation as def p_continuation_TEST(expr pos,theta,sc,al) =

Then above assigning the symbol
symbol-assign point continuation TEST

and then within your metapost wrapper initsymbol ("p_continuation_TEST")

By doing this, you should be able to turn on and off your "test" point continuation by # the symbol-assign line. as Wookey and Andrew did below for the AUT and SKBB blocks.

Do I make any sense?


---layout from wookeys Debris and rock----
layout local
scale 1 100​
symbol-set NZSS​
symbol-hide group cave-centreline​
​
#copy blocksAUT​
#copy blocksSKBB​
​
symbol-assign area debris TEST​
symbol-assign area blocks TEST​
#symbol-assign area blocks AUT​
#symbol-assign area blocks SKBB​
​
​
code metapost​
​
initsymbol ("a_debris_TEST");​
initsymbol ("a_blocks_TEST");​
​
def a_blocks_TEST (expr p) =​
   T:=identity;​
  symbol_distance:=1.6;​
  scale_factor:= 0.8;​
  pickup PenC;​
  path q, qq; q = bbox p;​
  pair outside;​
  outside:= ulcorner q + up;​
  picture tmp_pic; ​
  uu := max(u, (xpart urcorner q - xpart llcorner q)/100, (ypart urcorner q - ypart     llcorner q)/100);​
  tmp_pic := image(​
     for i = xpart llcorner q step symbol_distance*uu until xpart urcorner q:​
        for j = ypart llcorner q step symbol_distance*uu until ypart urcorner q:​
           qq := punked (((-.5uu,-.5uu)--(.5uu,-.5uu)--(1.05uu,0.05uu)--(.5uu,.5uu)--(-.5uu,.5uu)--cycle) ​
           randomized (uu/2))​
           scaled (uniformdeviate(0.7)+scale_factor )​
           rotated uniformdeviate(360) ​
           shifted ((i,j) randomized 0.75uu);​
           if xpart (p intersectiontimes qq) < 0:​
             if pointinside((i,j),p,outside):​
               thclean qq;​
               thdraw qq;​
             fi;​
           else:​
             qq:= qq scaled (uniformdeviate(.2)+.5 )​
             if xpart (p intersectiontimes qq) < 0:​
               if pointinside((i,j),p,outside):​
                 thclean qq;​
                 thdraw qq;​
               fi;​
             fi;​
           fi;​
        endfor;  ​
     endfor;​
  );​
  clip tmp_pic to p;​
  drawoptions();​
  draw tmp_pic;​
enddef;  ​
​
​
def a_debris_TEST (expr p) =​
      T:=identity;​
      pickup PenC;​
      path q, qq; q = bbox p;​
      picture tmp_pic; ​
      tmp_pic := image(​
        for i = xpart llcorner q step u until xpart urcorner q:​
         for j = ypart llcorner q step u until ypart urcorner q:​
            qq := punked ​
  (((-.2u,-.2u)--(.2u,-.2u)--(.2u,.2u)--(-.2u,.2u)--cycle) ​
         randomized (u/2))​
               rotated uniformdeviate(360) ​
               shifted ((i,j) randomized u);​
       if xpart (p intersectiontimes qq) < 0:​
        thclean qq;​
        thdraw qq;​
       fi;​
          endfor;  ​
        endfor;​
      );​
      clip tmp_pic to p;​
      draw tmp_pic;​
enddef;​
    ​
endcode​
​
​
endlayout​




Regards,
Alastair Gott.

AlastairGott at hotmail.com,
M: 07931779380.
________________________________
From: Therion <therion-bounces at speleo.sk> on behalf of Benedikt Hallinger via Therion <therion at speleo.sk>
Sent: 22 December 2018 11:12
To: List for Therion users
Cc: Benedikt Hallinger
Subject: [Therion] Showing qestion mark texts broken?

Hi,
i try to add a layout for showing the question mark texts.
For this i tried the additions from the websites:
a) https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftherion.speleo.sk%2Fsamples.doc%2F60.html&data=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636810745412347133&sdata=WEN25vHGKS75bd2iOmYY8N3phCECVrGVoznqMnrqC20%3D&reserved=0
b) https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarcocorvi.altervista.org%2Fcaving%2Ftbe%2Fm_05%2Fm_054.htm&data=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636810745412347133&sdata=3FtoNdR%2BuWBMfXX3hZtoNaKunH9%2FrMfyeyyrE5TXdzw%3D&reserved=0
but neither seems to work. a) produces no change and b) triggers a
compile error :(


This is a) implemented in my layout.conf (taken from the web)
---------------------------
layout showContinationText.inc
code metapost
     def p_continuation(expr pos,theta,sc,al) =

       % draw question mark above station:
       % rotation=0, scaling=1, offset=(0,2)
       %
       p_continuation_UIS(pos, 0.0, 1.0, (0, 2) );

       % if text attribute is set
       if known ATTR_text:
         % set labeling color to red
         push_label_fill_color(1.0, 0.0, 0.0);

         % draw filled label with text below station
         p_label.bot(ATTR__text, pos shifted (0,-0.5u), 0.0, 8);

         % restore original labeling color
         pop_label_fill_color;
       fi;
     enddef;
   endcode
endlayout
--------------------

and my thconfig export command includes this: "-layout
showContinationText.inc", which in other cases is enough to activate it.
The layout file is also loaded, i checked that.
However, no text is shown...

What am i doing wrong?


With best regards and happy christmas!
_______________________________________________
Therion mailing list
Therion at speleo.sk
https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.speleo.sk%2Flistinfo%2Ftherion&data=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636810745412347133&sdata=0bzsKCPTIBGAWAM4vi5hQhuOhqBghQppJ1j%2BCv1DnLI%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20181222/81386d16/attachment.htm>


More information about the Therion mailing list