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? Woops missed: therion 5.4.3 (2019-02-01 on debian thanks Andrew
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 Kind regards, Andrey
Вторник, 24 сентября 2019, 10:54 +01:00 от Andrew Atkinson <andrew@wotcc.org.uk>:
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?
Woops missed: therion 5.4.3 (2019-02-01 on debian
thanks
Andrew _______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
-- Kind regards, Andrey
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
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@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@speleo.sk https://mailman.speleo.sk/listinfo/therion
participants (3)
-
Andrew Atkinson -
Andrey -
Torsten Schnitter