<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.21184" name=GENERATOR>
<STYLE>@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 77.95pt 72.0pt 77.95pt; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: blue; TEXT-DECORATION: underline
}
P.MsoPlainText {
FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"
}
LI.MsoPlainText {
FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"
}
DIV.MsoPlainText {
FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"
}
PRE {
FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"
}
P.avgcert {
FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
LI.avgcert {
FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
DIV.avgcert {
FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle19 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle20 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=blue link=blue>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=504274820-01122011>Hi Bruce,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=504274820-01122011>Here is my re-defined p_station code that now
works. For each station that you want to print the text for, set attr
print "true" in the th2 file as I illustrated in my earlier email. If you
want to turn off printing you can set the text to "false". This works for
any station, no matter what its subtype or flags that are set. The code is
as follows:<BR></SPAN></FONT></DIV>
<DIV><FONT face="Courier New" color=#0000ff size=2>layout
l_p_station_text<BR> code metapost<BR> <SPAN class=504274820-01122011>
</SPAN>def p_station(expr pos,mark,txt)(text flags)
=<BR> <BR> % draw default
station<BR> p_station_SKBB(pos, mark, txt, flags);<BR>
<BR> % now print the text<BR> if
picture(txt):<BR> <SPAN class=504274820-01122011>
</SPAN>picture ATTR__text;<BR> <SPAN
class=504274820-01122011> </SPAN>ATTR__text :=
txt;<BR> <BR> <SPAN
class=504274820-01122011> </SPAN>if
known(ATTR_print):<BR> <SPAN class=504274820-01122011>
</SPAN> if (ATTR_print="true"):<BR><SPAN
class=504274820-01122011><SPAN
class=504274820-01122011> <SPAN
class=504274820-01122011> </SPAN></SPAN></SPAN> if
not numeric txt:<BR><SPAN class=504274820-01122011> <SPAN
class=504274820-01122011> <SPAN
class=504274820-01122011> </SPAN></SPAN></SPAN> p_smartlabel(txt,pos);<BR><SPAN
class=504274820-01122011> <SPAN
class=504274820-01122011> </SPAN></SPAN> else:<BR><SPAN
class=504274820-01122011> <SPAN
class=504274820-01122011> <SPAN
class=504274820-01122011> </SPAN></SPAN></SPAN> %
draw filled label with text next<BR><SPAN
class=504274820-01122011> <SPAN
class=504274820-01122011> <SPAN
class=504274820-01122011> </SPAN></SPAN></SPAN> p_label.urt(ATTR__text,(.5u,-.25u)
transformed T,0.0,8);<BR><SPAN
class=504274820-01122011> <SPAN
class=504274820-01122011> </SPAN></SPAN> fi;<BR><SPAN
class=504274820-01122011> </SPAN> <SPAN
class=504274820-01122011> </SPAN>fi;<BR><SPAN
class=504274820-01122011>
</SPAN> fi;<BR> <SPAN
class=504274820-01122011> </SPAN>save
ATTR__text;<BR> fi;</FONT></DIV>
<DIV><FONT face="Courier New" color=#0000ff
size=2> enddef;<BR> endcode
<BR>endlayout</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=504274820-01122011> </DIV></SPAN></FONT><FONT face=Arial
color=#0000ff size=2></FONT><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> therion-bounces@speleo.sk
[mailto:therion-bounces@speleo.sk] <B>On Behalf Of </B>Ben
Cooper<BR><B>Sent:</B> 01 December 2011 19:56<BR><B>To:</B> 'List for Therion
users'<BR><B>Subject:</B> Re: [Therion] symbol-show fixed points / point
text<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=235045519-01122011><FONT face=Arial
color=#0000ff size=2>Hi Bruce,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=235045519-01122011><FONT face=Arial
color=#0000ff size=2>I've solved the problem - obvious really - I need to use
p_station, not p_station_SKBB. I'll send the example through later - I
need to copy it off another computer.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=235045519-01122011><FONT face=Arial
color=#0000ff size=2>Regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=235045519-01122011><FONT face=Arial
color=#0000ff size=2>- Ben</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> therion-bounces@speleo.sk
[mailto:therion-bounces@speleo.sk] <B>On Behalf Of </B>Ben
Cooper<BR><B>Sent:</B> 30 November 2011 22:35<BR><B>To:</B> 'List for
Therion users'<BR><B>Subject:</B> Re: [Therion] symbol-show fixed points /
point text<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2>Hi Bruce,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2>You beat me to it! I've spent the last few days
learning metapost and rummaging around the bowels of the Therion's source
code and have more or less got to what you have summarised below. I
also spotted the smartlabel, though haven't yet tried it in the
re-definition of p_continuation. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2>I surmise that stations with fixed co-ordinates are
not exported by Therion in any detectable way; while the th2 mark
"fixed" is exported as "mark", and the th2 flags are exported as
"flags". The items that are exported are accessible in
metapost. </FONT></SPAN><SPAN class=094593821-30112011><FONT
face=Arial color=#0000ff size=2>In the debug output data.mp file, I saw that
"attr code" is exported by Therion as ATTR_code, where "code" is whatever
attr has been declated in the th2 file. Note that it only has one "_"
whereas ATTR__text has two "_". So o<SPAN
class=094593821-30112011><FONT face=Arial color=#0000ff size=2>ne thing I
tried that did work is to print the value of my user define attr statements
instead of the text, which is potentially quite useful, as I can display a
short code, and use continuation.html for the longer description.
However, this still relies on having the "continuation" flag set.
</FONT></SPAN></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2>I used the following re-definition of
</FONT></SPAN><SPAN class=094593821-30112011><FONT face=Arial color=#0000ff
size=2>p_continuation using ATTR_code instead of the example's ATTR__text,
as follows</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2>**THE FOLLOWING WORKS**</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2> code metapost<BR> def
p_continuation(expr pos,theta,sc,al) =<BR> % draw default
continuation
symbol<BR> p_continuation_UIS(pos,theta,sc,al);</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2> % if attr code is
set<BR> if known(ATTR_code):</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2> % set labeling color to light
orange<BR> push_label_fill_color(1.0, 0.9,
0.8);<BR> <BR> % draw filled
label with text next to
?<BR> p_label.urt(ATTR_code,(.5u,-.25u) transformed
T,0.0,8);<BR> <BR> % restore
original labeling
color<BR> pop_label_fill_color;<BR> fi;<BR> enddef;<BR> endcode <BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2>Looking at p_station_SKBB, the problem you and I are
facing is that it's only for the "continuation" flags that ATTR__text has
been set. I</FONT></SPAN><SPAN class=094593821-30112011><FONT
face=Arial color=#0000ff size=2>t occurred to me that if it was possible to
refedine p_station_SKBB in the thconfig file, then it would be possible to
output ATTR__text if an "attr code" has been declared in the th2 file.
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2>For example, th2 file:-</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2>station 1 "Some text to output" entrance attr print
"true"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=094593821-30112011><FONT face=Arial
color=#0000ff size=2>My example p_station_SKBB is below.
</FONT></SPAN><FONT face=Arial color=#0000ff size=2><SPAN
class=094593821-30112011>Unfortunately, I've so far not managed to see it
being executed. I can see it appear in the data.mp debug file, but the
changes I've made to it don't appear to work - the text is not yet being
output to my pdf file. Also, I don't understand yet the purpose of the
metapost "save" command, and the manual doesn't really shed much light on
it! So it's possible that I've just not yet properly understood
metapost syntax. </SPAN></FONT></DIV>
<DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=094593821-30112011></SPAN></FONT></DIV><FONT face=Arial color=#0000ff
size=2><SPAN
class=094593821-30112011></SPAN></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>