groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Using groff & tbl for creating a CV


From: Tadziu Hoffmann
Subject: Re: [Groff] Using groff & tbl for creating a CV
Date: Thu, 11 Aug 2011 12:05:24 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

> > [...] the date will be broken along two (or maybe more)
> > lines, but the .Company will start with the first line of
> > the date.

> I'll try something along the lines of formatting both date and
> company into separate diversions, and then printing those
> diversions at the beginning of the description macro.

Okay, here's a little update which does just that.  It doesn't
actually align the lines, but uses a mark/return scheme to print
the two diversions side-by-side at the same vertical place, so
the "date" and "company" lines will only align if you don't use
non-default line heights.

The macros must be called in the order "Date", "Company", "Desc",
otherwise the diversions will not be properly begun and ended.


.\"
.\" ----------------------------------------------------------------
.po 3c
.sp 3c
.nr Ll 15c \" line length
.nr Dw 3c  \" date width
.nr Cw .5c \" column separator width
.nr Tw \n[Ll]u-\n[Dw]u-\n[Cw]u \" description text width
.\" ----------------------------------------------------------------
.de Date
.in 0
.ft 2
.ll \\n[Dw]u
.ad l
.di Dd
..
.de Company
.br
.di
.nr Dh \\n[dn]
.in 0
.ft 3
.ll \\n[Tw]u
.ad l
.di Td
..
.de Desc
.br
.di
.if \\n[dn]>\\n[Dh] .nr Dh \\n[dn]
.ne \\n[Dh]u+5v
.sp 2
.ll \\n[Ll]u
.in 0
.mk
.nf
.Dd
.rt
.in \\n[Dw]u+\\n[Cw]u
.Td
.rt
.sp \\n[Dh]u
.in 0
\v'-.5m'\D'l \\n[Ll]u 0'
.in \\n[Dw]u+\\n[Cw]u
.fi
.ft 1
.ad b
..
.de BL
.in +2n
..
.de LE
.sp .2
.in -2n
..
.de LI
.sp .2
\Z'\h'-1.3n'\[bu]'\c
..
.\" ----------------------------------------------------------------
.Date
Since 05/2006
.Company
My Company in Downtown which has a very long name
and needs at least two lines to print (just for fun)
.Desc
This is the role I occupied
.BL
.LI
Working on this
.LI
Working on that
(the description of which is also rather long, so we can test
what happens when it needs more than one line)
.LI
Achieved lots of things
.LE
But now, this is going to be a rather lengthy description of a task
that I had which is so long that groff is complaining about the length
of the line
.Date
07/2003\[en]04/2006
.br
(at least I think so)
.Company
Yet Another Company I Worked For
.Desc
The role I had there
.BL
.LI
Some more tasks
.LI
You will get the idea
.LE
.\" ----------------------------------------------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]