Hi Martin,
 
many thanks for the code. Admitting that I am a Tex novice I played around with it (at least I was able to finde the missing } at the end straight away :).
I tried the code on several files and it does the magic.
Now the only question is how to get the labels in normal font and not italic...
 
For people who are interested, here is my solution with some comments on what to do (as far as my knollege goes):
 
#metapost and tex changes to extend elevation gridlines and place altitude labels above grey gridline
#works only for exteded elevation
 
#make gridline continuos and longer on the ends   
   code metapost    
    def s_vgrid (expr xpos, ypos, xsize, ysize) =
    pickup PenD;
    draw
      (if xpos < 0: -22 else: -xsize/2 fi, 0) %-22 extends the grid to the left
       --
      (if xpos > 0: 24 else: xsize/2 fi, 0)    %24 extends grid to the right.
                                                              %note that it is slightly longer to match the label-length
      withcolor 0.1black+0.7white;            %+0.7white makes the gridline grey instead of black
    enddef;
  endcode  
 
#change position of labels outside the mapbox and raise them ontop the grid
  code tex-map
    \def\gridcoord#1#2{\hbox to0pt{%
      \ifnum#1=3\hss\fi
      \ifnum#1=9\hss\fi
        \vbox to0pt{%
          \vss
          \kern-10pt%                           %places the label above the gridline
          \hbox{\kern2pt#2\kern0pt}   %'#2' = altitude label
          \kern2pt%                              %shifts back to normal placement for following labels
        \vss
    }%
  \ifnum#1=1\hss\fi
  \ifnum#1=7\hss\fi
  }%
  }
  endcode
 
thanks a lot,
Axel
Gesendet: Montag, 27. Juli 2020 um 21:43 Uhr
Von: "Martin Budaj" <m.bu...@gmail.com>
An: "List for Therion users" <therion@speleo.sk>
Betreff: Re: [Therion] Extended Gridl ines longer and other font for altitude
Hi,
 
you can modify the appearance of lines (using s_vgrid MetaPost macro as you tried) and also the alignment of the altitude labels (using \gridcoord TeX macro).
 
This modification (it's simplified and wouldn't work for the plan projection) displays coordinates on the outer side of the imaginary map box, vertically centered on the elevation lines:
 
\def\gridcoord#1#2{\hbox to0pt{%
  \ifnum#1=3\hss\fi
  \ifnum#1=9\hss\fi
    \vbox to0pt{%
      \vss
      \kern2pt%
      \hbox{\kern2pt#2\kern2pt}%
      \kern2pt%
      \vss
    }%
  \ifnum#1=1\hss\fi
  \ifnum#1=7\hss\fi
  }%
 
Cheers
Martin
 
 
On Sun, Jul 26, 2020 at 10:55 AM Axel <dropst...@gmx.de> wrote:
Hi all,
 
I am looking for a way to extend the gridlines in an extended elev to the left and right that the alitude notations don't cover the survey.
If u think of the survey as a box it would be good to have the altitude-notations outside this box (in fact I think this is a bug).
 
I tried to change the s_vgrid definition a bit but only achieved that my lines get longer and are dashed again (if xpos < -1: 0). Text won't move though...
It also would be nice to get a non italic font for the notations. I guess the key is to know where Therion actually generates the grid?
 
would be greate if someone could give me a kick in the right direction
 
cheers,
Axel Hack
_______________________________________________
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion
_______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
_______________________________________________
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion

Reply via email to