Hello,
unfortunately this does not help.
The standard "?"-symbol does show like expected.

It is just the extension code not having the stated effect if showing the text. As such, i just want to override the default p_continuation symbol with the code showing the text, and only so when i choose it by including the layout option.

It just looks like the "if" clause in the code is not run properly, however it is correctly included in the parse because i can break the compile process when introducing garbage code there.

Am 2018-12-22 16:01, schrieb alastair gott:
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.

[email protected],
M: 07931779380.

-------------------------

FROM: Therion <[email protected]> on behalf of Benedikt
Hallinger via Therion <[email protected]>
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&amp;data=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636810745412347133&amp;sdata=WEN25vHGKS75bd2iOmYY8N3phCECVrGVoznqMnrqC20%3D&amp;reserved=0
[1]
b)
https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarcocorvi.altervista.org%2Fcaving%2Ftbe%2Fm_05%2Fm_054.htm&amp;data=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636810745412347133&amp;sdata=3FtoNdR%2BuWBMfXX3hZtoNaKunH9%2FrMfyeyyrE5TXdzw%3D&amp;reserved=0
[2]
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
[email protected]
https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.speleo.sk%2Flistinfo%2Ftherion&amp;data=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636810745412347133&amp;sdata=0bzsKCPTIBGAWAM4vi5hQhuOhqBghQppJ1j%2BCv1DnLI%3D&amp;reserved=0


Links:
------
[1]
https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftherion.speleo.sk%2Fsamples.doc%2F60.html&amp;amp;data=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636810745412347133&amp;amp;sdata=WEN25vHGKS75bd2iOmYY8N3phCECVrGVoznqMnrqC20%3D&amp;amp;reserved=0
[2]
https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarcocorvi.altervista.org%2Fcaving%2Ftbe%2Fm_05%2Fm_054.htm&amp;amp;data=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636810745412347133&amp;amp;sdata=3FtoNdR%2BuWBMfXX3hZtoNaKunH9%2FrMfyeyyrE5TXdzw%3D&amp;amp;reserved=0
_______________________________________________
Therion mailing list
[email protected]
https://mailman.speleo.sk/listinfo/therion

Reply via email to