[Therion] Showing qestion mark texts broken?
Bruce Mutton
bruce at tomo.co.nz
Sat Dec 22 23:03:19 CET 2018
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 <therion-bounces at speleo.sk> On Behalf Of Benedikt Hallinger via Therion
Sent: Sunday, 23 December 2018 00:12
To: List for Therion users <therion at speleo.sk>
Cc: Benedikt Hallinger <beni at hallinger.org>
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 at speleo.sk
https://mailman.speleo.sk/listinfo/therion
More information about the Therion
mailing list