[Therion] code tex-map - some tokens I cannot get to work
Torsten Schnitter
torsten.schnitter at netcologne.de
Thu Sep 26 11:44:51 CEST 2019
Hi Andrew
I had a similar problem some time ago and build my own solution for that.
Maybe this works for you as well.
Maybe a bit complex but for me it works...
I put northarrow, scalebar, legendcontent and legendsymbols into a seperate .th file (you'll find attached as examples).
Inside your config file load these files (e.g. input scalebar.th)
Inside your config file and within your layout definition use e.g. "copy scalebar" or "copy northarrow_mexico" to load this code into your layout.
Finally use within your layout definition and between "code tex-map .... endcode":
"\legendbox{x}{y}{NW}{\hsize=10 cm\centerline\scalebar}" or
"\legendbox{x}{y}{NW}{\northarrow}" for positioning these parts.
Additionally there are some parameters you have to define.
Also within "code tex-map ... endcode":
% parameter legendcontent
\def\thsizexl{36} % size of cave name in map
\def\thsizel{30} % size of comment in map
\def\thsizem{24} % size of text in map
% parameter legend symbols
\def\legendsymbolswidth1{14 cm} % width of each column legend symbols
\legendtextsectionsize={\size[24]} % text size of legend symbols header
\legendtextsize={\size[15]} % text size of legend symbols
Within the "code metapost ... endcode" part:
tmpscalebar:=1.0;
tmpscalenarrow:=1.0;
% scale of legend symbols
tmpscale:=1.0;
There are some minor problems especially with the legend symbols while changing scale.
I couldn't solve this so far.
(Hopefully I didn't miss anything so far)
hth,
Torsten
> Andrew Atkinson <andrew at wotcc.org.uk> hat am 26. September 2019 um 10:56 geschrieben:
>
>
> Unless I'm missing something this code does not print a list of the
> symbols and what they are, which I think should be produced
> \insertlegend or \legendtitle which I should then be able to control the
> position on the page like I do with the north arrow and scale bar
>
> Andrew
>
>
>
> On 25/09/2019 19:03, Andrey via Therion wrote:
> > Hi Andrew,
> >
> > I've used this code from wiki with little edits.
> >
> > Worked pretty well for me apart from the fact that "map image" command
> > will no longer work properly and will require full path to image file.
> >
> > code tex-map #begining of TeX code
> >
> > \edef\temp{\the\cavename}
> > \edef\nostring{}
> > \ifx\temp\nostring
> > \cavename={Fantasy Cave}
> > \else
> > \fi
> > %\newtoks\club \club={MCU caving club}
> >
> > \def\maplayout{
> > \legendbox{5}{70}{NW}{
> > \legendwidth 26 cm
> > \legendtextheadersize={\size[38]}
> > \legendtextsize={\size[22]}
> > \the\legendcontent
> > }
> > \legendbox{85}{95}{NW}{
> > \legendwidth 25 cm
> > \legendtextsize={\size[18]}
> > \hsize=\legendwidth
> > \input th_legend
> > }
> > \legendbox{15}{95}{NW}{\northarrow}
> > \legendbox{50}{5}{NW}{\scalebar}
> > \legendbox{5}{95}{NW}
> > {\loadpicture{G:/Caving/Caves/Fantaziya/Therion/KS_MCU_colour.png}}
> > }
> > endcode #end of TeX code
> >
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> https://mailman.speleo.sk/listinfo/therion
-------------- next part --------------
A non-text attachment was scrubbed...
Name: northarrow_mexico.th
Type: application/octet-stream
Size: 884 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20190926/49a53257/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scalebar.th
Type: application/octet-stream
Size: 1333 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20190926/49a53257/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legendcontent.th
Type: application/octet-stream
Size: 1458 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20190926/49a53257/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legendsymbols.th
Type: application/octet-stream
Size: 1826 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20190926/49a53257/attachment-0003.obj>
More information about the Therion
mailing list