[Therion] Legend Size

Stacho Mudrak s.m at group-s.sk
Tue Nov 27 12:42:53 CET 2007


Quoting "Cooper, Ben" <ben.cooper at siemens.com>:
> Can anyone help?  Is there a way of changing the font size and North
> Arrow size of the Legend text without changing the scale?

It is a TeX specific question - but MartinB is quite busy right now, so I will
try to help. You need to predefine TeX macro called \legendcontent, that can be
found in tex/therion.tex file (see therion sources). You may do it in your
layout. Example:

layout mylegend

code tex-map
\legendcontent={%
  \hsize=\legendwidth
  \ifnortharrow\vbox to 0pt{\line{\hfil\northarrow}\vss}\fi
  \edef\tmp{\the\cavename} \ifx\tmp\empty \else
    \color[0 0 0]{\size[26]\the\cavename}\color[0 0 0]\vskip1cm
  \fi
  \ifscalebar\scalebar\vskip1cm\fi
  {\rightskip=0pt plus 3em\parskip=3bp
    \edef\tmp{\the\comment} \ifx\tmp\empty \else
      {\size[12]\the\comment} \par\medskip
    \fi
    \everypar{\hangindent=2em\hangafter=1}
    \edef\tmp{\the\cavelength} \ifx\tmp\empty \else
      {\size[12]\si\the\cavelengthtitle: \ss\the\cavelength\par}
    \fi
    \edef\tmp{\the\cavedepth} \ifx\tmp\empty \else
      {\size[12]\si\the\cavedepthtitle: \ss\the\cavedepth\par}
    \fi
    \edef\tmp{\the\exploteam} \ifx\tmp\empty \else
      {\size[12]\si\the\explotitle:
\ss\the\exploteam\quad\si\the\explodate\par}
    \fi
    \edef\tmp{\the\topoteam} \ifx\tmp\empty \else
      {\size[12]\si\the\topotitle: \ss\the\topoteam\quad\si\the\topodate\par}
    \fi
    \edef\tmp{\the\cartoteam} \ifx\tmp\empty \else
      {\size[12]\si\the\cartotitle:
\ss\the\cartoteam\quad\si\the\cartodate\par}
    \fi
    \edef\tmp{\the\copyrights} \ifx\tmp\empty \else
      {\size[12]\ss\the\copyrights\par}
    \fi
  }
  \formattedlegend
}
endcode

endlayout

export map -layout mylegend

As you can see \size[12] is macro for setting font size. You may change font
sizes for all items as you need.

HTH, S.



More information about the Therion mailing list