[Therion] Increase size of legend

Bill Gee bgee at campercaver.net
Tue Nov 14 15:07:33 CET 2017


Hello everyone -

I have managed to get what I want, though I do not completely understand why 
it works.  Thanks to Bruce and Torsten for valuable pointers.

The attached file is my thconfig with modifications for the large legend.  The 
layout for "mainmapprint" contains the MetaPost and TeX code.

In truth, I think the main reason I am getting the large legend now is because 
I changed the scale to 1:800.  When I looked at the relation between the 
desired size of printout and the bounding box of the cave, I get a ratio in 
the range of 1:800.  It is actually 1:851 for north-south and 1:705 for east-
west, so 1:800 seems a reasonable middle ground.

I tried various "base-scale" settings but could not see any visible change.  
It was effectively a null setting.

I discovered some other issues while testing.  First, the settings for "debug 
station-names" and "symbol-show group centerline" are apparently global.  If 
they are set in any layout-endlayout section, then they are set for all 
subsequent layouts.  Is that how they should behave?

Second - I want to add the current date and Therion version to the legend.  
The TeX code includes \the\currentdate and \the\thversion.  Both items do show 
up on the legend, just below the symbol table.  However, they totally ignore 
the {\size[]} option.  Is that option implemented for these TeX macros?  It 
does not produce any errors when compiling the map.  It also does not change 
anything!  Another null setting ...

The Therion Book on page 69 lists all of the TeX macros that can be used on 
map layouts.  However, it says NOTHING about what options and parameters are 
implemented.  The sample code in the Therion Book, on the Wiki and in the 
files Torsten sent me show some of these macros with options.  Is there a 
place where ALL options and parameters of ALL macros are documented?

Thanks!

-- 
Bill Gee



On Friday, November 10, 2017 1:18:45 AM CST Bruce Mutton via Therion wrote:
> Hi Bill
> If I were in your situation (as I think I have been from time to time), then
> I would opt for targeting an exported map that was close to the 3'x2' paper
> size when printed at full size.  I would do this by using 'scale 1 xxx'
> where xxx is one of the preferred scales that gives you close to the right
> paper size. That is assuming the full size legend, north arrow, header text
> are more or less the right size for your needs, or only need minor tweaks.
> 
> Then if some symbols are not quite right, I would limit my code
> customisation to only those symbols.  Judging by examples you have posted
> on the wiki, you are pretty good at this.  Examples in
> https://therion.speleo.sk/wiki/metapost#cave_symbol_size_and_density_exampl
> es provide some patterns to guide changes in fill density, and the
> discussion near the top of the page about variables u, v and w might be
> helpful.
> 
> As Felix mentioned, you can tweak text and symbol size with 'base-scale 1
> yyy', if you want to optimise for printing larger or smaller than full
> size.
> 
> Seems to me that this approach is likely to be the path of least resistance,
> requiring only changes to your layouts and some metapost. Optimising
> standard output elements for printing at the 'wrong size' just seems
> counter productive to me.
> 
> I should admit however that I tend to avoid using fills like clay, sand,
> debris, blocks, and rather use points.  That avoids the fill density issues
> you describe, but I appreciate if you already have a large investment in
> area fills your approach may be tempting.
> 
> Bruce
> 
> -----Original Message-----
> From: Therion [mailto:therion-bounces at speleo.sk] On Behalf Of Bill Gee via
> Therion Sent: Friday, 10 November 2017 8:37 AM
> To: List for Therion users <therion at speleo.sk>
> Cc: Bill Gee <bgee at campercaver.net>
> Subject: Re: [Therion] Increase size of legend
> 
> Hi Bruce -
> 
> The reason for 1m x 0.6m paper (actually 3 feet by 2 feet) is because that
> is the size of the frame that the landowner wishes to display the map in. 
> It is also the largest size we can get printed for any reasonable cost.
> 
> I've been using 1:200 for this map.  Scales of 1:500 and higher make the
> fills on the map too sparse.  A clay area might have one clay symbol in it.
>  Scales below 1:200 make the fills too dense.
> 
> --
> Bill Gee
> 
> On Thursday, November 9, 2017 1:02:00 PM CST Bruce Mutton via Therion wrote:
> > Hi Bill
> > 
> > Sounds like you need to print on a larger piece of paper. 1m x 0.6m is
> > quite modest.  I presume you are not printing your pdf file out at the
> > full size that Therion generated it at.
> > 
> > I have not had any legend size issues with a 30km cave, although I must
> > admit that I do with very small caves, where the legend ends up much
> > bigger
> > than the cave itself!
> > 
> > If you want to fit your cave to paper of a particular size, then change
> > the
> > scale.  I rarely use anything less than 'scale 1 1000' for a cave longer
> > than 1km.
> > 
> > To be precise about fitting the cave to a particular paper size, then
> > 'export atlas' will give a better result than 'export map', although of
> > course atlas do give quite a different end product, and take a bit more
> > care and attention to set up well.
> > 
> > 
> > 
> > Bruce
> > 
> > 
> > 
> > From: Therion [mailto:therion-bounces at speleo.sk] On Behalf Of Bill Gee via
> > Therion
> > Sent: Friday, 10 November 2017 2:45 AM
> > To: Therion Mail List <therion at speleo.sk>
> > Cc: Bill Gee <bgee at campercaver.net>
> > Subject: [Therion] Increase size of legend
> > 
> > 
> > 
> > Hello everyone -
> > 
> > 
> > 
> > I need to make the legend on a map larger. The cave has grown to nearly
> > 3km
> > of passage, and even when printed on 60cm x 100cm paper the legend is too
> > smal to read. Even a magnifying glass does not help!
> > 
> >  . snipped.
> > 
> > Thanks!
> 
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> https://mailman.speleo.sk/listinfo/therion
> 
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> https://mailman.speleo.sk/listinfo/therion

