[Therion] code tex-map - some tokens I cannot get to work
Henry.Bennett at dell.com
Henry.Bennett at dell.com
Tue Sep 24 13:27:18 CEST 2019
Hi Andrew,
I've done this in the past however I can't remember exactly how. The detail is in here
https://github.com/speleo/SpeleoPhilippines/blob/master/CodeLibrary/_layouts.tex
layout custom_legendsymbolbox
#http://therion.speleo.sk/wiki/doku.php/tips#map-image_and_custom_legendbox
code tex-map
\def\legendsymbolbox#1#2{%
\setbox\tmpboxa=\hbox{\pdfrefxform#1}%
\setbox\tmpboxb=\hbox{\the\legendtextsize(}%
\legendsymbolwd=\wd\tmpboxa
\legendsymbolht=\ht\tmpboxa
\advance\legendsymbolht by -\ht\tmpboxb
\advance\legendsymbolht by -\ht\tmpboxb
\advance\legendsymbolht by -20pt
\advance\legendsymbolht by -1dd
\tmpdimen=\hsize
\advance\tmpdimen by 10pt
\divide\tmpdimen by\legendcolumns
\advance\tmpdimen by-10pt
\hbox to \tmpdimen{%
\box\tmpboxa\kern10pt\raise\legendsymbolht\vtop{%
\advance\tmpdimen by -\legendsymbolwd
\advance\tmpdimen by -10pt
\hsize=\tmpdimen\rightskip=0pt plus \tmpdimen minus 0pt\relax\the\legendtextsize #2\vskip1dd}\hss}%
}
endcode
endlayout
From memory I grabbed the code which defined the legend box and packaged it as above as an override.
Hope this helps,
Henry
-----Original Message-----
From: Therion <therion-bounces at speleo.sk> On Behalf Of Andrew Atkinson
Sent: 24 September 2019 10:53
To: List for Therion users
Subject: [Therion] code tex-map - some tokens I cannot get to work
[EXTERNAL EMAIL]
I need to split up the scale bar, north arrow, legend and header information on a survey I'm doing
To do this I think that I have to use tex-map, which works fine for the scale bar, north arrow but I cannot get any of the legend tokens work
layout combined
legend on
code tex-map
\def\maplayout{
\formattedlegend
\northarrow
\scalebar
\legendbox{10}{20}{NW}{\\scalebar}
\legendbox{10}{20}{NW}{\northarrow}
\legendbox{10}{20}{NW}{\formattedlegend}
}
endcode
endlayout
So in the above I get a scale bar and north arrow in the bottom left from \northarrow \scalebar, but \formattedlegend does not do anything nor does \insertlegend or \legendtitle the \legendbox lets me control where they are
I also tried
\iflegend(\formattedlegend)\fi
But this gives a
therion: error -- pdftex exit code -- 256
Anyone got any ideas?
thanks
Andrew
_______________________________________________
Therion mailing list
Therion at speleo.sk
https://mailman.speleo.sk/listinfo/therion
More information about the Therion
mailing list