[NTG-context] Fonts, nice looking headers, MetaFun and CV module

Gudmundur J. Kristjansson gjk at vitum.net
Mon Mar 19 08:05:16 CET 2007


Hi.

I'm been huffing and puffing the last few days trying to do my CV in 
ConTeXt. My previous version used the LaTeX Curve package and I was 
pretty happy with that.

I'm learning alot by doing this myself but some things have been pretty 
hard. The hardest: trying to some kind of fancy section headers. I'm 
pretty sure I should have been able to do this with the available 
documentation but I've read and read and not been able to find a 
solution.

Here's some of the things that my little brain can't comprehend:

1. I'm thoroughly confused about how fonts work. From various 
documents I found some that worked, for example:

\definetypeface [zapf] [cg] [calligraphy] [chancery]
\switchtotypeface [zapf] [12pt,cg]

or 

\setupbodyfont[ber,pos]

But I can't seem to find any place that lists the fonts I can use or 
how this actually works. Is there any standardized way, for example, 
to change font in headers or definitions of commands to affect only 
text in those definitions?

2. Fancy header with half of the text in background color (see headers 
in my former pdf at http://www.vitum.net/gjk/cv.pdf). 

I tried various things here. Using \framed, MetaFun and \setupbackground. 
For example:

\setupbackground
    [leftoffset=0.3cm,
     rightoffset=0.3cm
     topoffset=-0.5cm,
     bottomoffset=0.3cm,
     background=color,
     backgroundcolor=red]

I guess I'm misunderstanding the offset parameters.

3. Framed texts with titles:

As explained in the MetaFun manual (Section 4.6, page 236) I tried 
using the code in that section...

\FrameTitle{Zapf (1)}
\StartFrame
Coming back to the use of typefaces in electronic
publishing: many of the new typographers receive their
knowledge and information about the rules of typography from
books, from computer magazines or the instruction manuals
which they get with the purchase of a PC or software.
\StopFrame

\startuseMPgraphic{FunnyFrame}
  picture p ; numeric w, h, o ;
  p := textext.rt(\MPstring{FunnyFrame}) ;
  w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ;
  p := p shifted (2o,h-ypart center p) ; draw p ;
  drawoptions (withpen pencircle scaled 1pt withcolor .625red) ;
  draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ;
  draw boundingbox p ;
  setbounds currentpicture to unitsquare xyscaled(w,h) ;
\stopuseMPgraphic

defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]
defineframedtext[FunnyText][frame=off,background=FunnyFrame]
\def\StartFrame{\startFunnyText}
\def\StopFrame {\stopFunnyText }
\def\FrameTitle#1%
  {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}}
\setMPtext{FunnyFrame}{} % initialize the text variable

...and I have the following problems:
- The framing of the text is limited to a too narrow textwidth. I can't 
  seem to find where I change that in the code.
- Icelandic letters don't seem to work in titles or the text in the 
  frames. They do work in other places in the document, though.

Phew, that's enough for now. If any of you guys/gals have other ideas on 
how to do nice looking headers I'm open to everything.

Btw, I love using ConTeXt and really appreciate all your hard work.

P.S. Is there any CV package for ConTeXt out there? If not I could post 
my work (if people like what I did) to the ConTeXt wiki for others to use.

-- 
Best regards / Kær kveðja,
Gudmundur J. Kristjansson / Guðmundur J. Kristjánsson
gjk at vitum.net | gvendurjaki at gmail.com |
USA Tel. +347-821-9855.
Icelandic Tel. +354-893-4444.






More information about the ntg-context mailing list