-------------- next part --------------
encoding  utf-8
source AllieSpringCave.th
input ../TherionMasterFiles/CustomSymbolsCode.txt

# This layout is for the main 2D map, all on one page
layout basics
	units imperial
	scale-bar 50 feet
	page-numbers on
	north true
	rotate 0
	symbol-color group centerline [0 80 0]
	symbol-color area water [0 0 100]
	map-comment "A compass and tape survey of Allie Spring Cave (PUL-317), Pulaski County, Missouri"
	statistics explo all
	legend on
	map-header 3 65 w
	symbol-set UIS


# Section for PDF properties
	doc-author "Bill Gee"
	doc-title "Map of Allie Spring Cave (PUL-317)"
	doc-subject "Plan map of Allie Spring Cave (PUL-317)"

# Section for map photos

# Add in the elevations maps
# Entrance passage profile
#   map-image 0 -3 nw AllieSpringCaveElev1.pdf
   
# D side passage profile
#   map-image 8 41 sw AllieSpringCaveElev2.pdf
   
# C side passage profile
#   map-image 24 5 sw AllieSpringCaveElev3.pdf
   
# B side passage profile - Main cave passage
#   map-image 20 100 sw AllieSpringCaveElev4.pdf
   
# B side passage profile part two
#   map-image 20 93 sw AllieSpringCaveElev5.pdf

# Bring in the custom symbols
  copy CustomSymbols

# Reassign names 
  symbol-assign point gradient AMER
  symbol-assign point stalagmite AMER
  symbol-assign point stalactite AMER
  symbol-assign point pillar AMER
  symbol-assign point popcorn AMER
  
endlayout

layout mainmapnocolor
  copy basics
  symbol-show group centerline
  debug station-names
  scale 1 200
  color map-fg [100 86 66]
endlayout

layout mainmapwithcolor
  copy basics
  symbol-show group centerline
  debug station-names
  scale 1 200
  color map-fg altitude
endlayout

layout mainmapprint
  copy basics
  scale 1 800
  debug off
  symbol-hide group centerline
  color map-fg [100 86 66]

# Change the size of the legend
code metapost
   tmpscale=1.3;
   def draw_legend_box =
       % Next line controls size of symbol in each symbol table box
        currentpicture := currentpicture scaled tmpscale;
        % Next line controls size of symbol table box background
        clip currentpicture to unitsquare inscale xscaled tmpscale yscaled tmpscale;
        drawoptions();
        pickup PenB;
        % I think the next line controls the size of each symbol table box
        draw unitsquare inscale xscaled tmpscale yscaled tmpscale;
    enddef;
 
    %clear the background of the larger legend boxes   
    def clean_legend_box =
        unfill unitsquare inscale xscaled tmpscale yscaled tmpscale;
    enddef;
   
    %change the value of inscale to fill the legend boxes
    def inscale =
        xscaled (legend_scale*tmpscale) yscaled (0.618*legend_scale*tmpscale)
    enddef;
endcode
 
code tex-map
  \def\maplayout{
    \legendbox{3}{65}{W}{
      \def\txtsize{16}  % Define the default text size
      \legendwidth=20 cm
      \legendtextsectionsize={\size[\txtsize]}
      \legendtextsize={\size[\txtsize]}
      \legendtextheadersize={\size[40]}
      \hsize=\legendwidth
      \the\legendcontent={\size[\txtsize]}
      \the\currentdate={\size[30]}
      \the\thversion={\size[\txtsize]}
      }
  }
endcode 
#end of TeX code to change legend size
  
endlayout  

# Change the legend callouts
  text en_US "point u:stalagmaflat_AMER" "stalagmaflat"
  text en_US "line u:dripline_AMER" "dripline"
  text en_US "point u:pendant" "pendant"
  text en_US "point u:stromatolite" "stromatolite"
  
# Now list all the map files to be created.

# The main plan map
export map -proj plan -layout mainmapnocolor -o AllieSpringCave.pdf

# The main map for printing
export map -proj plan -layout mainmapprint -o AllieSpringCavePrint.pdf

# Main plan map with elevations colorized
export map -proj plan -layout mainmapwithcolor -o AllieSpringCaveColored.pdf

# Create an atlas map
export atlas -proj plan -layout mainmapnocolor -o AllieSpringCaveAtlas.pdf

# create a centerline map using XVI format
export map -proj plan -fmt xvi -o AllieSpringCave.xvi

# Create a 3d map for use with Loch
export model -fmt loch -o AllieSpringCave.lox

# Create a 3d map for use with Survex/Aven
export model -fmt 3d -o AllieSpringCave.3d

# Create a KML file for Google Earth
export map -proj plan -fmt kml -output AllieSpringCave.kml


More information about the Therion mailing list