On Thu, Jan 29, 2009 at 3:23 AM, Bruce Mutton <bruce.mutton@paradise.net.nz> wrote:
The question is… How to implement selective printing of labels to pdf outputs?
just add following to the options for point labels you want to show (all other labels will be hidden): -attr visibility on ('visibility' and 'on' are just strings you can freely choose; just match them in the metapost macros) and use modified label definition in code tex-mpost vardef p_label@#(expr txt,pos,rot,mode) = if known ATTR_visibility: if ATTR_visibility="on": % ADDED CONDITIONS if (mode=1) or (mode=7): interim labeloffset:=(u/8) fi; lab:=thelabel@#(txt, pos); if mode>1: pickup PenD fi; if mode=1: pickup pencircle scaled (u/6); drawdot(pos); process_label(pos,0); elseif 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; fi; % END OF CONDITIONS enddef; Martin