1

all I want to use conTeXt for writing my resume, I found the head like the red area very awesome, but I don't know how to implement it, or what elements I should use to do it? After reading something, I only think I should have a specific head, I am right?

enter image description here

​please any one help me, Thanks in advance!

UPDATED: I found context refer manual 11.3 Variations in titles , there is a snippet, which seemly helps me, the following code:

\setupcolors[state=start]
\setuppagenumbering[location=footer, right]
\unexpanded\def\HeadTitle#1#2%
{\hbox to \hsize \bgroup
\hfill
\setupframed[height=5cm,offset=.5em,frame=off,backgroundcolor=red]
\framed[width=8cm,align=left]{#1}%
\framed[width=12cm,align=right,leftframe=off]{#2}%
\egroup}
\setuplayout
[topspace=\zeropoint,
 height=fit,
 footerdistance=2cm]
 \showframe
 \useURL[aurl][http://cs.ucsd.edu/~mmoghimi][][
 http://cs.ucsd.edu/~mmoghimi]
 \starttext
 \HeadTitle{{\tfb Mohammad Moghimi}

Curriculum Vitae}{9234 Regents Rd Apt H

La Jolla, CA, 92037

(858) 888-3337

mmoghimi@cs.cornell.edu

\url[aurl]}
\stoptext

It will generate almost satisfied result:

enter image description here

Only question is that what should I do for adding a wider blank between the left and right side?

  • It looks like moderncv class to me, but I don't think that class has ConTeXt support. (But I very well may be wrong about ConTeXt support.) – Paul Gessler Jul 4 '15 at 0:09
  • @PaulGessler, it is for Latex, but thank you! – abelard2008 Jul 4 '15 at 0:18
  • @PaulGessler, I updated my question , can you help me now? Thanks! – abelard2008 Jul 4 '15 at 3:07
  • Where it says align=left and align=right, you probably want them the other way around. – cfr Jul 4 '15 at 3:25
2

Caveat emptor ...

You should know that I do not recall ever running context before and, judging by the first run, context doesn't recall my ever running it either. (Why is it trying to glob what it thinks are weird filenames like ChangeLog?)


Anyway, I got this

output

from this

\setupcolors[state=start]
\setuppagenumbering[location=footer, right]
\unexpanded\def\HeadTitle#1#2%
{\hbox to \hsize \bgroup
\hfill
\setupframed[height=5cm,offset=.5em,frame=off,backgroundcolor=red]
\framed[width=.5\textwidth,align=right]{#1}%
\framed[width=.5\textwidth,align=left,leftframe=off]{#2}%
\egroup}
\setuplayout
[topspace=\zeropoint,
 height=fit,
 footerdistance=2cm]
 \showframe
 \useURL[aurl][http://cs.ucsd.edu/~mmoghimi][][
 http://cs.ucsd.edu/~mmoghimi]
 \starttext
 \HeadTitle{{\tfb Mohammad Moghimi}

Curriculum Vitae}{9234 Regents Rd Apt H

La Jolla, CA, 92037

(858) 888-3337

mmoghimi@cs.cornell.edu

\url[aurl]}
\stoptext

which is surely bad in all kinds of ways I don't know about!

  • Yippee! Images came back again! I can even see my own!! – cfr Jul 4 '15 at 3:37
  • You are great! Thank you very much! Your answer make me step further in conTeXt! – abelard2008 Jul 4 '15 at 3:44
  • Only question, What's meaning of ".5\textwidth"? Thanks! – abelard2008 Jul 4 '15 at 3:47
  • @abelard2008 the \textwidth is equal to the width of the text block (the paper width less the left and right margins, offset etc.) ..5 just says to use half of that for each frame. – cfr Jul 4 '15 at 12:52
1

One option is to use a table, for example, tabulate

\showframe % For visual debugging

\useURL[aurl][http://cs.ucsd.edu/~mmoghimi][][http://cs.ucsd.edu/~mmoghimi]
\starttext
\starttabulate[|lp(0.5\textwidth)|rp(0.45\textwidth)S|]
  \NC {\tfb Mohammad Moghimi}\crlf 
      \italic{Curriculum Vitae}
  \NC 9234 Regents Rd Apt H \crlf
      La Jolla, CA, 92037 \crlf
      (858) 888-3337 \crlf
      mmoghimi@cs.cornell.edu \crlf
      \url[aurl]
  \NC \NR
\stoptabulate
\stoptext

which gives

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.