encoding utf-8 source Castleton_model.th select Castleton_modelMP@castleton_model export map -projection plan -layout LayoutLandscapeA0 -o outputs/HarrisonSpeedwell.pdf layout LayoutLandscapeA0 #PAGE LAYOUT # page-setup . set page dimensions in this order: paper-width, #paper-height, page-width, page-height, left-margin and top-margin. page-setup 118.9 84.1 112.9 77.1 1.5 1.5 cm overlap 3 cm size 105 80 cm ##105 80 color map-fg altitude rotate 180 ###AG this was added in for John Harrison 15.07.24 base-scale 1 500 scale 1 1500 symbol-set BCRA symbol-hide group cave-centreline min-symbol-scale m #this hides all symbols smaller than m, therefore s and xs labels from above will be hidden scale-bar 250 m map-header 41 41 ne map-header-bg on cs OSGB:SK doc-subject "Survey of Peak Speedwell System. 2024" doc-author "Wayne Sheldon, Alastair Gott" map-comment "Drawn by Wayne Sheldon and Alastair Gott. Copyright 2024 Technical Speleological Group.
In Memory of the Late John S Beck.

Surveyed By: Tim Allen, Steven Ancliffe, Dave Arveschoug, Nigel Ball
John S Beck, Allan Brentnall, Luke Brock, Simon Brooks, Mark Brown
David Botcherby, Luke Cafferty, John N Cordingley, Charley Cooley
John C Cooper, Paul Deakin, Katie Eavis, Robert Eavis, Alastair Gott
Adrian Gregory, John Gunn, Brian Hague, Olly Hall, John D Harrison
Tim Horne, Terry Jackson, Keith Joule (nee Bottoms), Jim Lister, Anthony Marsden
Louise McMahon, Mark McAuley, John Middlemiss, Rob Middleton, Ted Mullins
Dave A Nixon, Mark Noble, Pete O'Neill, Shaun L Puckering
John Randles, Alex Ried, Glyn Roberts, Roy Rodgers, Henry Rockcliffe
Luke Rowe, Matt Ryan, Leslie Salmon, Angus Sawyer, Richard Shaw, Wayne Sheldon
Dave Shearsmith, Robbie Shone, Guy Smith, Sam Stringer, Ann Soulsby
Joze Taylor, Laurence Thistlewood, Jeff Wade, Tim Webber, Clive Westlake
Bill Whitehouse, Edd Willatts, Phil Wolstenholme

Please note, length includes all caves and mines shown code metapost ### change the Grid defined by AG as Line:User:Grid, in Excelgrid.th to be a dotted line by robbing code from the metapost for map-connection and amending it to make the arrowhead small/insignificant to the naked eye and the dots spaced further apart initsymbol("l_u_grid"); def l_u_grid (expr P) = thdrawoptions(dashed evenly scaled (20 * optical_zoom) withpen PenA); l_arrow_SKBB(P,1); thdrawoptions(); enddef; ### define compass rose to be Northarrow 1 as per Thomas Holder, https://therion.speleo.sk/wiki/metapost#north_arrows def s_northarrow (expr rot) = begingroup interim defaultscale:=0.5; % scale your north arrow here T:=identity scaled defaultscale rotated -rot; pickup pencircle scaled (0.08cm * defaultscale); thdraw (-.4cm,-1.4cm)--(0,2.8cm)--(.4cm,-1.4cm)--cycle; p:=fullcircle scaled 1.6cm; thclean p; thdraw p; p:=(0.95cm,0)--(0.65cm,0); thdraw p; thdraw p xscaled -1; pickup pencircle scaled (0.12cm * defaultscale); p:=(0.28cm,0.42cm); thdraw p--(p yscaled -1)--(p xscaled -1)--(p scaled -1); endgroup; enddef; ###define scalebar to be scalebar 2b as per B. Hallinger from https://therion.speleo.sk/wiki/metapost#north_arrows def s_scalebar (expr l, units, txt) = % l = value of scale-bar length % units = ?? % txt = string representing units begingroup interim warningcheck:=0; tmpl:=l / Scale * cm * units / 2; % tmpl = half plotted length of scale bar from central top insertion point 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:=-0.5 step 2 until 2: % start drawing at the third block (leave space for smaller divisions) fill p shifted (i * tmpx,0); endfor; % Draw first part with subdivided blocks p:=(0,0)--(tmpx/5,0)--(tmpx/5,-tmph)--(0,-tmph)--cycle; % define width of segment (tmpx is length of a normal bar segment) for i:=-2.5 step 2/5 until -0.75: % Startpos, segments, count-index fill p shifted (i * tmpx,0) withcolor black; endfor; % Label of scale: Scalebar top, values below 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("Scale 1 : " & decimal round(Scale*100)),(0,0)); endgroup; enddef; ### define water to be light blue def a_water (expr p) = T:=identity; thfill p withcolor (0.48, 0.84, 1.0); enddef; ### define sump to be dark blue def a_sump (expr p) = T:=identity; thfill p withcolor (0.05, 0.0, 0.7); enddef; endcode code metapost fonts_setup(12,16,18,24, 28); #font size 0.01 is invisible, but text still adds kilobytes to file size #these fonts look OK scaled half size,but 8,9 a bit small 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