How would one implement the Friggeri CV1[2] in ConTeXt? I'm new to TeX and have read:
For the year-entry timeline I'm thinking either tabulation or paragraph columns. For the actual entries (title, place, short italic description) a three-argument macro wrapping either a newly-defined head or concept. That, or typeset myself using font switches and \hfill.
My main problems are twofold
- the full pagewidth grey-background header on only the first page
- column split between contact information and the main content
Regular columns or column sets aren't compatible because the columns overflow into each other. They also don't handle smaller fonts or varying interline spacing. Pseudo-columns as per "It's in the details" using vtops manually aligned to the grid are really only suitable for static non-text layouts such as magazine covers. You have to recreate the layout on each new page and manually split the content across pages. I've had the most luck using margin blocks with a wide left margin but unfortunately - and I think this is due to the float positioning - the inter-block (heads, paragraphs) spacing is all wonky and I can't adjust it.
I've tried to use custom headers, heads, overlays, and/or framed text to simulate the topmost head containing the full name. The main stumbling block is placing content outside of a predefined section - margin, header, foot, text, etc. In this case it must span the topspace, the header, and the headerdistance from the left edge to the right edge.
1 http://www.latextemplates.com/templates/curriculum_vitaes/10/cv_10.pdf
[2] https://github.com/akanosora/friggeri-cv/blob/master/friggeri-cv.cls
New to ConTeXt, so if you post something not covered in the material I've read (above) I'd appreciate if you could explain it or link to explanatory documentation.
Here is where I setup the misaligned columns and try to use a header for the top part:
\setuppapersize[letter]
\setuplayout
[ backspace=2.5in,
width=5.5in,
leftmargin=1.75in,
rightmargin=0in,
leftmargindistance=0.25in,
]
%\setuplayout
% [ backspace=0.3\pagewidth,
% width=0.65\pagewidth,
% leftmargin=0.2\pagewidth,
% rightmargin=0in,
% leftmargindistance=0.03\pagewidth,
% ]
\setupmarginblock
[ location=left,
width=\leftmarginwidth,
align=flushright,
]
\definehead[mhead][subject]
\setuphead[mhead][margin=0cm,align=flushright]
\definehead[phead][subject]
\setuphead[phead][margin=0cm]
\startsetups[headertext]
\startframed
[ location=middle,
frame=off,
offset=-20cm,
height=2cm,
width=\pagewidth,
background=color,
backgroundcolor=blue
]
jkl
\stopframed
\stopsetups
\setupheadertexts[\directsetup{headertext}]
\setupheader[margin][state=none]
\setupheader[edge][state=none]
\setupheader[text][state=none]
\showframe
\starttext
\startmarginblock
\mhead{Doesn't}
\input ward
\stopmarginblock
\phead{Align}
\input knuth
\stoptext
And here I try to use framed text instead of a header. The options aren't documented so I kind-of took a shotgun approach:
\setuppapersize[letter]
\definehead[name][title]
\setuphead[name]
[ align=left,
alterantive=middle,
margin=-2.55cm,
textcolor=white,
]
\setupheader[state=none]
\showframe
\starttext
\name{
\framed
[ height=5cm,
background=color,
backgroundcolor=darkgray,
width=\pagewidth,
frame=off,
location=top,
offset=overlay,
leftframe=on,
margin=no,
]
{ASDF}
}
\stoptext
And this is why pseudo-columns don't work: ignoring \setupwhitespace and not overflowing to the next page:
\setuppapersize[letter]
\setupwhitespace[big]
\setuplayout
[ grid=yes
, columndistance=12pt
, columns=3
]
\showgrid
\definelayer [text] \setupbackgrounds [text] [background=text]
\starttext
\setlayer [text] [column=1,line=12,location=grid]
{\vtop {\hsize\layoutcolumnwidth
\startalignment[flushright,nothyphenated]
nitty
\input knuth
\input ward
\stopalignment
}}
\stoptext
Here is an example showing the alignment problem I encountered when extending the answer with \defineparagraphs:
\setuppapersize[letter]
\setuplayout
[backspace=2.5in,
width=5.5in,
leftmargin=1.75in,
rightmargin=0in,
leftmargindistance=0.25in,
%
topspace=1.5in,
height=9.25in,
header=0.25in,
headerdistance=0in,
footer=0.25in,
footerdistance=0.25in,
]
\setupbodyfont[sans]
\setupmarginblock
[location=left,
width=\leftmarginwidth,
align=flushright,
]
\defineparagraphs[timeline][n=2]
\setupparagraphs[timeline][1][width=4em]
\define[1]\heading{
\leavevmode{
\bfb
\setupinterlinespace
\strut#1
}
\blank[small]
}
\defineparagraphs[testpar]
\setupparagraphs[testpar][each][before={\blank[back]},]
\starttext
\startmarginblock
\heading{Does}
\input ward
\stopmarginblock
\heading{Align}
%\startparagraph
%This paragraph is aligned to the one in the margin.
%\stopparagraph
% To see the problem, comment out the previous paragraph and uncomment this
% paragraph.
\starttestpar
This paragraph is aligned well below the one in the margin.
\stoptestpar
% Same problem with tabulation
%\starttabulate[|w(4em)|p|]
%\NC 2011-2012
%\NC \input knuth
%\NC\NR
%\stoptabulate
\stoptext


\vtopwhere the margin used to be? Is it possible to place the\vtopwithout using layers? – user19087 Nov 14 '18 at 02:21