encoding utf-8 # This file contains the settings used for the layout that ahould be common for the # whole data set. # The help with each command,comes from the Therion Book issued with v0.3.10 layout common units metric #• units . set output units (M, A; default: metric) symbol-set BCRA layers on #• layers . enable/disable PDF 1.5 layers (M, A; default: on) #Patterns similar to standard definition of pattern_water_UIS and pattern_sump_UIS #Gives b&w shaded symbols with borders, unless custom colours are defined #in which case colour backgrounds defined in LayoutColourSymbols are used code metapost beginpattern(pattern_water); draw origin--10up withpen pensquare scaled (0.04u); % line thickness patternxstep(.50u); % spacing patterntransform(identity rotated 45); endpattern; beginpattern(pattern_sump); draw origin--(0,.50u) withpen pensquare scaled (0.04u); draw origin--(.50u,0) withpen pensquare scaled (0.04u); patterntransform(identity rotated 45); endpattern; def p_water (expr pos,theta,sc,al)= %Bruce Mutton 2010.06.20 for Therion 5.3.8 U:=(.425u,.3u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenD; p:=fullcircle xscaled (1.2u) yscaled (0.8u) randomized (0.1u) rotated uniformdeviate (-45); if known colour_water_bg: thfill p withcolor colour_water_bg; else: thfill p withcolor white; fi; thfill p withpattern pattern_water; %%% withcolor black; %but with failed attempt at black hatch thdraw p; %outline enddef; def a_water (expr Path) = %Bruce Mutton 2010.06.20 for Therion 5.3.8 T:=identity; thclean Path; pickup PenD; if known colour_water_bg: thfill Path withcolor colour_water_bg; else: thfill Path withcolor white; fi; thfill Path withpattern pattern_water; %%thdraw Path; %outline, not needed as area drawn is defined by line border anyway %and border can be made invisible with subtype invisible where water meets sump in elevation enddef; def a_sump (expr Path) = %Bruce Mutton 2010.06.20 for Therion 5.3.8 T:=identity; thclean Path; pickup PenD; if known colour_sump_bg: thfill Path withcolor colour_sump_bg; else: thfill Path withcolor 0.7white; fi; thfill Path withpattern pattern_sump; %%thdraw Path; %outline, not needed as area drawn is defined by line border anyway %and border can be made invisible with subtype invisible where water meets sump in elevation enddef; def p_blocks_BCRA (expr pos,theta,sc,al)= symbolsize:=1.0u; %Factor*u; Factor=size of the blocks U:=(.5u,.5u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; thdraw (.0symbolsize,.0symbolsize)--(1.0symbolsize,-.5symbolsize)--(0.0symbolsize,-1.5symbolsize)--(-1.0symbolsize,-1.0symbolsize)--cycle; thdraw (.5symbolsize,-.25symbolsize)--(1.0symbolsize,.5symbolsize)--(0.0symbolsize,1.5symbolsize)--(-0.5symbolsize,.5symbolsize); thdraw (.0symbolsize,.0symbolsize)--(.0symbolsize,.5symbolsize)--(-1.5symbolsize,.5symbolsize)--(-1.5symbolsize,-0.5symbolsize)--(-0.5symbolsize,-0.5symbolsize); enddef; def p_u_entrance (expr pos,theta,sc,al)= U:=(.4u,.4u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := fullcircle scaled 1.1u; thdraw p; U:=(.2u,.5u); T:=identity aligned al rotated theta scaled sc shifted pos; thfill (-.2u,-.5u)--(0,.5u)--(.2u,-.5u)--cycle; enddef; def p_u_gradient (expr P,R,S,A)= tmplength:=0.3u; if known ATTR_length: if ATTR_length="big": tmplength:=.4u; elseif ATTR_length="small": tmplength:=0.2u; fi; fi; U:=(.2u,.6u); T:=identity aligned A rotated R scaled S shifted P; thfill (-.1u,-tmplength)--(0,tmplength)--(.1u,-tmplength)--cycle; enddef; initsymbol("p_u"); def p_u_mud (expr pos,theta,sc,al)= U:=(.45u,.1u); T:=identity aligned al rotated theta scaled sc shifted pos; pickup PenC; p := ((-.15*u,0)--(.15*u,0)); thdraw p shifted (.3u,-.1u); thdraw p shifted (-.3u,-.1u); thdraw p shifted (0,.1u); enddef; def l_u_mud (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok:=adjust_step(dlzka, .5u); pickup PenC; q := (-0.15u,0){up}..{down}origin..{up}(0.15u,0); forever: t := arctime (cas + mojkrok/2) of P; thdraw q shifted (point t of P + .25u * unitvector(thdir(P,t) rotated -90)); cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; pickup PenA; thdraw P; enddef; def l_u_path (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok := adjust_step(dlzka, 0.25u); pickup PenD; forever: t := arctime cas of P; thdraw ((point t of P) + 0.2 * u * unitvector(thdir(P,t) rotated 90)) -- ((point t of P) - 0.2 * u * unitvector(thdir(P,t) rotated 90) ); cas := cas + mojkrok; exitif cas > dlzka + (mojkrok/3); % for rounding errors endfor; pickup PenC; %thdraw P; %draw path enddef; initsymbol("l_u_path"); def l_u_steps (expr P) = T:=identity; cas := 0; dlzka := arclength P; mojkrok := adjust_step(dlzka, 0.5u); pickup PenD; forever: t := arctime cas of P; thdraw ((point t of P) + 0.2 * u * unitvector(thdir(P,t) rotated 90)) -- ((point t of P) - 0.2 * u * unitvector(thdir(P,t) rotated 90) ); cas := cas + mojkrok; exitif cas > dlzka + (mojkrok/3); % for rounding errors endfor; pickup PenC; %thdraw P; %draw path enddef; initsymbol("l_u_steps"); def a_u_mud (expr p) = T:=identity; pickup PenC; path q, qq; q = bbox p; picture tmp_pic; tmp_pic := image( for i = xpart llcorner q step 1.5u until xpart urcorner q: for j = ypart llcorner q step 1.5u until ypart urcorner q: qq := ((-.25u,0){up}..origin{down}..{up}(0.25u,0)) randomized (u/15) shifted ((i,j) randomized 1.3u); if xpart (p intersectiontimes qq) < 0: thdraw qq; fi; endfor; endfor; ); clip tmp_pic to p; draw tmp_pic; enddef; initsymbol("p_u_mud"); initsymbol("l_u_mud"); initsymbol("a_u_mud"); def p_altitude(expr pos)= T:=identity shifted pos; pickup PenD; p:=(-.3u,0)--(.3u,0); thdraw p; thdraw p rotated 90; p:=fullcircle scaled .2u; thclean p; thdraw p; enddef; def l_rockborder (expr p) = if abs(llcorner p - urcorner p) > u: l_rockborder_UIS(p); fi; enddef; def l_u_cliff (expr P) = % pickup PenD; % draw P withcolor red; T:=identity; cas := 0; dlzka := arclength P; if dlzka > 0: mojkrok:=adjust_step(dlzka, 4.5u); pickup PenA; forever: t1 := arctime (cas + mojkrok*1/10) of P; t2 := arctime (cas + mojkrok*9/10) of P; q := ((point t1 of P) + .4u * unitvector(thdir(P,t1) rotated -90)) -- (subpath (t1,t2) of P) -- ((point t2 of P) + .4u * unitvector(thdir(P,t2) rotated -90)); thdraw q randomized (u/6); cas := cas + mojkrok; exitif cas > dlzka - (2*mojkrok/3); % for rounding errors endfor; fi; enddef; initsymbol("l_u_cliff"); def l_rockedge (expr p) = if abs(llcorner p - urcorner p) > u: l_rockedge_UIS(p); fi; enddef; vardef p_label@#(expr txt,pos,rot,mode) = if mode=1: thdrawoptions(withcolor .8red + .4blue); p_altitude(pos); % append "m" to label picture txtm; txtm:=image( draw txt; interim labeloffset:=0; label.urt(btex \thaltitude m etex, lrcorner txt); ); % give extra offset in case of l/r/t/b alignment pair ctmp; ctmp:=center thelabel@#("x", (0,0)); if (xpart ctmp * ypart ctmp)=0: interim labeloffset:=(.4u); else: % diagonal alignment interim labeloffset:=(.2u); fi; % draw label lab:=thelabel@#(txtm, pos); draw lab _thop_; % use color thdrawoptions(); bboxmargin:=0.8bp; write_circ_bbox((bbox lab) smoothed 2); else: if mode=7: interim labeloffset:=(u/8) fi; lab:=thelabel@#(txt, pos); if mode>1: pickup PenD fi; if mode=2: process_uplabel; elseif mode=3: process_downlabel; elseif mode=4: process_updownlabel; elseif mode=5: process_circledlabel; elseif mode=6: process_boxedlabel; elseif mode=7: process_label(pos,rot); % station name elseif mode=8: process_filledlabel(pos, rot); else: process_label(pos,rot); fi; fi; enddef; def s_scalebar (expr l, units, txt) = begingroup interim warningcheck:=0; tmpl:=l / Scale * cm * units / 2; tmpx:=l / Scale * cm * units / 5; tmph:=5bp; % bar height endgroup; pickup PenC; draw (-tmpl,0)--(tmpl,0)--(tmpl,-tmph)--(-tmpl,-tmph)--cycle; p:=(0,0)--(tmpx,0)--(tmpx,-tmph)--(0,-tmph)--cycle; for i:=-2.5 step 2 until 2: fill p shifted (i * tmpx,0); endfor; begingroup interim labeloffset:=3.5bp; for i:=0 step (l/5) until (l-1): tmpx:=tmpl * (i * 2 / l - 1); label.bot(thTEX(decimal (i)),(tmpx,-tmph)); endfor; label.bot(thTEX(decimal (l) & "\thinspace" & txt),(tmpl,-tmph)); label.top(thTEX("Original Scale 1 : " & decimal (Scale*100)),(0,0)); endgroup; enddef; def s_northarrow (expr rot) = begingroup interim defaultscale:=0.7; % scale your north arrow here T:=identity scaled defaultscale rotated -rot; interim linecap:=squared; interim linejoin:=rounded; thfill (-.5cm,-.1cm)--(0,2.5cm)--(.5cm,-.1cm)--cycle; pickup pencircle scaled (0.08cm * defaultscale); thdraw (0,0)--(0,-2.5cm); pickup pencircle scaled (0.16cm * defaultscale); p:=(0.4cm,0.6cm); thdraw ((p--(p yscaled -1)--(p xscaled -1)--(p scaled -1)) shifted (0,-1.0cm)); label.rt(thTEX("mg") scaled 1.6, (.6cm,-1.6cm)) transformed T; endgroup; enddef; 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 } endlayout text en "line u:cliff" "cliff" text en "point u:entrance" "entrance" text en "area u:mud" "mud" text en "point u:mud" "mud" text en "point sand" "clastic sediment" text en "line u:steps" "steps"