<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Príklad z therionu:<div><br></div><div><div>encoding  utf-8</div><div>#!PROCESS</div><div>#!FILE 3</div><div>source map.th2</div><div><br></div><div>#! To display them correctly you need to define symbols for them in</div><div>#! MetaPost languge the same way as ordinary symbols are usually redefined.</div><div>#!</div><div>#! Firstly point symbol. In the</div><div><br></div><div><br></div><div>layout m</div><div>#!CODE</div><div>code metapost</div><div>#!ENDCODE</div><div><br></div><div>  path bat_path_x;</div><div>bat_path_bb) - (xpart llcorner bat_path_bb))) rotated 210;</div><div><br></div><div>#! section of your layout define point u:bat symbol like this</div><div>#!CODE</div><div>def p_u_bat(expr pos, theta, sc, al) = </div><div>enddef;</div><div>#!ENDCODE</div><div><br></div><div>#! similarly the line u:bat symbol</div><div>#!CODE</div><div>def l_u_bat(expr P) =</div><div>enddef;</div><div>#!ENDCODE</div><div><br></div><div>#! and finally the area u:bat symbol (pattern in this case)</div><div>#!CODE</div><div>% bat pattern</div><div>endpattern;</div><div><br></div><div>% bat area symbol</div><div>def a_u_bat (expr Path) =</div><div>enddef;</div><div>#!ENDCODE</div><div><br></div><div>#! These symbols will be included also in the legend. To</div><div>#! change the way how they are drawn there just define appropriate</div><div>#! macro. Its name should be symbol macro name with <code>_legend</code> </div><div>#! suffix.</div><div>#!CODE</div><div>def l_u_bat_legend = </div><div>enddef;</div><div>#!ENDCODE</div><div><br></div><div>code tex-map</div><div>\legendcontent={%</div><div>  \hsize=\legendwidth</div><div>  \color[0 0 0]\the\legendtextcolor </div><div>  \formattedlegend</div><div>  \color[0 0 0]</div><div>}</div><div><br></div><div>legend-width 8 cm</div><div><br></div><div>endcode</div><div><br></div><div>endlayout</div><div><br></div><div>#! Finally, add description of your new symbols that will be shown </div><div>#! in the legend using <code>text</code> command anywhere </div><div>#! in the configuration file.</div><div>#!CODE</div><div>text en "point u:bat" "bat"</div><div><font class="Apple-style-span" color="#ff0512">text en "line u:bat" "bat path"</font></div><div>text en "area u:bat" "lot of bats"</div><div>#!ENDCODE</div><div><br></div><div>#! After all these definitions you receive bat point, line and area symbols</div><div>#! with proper graphical representation and legend boxes.</div><div><br></div><div>export map -o map2.pdf -layout m -layout-map-header 0 0 nw -layout-legend on</div><div><br></div><div>#!IMAGE map2.pdf</div><div>#!CLEAN map2.pdf</div><br></div></body></html>