<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Trebuchet MS";
panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Trebuchet MS",sans-serif;
color:#002060;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Trebuchet MS",sans-serif;
color:#002060;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">Solved.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">In case anyone else needs to do this, the trick is to modify the
</span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">legendsymbolbox in the tex section of your thconfig.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">\def\legendsymbolbox#1#2{%<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \setbox\tmpboxa=\hbox{\pdfrefxform#1}%<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \setbox\tmpboxb=\hbox{\the\legendtextsize(}%<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \legendsymbolwd=\wd\tmpboxa<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \legendsymbolht=\ht\tmpboxa<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \advance\legendsymbolht by -\ht\tmpboxb<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">
<span style="background:yellow;mso-highlight:yellow">\advance\legendsymbolht by -\ht\tmpboxb<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060;background:yellow;mso-highlight:yellow"> \advance\legendsymbolht by -20pt</span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \advance\legendsymbolht by -1dd<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \tmpdimen=\hsize<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \advance\tmpdimen by 10pt
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \divide\tmpdimen by\legendcolumns
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \advance\tmpdimen by-10pt<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \hbox to \tmpdimen{%<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \box\tmpboxa\kern10pt\raise\legendsymbolht\vtop{%<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \advance\tmpdimen by -\legendsymbolwd<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \advance\tmpdimen by -10pt<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \hsize=\tmpdimen\rightskip=0pt plus \tmpdimen minus 0pt\relax\the\legendtextsize #2\vskip1dd}\hss}%<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">The code above taken from thTMPDIR\data.tex was modified with the highlights to produce the desired effect<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060;mso-fareast-language:EN-GB"><img width="102" height="122" id="_x0000_i1026" src="cid:image004.png@01D130D4.A0E5CDB0"></span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="FR" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060;mso-fareast-language:EN-GB">Henry Bennett<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><a name="_____replyseparator"></a><b><span lang="EN-US" style="mso-fareast-language:EN-GB">From:</span></b><span lang="EN-US" style="mso-fareast-language:EN-GB"> therion-bounces@speleo.sk [mailto:therion-bounces@speleo.sk]
<b>On Behalf Of </b>Bennett, Henry<br>
<b>Sent:</b> 03 December 2015 14:05<br>
<b>To:</b> therion@speleo.sk<br>
<b>Subject:</b> [Therion] Multilingual Legend / Legend Formatting<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">Trying to produce a multilingual legend that shows two (or more) languages.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">I thought I could simply use text substitution to achieve this in my thconfig file.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">Source cave.th<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">text en "area sand" "sand<br>darat"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">text en "area water" "water<br>danum"<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">export map …<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">This works great except the formatting of the legend is borked. As you can see the text is vertically aligned with the middle of the text against the top
of the legend box.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060;mso-fareast-language:EN-GB"><img width="181" height="278" id="Picture_x0020_1" src="cid:image001.png@01D130D3.797AF8F0"></span><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">th_legend.tex looks like this<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">\line{%<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \legendsymbolbox{\THLaaab}{\thfb\char119 \char97 \char108 \char108 \mainfont{}}\hskip10pt<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \legendsymbolbox{\THLaaaj}{\thfb\char99 \char104 \char105 \char109 \char110 \char101 \char121 \mainfont{}}\hskip10pt<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \legendsymbolbox{\THLaabh}{\vbox{\<span style="background:yellow;mso-highlight:yellow">halign{#\hfil\cr\cr \thfb\char115 \char97
\char110 \char100 \cr\thfb \char100 \char97 \char114 \char97 \char116 \cr</span>}}\mainfont{}}\hskip10pt<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"> \legendsymbolbox{\THLaacf}{\thfb\char112 \char111 \char105 \char110 \char116 \ \char115 \char116 \char97 \char108 \char97 \char99
\char116 \char105 \char116 \char101 \char115 \mainfont{}}\hskip10pt<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">\hss}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">The legend boxes get drawn using metapost and the labels with TEX. Although I can modify the metapost I can’t see the template for the TEX.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">Any ideas where I could modify the alignment?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060">Alternatively is there a way of specifying the legend language mid creation so I could have two legends, one for each language?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="FR" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060;mso-fareast-language:EN-GB">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="FR" style="font-size:10.0pt;font-family:"Trebuchet MS",sans-serif;color:#002060;mso-fareast-language:EN-GB">Henry Bennett<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Dell Corporation Limited is authorised and regulated in the UK by the Financial Conduct Authority for consumer credit brokerage.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Registered in England and Wales. Company Registration Number: 2081369<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Registered address: Dell House, The Boulevard, Cain Road, Bracknell, Berkshire, RG12 1LF, UK.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman",serif">Company details for other Dell UK entities can be found on
</span><a href="http://www.dell.co.uk/"><span style="font-family:"Times New Roman",serif;color:windowtext">www.dell.co.uk</span></a><span style="font-size:12.0pt;font-family:"Times New Roman",serif">.<o:p></o:p></span></p>
</div>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><font size=3><span style="font-family: Times New Roman;"><span style="mso-ansi-language: EN-GB" lang=EN-GB>Dell Corporation Limited </span>is authorised and regulated in the UK by the Financial Conduct Authority for consumer credit brokerage. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></span></font></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><font size=3><span style="font-family: Times New Roman;">Registered in <span style="mso-ansi-language: EN-GB" lang=EN-GB>England and Wales. Company Registration Number: 2081369<o:p></o:p></span></span></font></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><span style="mso-ansi-language: EN-GB" lang=EN-GB><font size=3><span style="font-family: Times New Roman;">Registered address: Dell House, The Boulevard, Cain Road, Bracknell, Berkshire, RG12 1LF, UK.<o:p></o:p></span></font></span></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><span style="mso-ansi-language: EN-GB" lang=EN-GB><span size=3 style="font-family: Times New Roman;">Company details for other Dell UK entities can be found on </span><A href="http://www.dell.co.uk/"><span style="COLOR: windowtext"><span size=3 style="font-family: Times New Roman;">www.dell.co.uk</span></span></A><font size=3><span style="font-family: Times New Roman;">.<o:p></o:p></span></font></span></P></body>
</html>