metapost

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revisionBoth sides next revision
metapost [2019/12/02 13:01] – Credits tarquinwjmetapost [2019/12/08 19:06] – Centreline that is only visible when not in a scrap tarquinwj
Line 1363: Line 1363:
  
   text en "line u:shoring" "shoring/bars"   text en "line u:shoring" "shoring/bars"
 +
 +===Centreline that is only visible when not in a scrap===
 +
 +[[user:tarquinwj|Tarquin 2019]]
 +
 +Sometimes, you might want to show a centreline for a section of the cave where you do not have any wall data, if you are using [[tips#Showing centreline for parts of a cave, and passage walls for others|a map made up from surveys and other maps]]. However, you might not want to show the walls within your regular scraps where you have wall data, since they are distracting and meaningless for viewers. There is no setting for this, since "symbol-hide group centreline" affects all centrelines at once, so it must be done through MetaPost:
 +
 +<code>
 +code metapost
 +  def l_survey_cave_MY(expr P) =
 +    if ATTR__scrap_centerline:
 +      l_survey_cave_SKBB(P);
 +    fi;
 +  enddef;
 +  initsymbol("l_survey_cave_MY");
 +endcode
 +</code>
 +
 +You may notice the misleadingly named "ATTR__scrap_centerline", which does not mean "centreline within a scrap". Instead, it means "a virtual scrap automatically created, made up entirely of centreline", which is what Therion creates when you ask it to include survey data within a map.
 +
 +Use it with this line in your layout:
 +
 +  symbol-assign line survey:cave MY
 +
 +You can use a similar approach for l_survey_surface_MY (surface survey legs), p_station_temporary_MY, p_station_natural_MY, p_station_painted_MY and p_station_fixed_MY (survey stations) if you needed to show those outside too.
 ====Area Symbols====  ====Area Symbols==== 
 ===Show area water in a different color=== ===Show area water in a different color===
  • metapost.txt
  • Last modified: 21 months ago
  • by tarquinwj