TeX

…is all about typesetting for pdf and svg outputs. It takes metapost symbols and cave data supplied by Therion and puts it all together on the 'page'.

(include some generic tex links here)

All macros and predefined boxes (like \scalebar) are described in the `Page layout in the map mode' chapter of the recent thbook

(Can we link directly to the chapter directly in the on-line thbook?

How to get Therions TeX code (and Metapost code)

How to get Therions TeX Code



TeX-Map

Changing the look or layout of a map output

How can I insert the logo of my speleo club in map? (Martin Budaj)

Currently it's possible using the following in the layout:

  code tex-map
  
  \def\loadpicture#1{\pdfximage{#1}\pdfrefximage\pdflastximage} 
  \def\maplayout{
    \legendbox{0}{100}{NE}{\the\legendcontent}
    \legendbox{100}{100}{NW}{\loadpicture{/absolute/path/to/file.png}}        %%% pdf, png, jpg supported
  }

The first three arguments of \legendbox macro are the same as of map-header command


Example of modification of header of map (Martin Budaj)

  code tex-map
    \def\maplayout{
      \legendbox{0}{100}{NW}{\northarrow\scalebar}
      \legendbox{100}{100}{NW}{\scalebar}
    }

it produces two headers for one map (one in the upper-left, second in the upper-right corner) – one arrow and two scale-bars – just for an illustration. You may use any number of \legendbox'es inside of \maplayout definition.


To change the size of font for name of cave (Martin Budaj)

  code tex-map
  \legendcontent={%
    \hsize=\legendwidth
    \ifnortharrow\vbox to 0pt{\line{\hfil\northarrow}\vss}\fi
    \edef\tmp{\the\cavename} \ifx\tmp\empty \else
      {\size[26]\the\cavename} \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
  }

where default *\size[26]* before *\the\cavename* change to another size.


Add thedegree symbol (°) to the map-comment (Stacho Mudrak)

  code tex-map
      \comment={\vbox{\halign{#\hfil\cr\thfa Coordinates: $30\,^{\circ}$ \cr  
      Line 2 of map comment.\cr}}{}}
  endcode

Stacho
On my system this produces…

цООРДИНАТЕС 30 ◦
Line 2 of map comment.

So I'm guessing that the tex code is supposed to make some kind of box on the top line, then maybe a change of language?, then $30\,^{\circ}$ produces 30 ◦, then a new line.

Seems there is more to explain here wrt the language… Bruce


Map Border (Bruce Mutton) Feb 2010 versions 5.2 to 5.3…

The description in the Therion Book was too abbreviated for me for the first two years!

Here is how to add the map border tex code to your layout.

#CODE TO PUT BORDER AROUND MAP
#-----------------------------
layout LayoutMapBorder
code tex-map
  \framethickness=0.5mm
endlayout LayoutMapBorder


Overriding Data Supplied by Therion (Map Headers)

Modifications of header on map (Stacho Mudrak)

  code tex-map
  
    \cavename={Terikan River Cave}
    \topotitle={Surveyed by}
    \cartotitle={Drawn by}
    \explotitle={Explored by}
  
  endcode

Changing the value for \cavelength or \cavedepth (Stacho Mudrak)

  code tex-map
      \topoteam{Your team.}
      \cavelength{1000\thinspace{}ft}
      \cavedepth{300\thinspace{}m}
  endcode

… and if you want to use the value calculated by therion but modify it somehow, (Bruce Mutton Feb 2010 versions 5.2.14 to 5.3…)

code tex-map
  \edef\histlength{\the\cavelength}   %save existing calculated cavelength to variable
  \cavelength={Here it is... \histlength\ from historic surveys \histlength\ you get the idea} %redefine cavelength value
endcode 

This produces…

“Here it is… 1728m from historic surveys 1728m you get the idea”

after the Length: title in the map header box.

Suppress the display of cave length and cave depth in the map header (Bruce Mutton May2012)
Theron's layout statements allow you to suppress the printing of north arrow, scale bar, explorers, surveyors, cartographers and copyright, but not cave length and depth. The following code in your layout will suppress length and depth.

   code tex-map
    \cavelength={} %empty
    \cavedepth={}  %empty
   endcode

Output Map Title Override (Bruce Mutton) Feb 2010 versions 5.3

    code tex-map
   % Output map title as determined by Therion 5.3 is stored in cavename. 
   % It will be empty if there are multiple maps selected for any one projection
   % AND there are multiple source surveys identified in the thconfig file 
   % ie Therion can not infer a unique title from the input data given.
   % This code allows you to define an output map title {cavename} if it happens to be empty
   
  \edef\temp{\the\cavename}        % cavename from Therion   
  \edef\nostring{}                 % empty string 
  \ifx\temp\nostring             % test if cavename is empty
        % if empty reassign cavename to describe selected maps as a group

		\cavename={Caves of the Entire Flora Region} 
		
  \else % if not empty keep the value set by therion, or assign an override cavename here
  \fi
  endcode         


TeX-Atlas

Atlas with North Arrow and Scalebar (Bruce Mutton) August 2009 versions 5.2.9-ish

#CODE TO CUSTOMISE ATLAS OUTPUT
#------------------------------
layout LayoutAtlasNorthArrow
#This code is a redefinition of the default atlas definition
#that includes both north arrow & scale bar beside the navigation pane

code tex-atlas
\def\dopage{%
 \vbox{\centerline{\framed{\mapbox}}
  \bigskip
  \line{%
    \vbox to \ht\navbox{
      \hbox{\size[20]\the\pagelabel
        \ifpagenumbering\space(\the\pagenum)\fi
        \space\size[16]\the\pagename}
      \ifpagenumbering
        \medskip
        \hbox{\qquad\qquad
          \vtop{%
            \hbox to 0pt{\hss\showpointer\pointerN\hss}
            \hbox to 0pt{\llap{\showpointer\pointerW\hskip0.7em}%
              \raise1pt\hbox to 0pt{\hss$\updownarrow$\hss}%
              \raise1pt\hbox to 0pt{\hss$\leftrightarrow$\hss}%
              \rlap{\hskip0.7em\showpointer\pointerE}}
              \hbox to 0pt{\hss\showpointer\pointerS\hss}
          }\qquad\qquad
          \vtop{
            \def\arr{$\uparrow$}
            \showpointerlist\pointerU
            \def\arr{$\downarrow$}
            \showpointerlist\pointerD
          }
        }
      \fi
      \vss
    }
    \hss
    \vbox to \ht\navbox{
    \ifnortharrow\hbox to 0pt{\hss\northarrow\qquad}\fi
    \vss
    \ifscalebar\hbox to 0pt{\hss\scalebar\qquad}\fi
    }
    \box\navbox
  }
 }
}

endlayout LayoutAtlasNorthArrow