Re: [Therion] Showing qestion mark texts broken?
Hello, just another question; how can i make the questionmark appear bold and red? > Am 04.01.2019 um 12:19 schrieb Benedikt Hallinger : > > Hi again, > it was indeed the Underscore. > > This works (therion 5.4.1): > > 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; > --- > > Thank you everybody! > > > > Am 2018-12-26 23:20, schrieb Benedikt Hallinger via Therion: >> Forwarding an off list mail to me that explains >> Am 2018-12-24 11:27, schrieb Marco Corvi: >>> benedikt, >>> from my tests, >>> options, eg "-text", are referred as ATTR__text (double underscore), >>> custom attributes, eg "-attr code", as >>> ATTR_code (single underscore) >>> feel free to forward to the list. >>> thx for pointing out the error in my page, >>> marco >> ___ >> Therion mailing list >> Therion@speleo.sk >> https://mailman.speleo.sk/listinfo/therion ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Re: [Therion] Showing qestion mark texts broken?
Hi again, it was indeed the Underscore. This works (therion 5.4.1): 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; --- Thank you everybody! Am 2018-12-26 23:20, schrieb Benedikt Hallinger via Therion: Forwarding an off list mail to me that explains Am 2018-12-24 11:27, schrieb Marco Corvi: benedikt, from my tests, options, eg "-text", are referred as ATTR__text (double underscore), custom attributes, eg "-attr code", as ATTR_code (single underscore) feel free to forward to the list. thx for pointing out the error in my page, marco ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Re: [Therion] Showing qestion mark texts broken?
Forwarding an off list mail to me that explains Am 2018-12-24 11:27, schrieb Marco Corvi: benedikt, from my tests, options, eg "-text", are referred as ATTR__text (double underscore), custom attributes, eg "-attr code", as ATTR_code (single underscore) feel free to forward to the list. thx for pointing out the error in my page, marco ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Re: [Therion] Showing qestion mark texts broken?
Hi, no i never had implemented before. Could you please send me your layout and compiler file? I probably made some dumb error somewhere :( Am 22.12.2018 um 22:55 schrieb Bruce Mutton via Therion : >> and my thconfig export command includes this: "-layout >> showContinationText.inc", which in other cases is enough to activate it. > > Hi Benedikt > Does the above statement mean that you have other projects where the 'show > continuation text' has worked properly and it is just stopped working for > this project? > Or have you never used 'show continuation text' before? > > I just checked one of my projects, and both my continuation layout metaposts > are working just fine with the latest Therion release 5.4.1+a08b94e > (2018-12-17) > > Bruce > > -Original Message- > From: Therion On Behalf Of Benedikt Hallinger via > Therion > Sent: Sunday, 23 December 2018 00: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://therion.speleo.sk/samples.doc/60.html > b) http://marcocorvi.altervista.org/caving/tbe/m_05/m_054.htm > 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@speleo.sk > https://mailman.speleo.sk/listinfo/therion > > ___ > Therion mailing list > Therion@speleo.sk > https://mailman.speleo.sk/listinfo/therion ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Re: [Therion] Showing qestion mark texts broken?
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. alastairg...@hotmail.com, M: 07931779380. From: Therion on behalf of Benedikt Hallinger via Therion 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.htmldata=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435%7C1%7C0%7C636810745412347133sdata=WEN25vHGKS75bd2iOmYY8N3phCECVrGVoznqMnrqC20%3Dreserved=0 b) https://nam01.safelin
Re: [Therion] Showing qestion mark texts broken?
This is what I use. Slightly different to your example. Code in my standard layout... #CODE TO DISPLAY CONTINUATIONS (LEADS) # layout LayoutShowContinuationQmarkOnly #Show question marks only where continuations #are flagged in survey or scrap symbol-show point flag:continuation endlayout LayoutShowContinuationQmarkOnly layout LayoutShowContinuationFullText #Show full text highlighted in pink where continuations # are flagged in survey or scrap code metapost def p_continuation(expr pos,theta,sc,al) = % draw default continuation symbol ie ? p_continuation_UIS(pos,theta,sc,al); % if text attribute is set if known(ATTR__text) and picture(ATTR__text): % set labeling color to light orange push_label_fill_color(1.0, 0.9, 0.8); % draw filled label with text next to symbol ? p_label.urt(ATTR__text,(.5u,-.25u) transformed T,0.0,8); % restore original labeling color pop_label_fill_color; fi; enddef; endcode symbol-show point flag:continuation endlayout LayoutShowContinuationFullText Code in my layout called from export statement. #INVOKE LAYOUTS from INPUT files #--- #select NEITHER or ONE of the following, NOT both copy LayoutShowContinuationFullText # copy LayoutShowContinuationQmarkOnly Bruce -Original Message- From: Therion On Behalf Of Benedikt Hallinger via Therion Sent: Sunday, 23 December 2018 00: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://therion.speleo.sk/samples.doc/60.html b) http://marcocorvi.altervista.org/caving/tbe/m_05/m_054.htm 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@speleo.sk https://mailman.speleo.sk/listinfo/therion ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Re: [Therion] Showing qestion mark texts broken?
> and my thconfig export command includes this: "-layout > showContinationText.inc", which in other cases is enough to activate it. Hi Benedikt Does the above statement mean that you have other projects where the 'show continuation text' has worked properly and it is just stopped working for this project? Or have you never used 'show continuation text' before? I just checked one of my projects, and both my continuation layout metaposts are working just fine with the latest Therion release 5.4.1+a08b94e (2018-12-17) Bruce -Original Message- From: Therion On Behalf Of Benedikt Hallinger via Therion Sent: Sunday, 23 December 2018 00: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://therion.speleo.sk/samples.doc/60.html b) http://marcocorvi.altervista.org/caving/tbe/m_05/m_054.htm 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@speleo.sk https://mailman.speleo.sk/listinfo/therion ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
Re: [Therion] Showing qestion mark texts broken?
kt Hallinger via Therion 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.htmldata=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435%7C1%7C0%7C636810745412347133sdata=WEN25vHGKS75bd2iOmYY8N3phCECVrGVoznqMnrqC20%3Dreserved=0 [1] b) https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarcocorvi.altervista.org%2Fcaving%2Ftbe%2Fm_05%2Fm_054.htmdata=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435%7C1%7C0%7C636810745412347133sdata=3FtoNdR%2BuWBMfXX3hZtoNaKunH9%2FrMfyeyyrE5TXdzw%3Dreserved=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 Therion@speleo.sk https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.speleo.sk%2Flistinfo%2Ftheriondata=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435%7C1%7C0%7C636810745412347133sdata=0bzsKCPTIBGAWAM4vi5hQhuOhqBghQppJ1j%2BCv1DnLI%3Dreserved=0 Links: -- [1] https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftherion.speleo.sk%2Fsamples.doc%2F60.htmlamp;data=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435%7C1%7C0%7C636810745412347133amp;sdata=WEN25vHGKS75bd2iOmYY8N3phCECVrGVoznqMnrqC20%3Damp;reserved=0 [2] https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarcocorvi.altervista.org%2Fcaving%2Ftbe%2Fm_05%2Fm_054.htmamp;data=02%7C01%7C%7C0ca209370ddc495c109308d667ffbce5%7C84df9e7fe9f640afb435%7C1%7C0%7C636810745412347133amp;sdata=3FtoNdR%2BuWBMfXX3hZtoNaKunH9%2FrMfyeyyrE5TXdzw%3Damp;reserved=0 ___ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
[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://therion.speleo.sk/samples.doc/60.html b) http://marcocorvi.altervista.org/caving/tbe/m_05/m_054.htm 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@speleo.sk https://mailman.speleo.sk/listinfo/therion