ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: afsmith <adventurecomplete@gmail.com>
To: ntg-context <ntg-context@ntg.nl>
Subject: sections, subsections, indenting, startnarrower, alignment
Date: Fri, 22 May 2009 14:40:00 -0700	[thread overview]
Message-ID: <5df5befa0905221440i7248c5b5y82e18d9a3b1dc687@mail.gmail.com> (raw)

Hi again ntg-context.

I have been working on my own CV/Resume module. Up until now I've just
been asking about specific bits of the implementation of this thing I
want to do, but perhaps that was a mistake as it hasn't really helped
progress much, so:
What I am trying to achieve is to define some three-argument command
to give a section/subject header and a date, and then a block of text.
The header and date should be on the same line, but aligned in either
direction (subject aligned left, date aligned right)
This block of text underneath it should be indented and able to
include an instance of the same command. Let me try to explain the
desired output in a little monospaced text diagram..

|(Subject)_______________________(Date)|
|__(Subsubject)__________________(Date)|
|____texttexttexttexttexttexttexttext__|
|____textmoretextmoretextmoretexttext__|
|__(Subsubject)__________________(Date)|
|____texttexttexttexttexttextexttext___|
|____textmoretextmoretextmoretexttext__|

The "subject" and "subsubject" parts don't need to literally use
"\subject" , for example I also tried to use "\start(description){..."
for this purpose as well but that failed equally. Just something that
works reasonably as a section header.

I promise I have looked in the archives before asking :) for example
http://www.mail-archive.com/ntg-context@ntg.nl/msg21111.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg37664.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg11337.html
http://www.mail-archive.com/ntg-context@ntg.nl/msg17276.html

And here is an example of something I was playing with...

-------------------
\definehead[mysubject][subject]

\defineframed[lrframe][
width=\localhsize,
align=normal,
rulethickness=1pt]

\setuphead[mysubject][style={\bf}]
\define[3]\CHRONSUBJ
{\mysubject{\dontleavehmode\lrframe{#1\hfill#2}}
\startnarrower[left]{#3}\stopnarrower}

\showframe[text]
\starttext
\CHRONSUBJ
  {This happened from June 08 to June 09}
  {06/08--06/09}
  {\CHRONSUBJ
    {This happened from June 08 to December 08}
    {06/08--12/08}
    {\input tufte }
  \CHRONSUBJ
    {This happened from January 09 to June 09}
    {01/09--06/09}
    {\input zapf }}
\stoptext
-------------------

-A
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


             reply	other threads:[~2009-05-22 21:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 21:40 afsmith [this message]
2009-05-26 12:05 ` Amaël Broustet
2009-05-26 20:53 afsmith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5df5befa0905221440i7248c5b5y82e18d9a3b1dc687@mail.gmail.com \
    --to=adventurecomplete@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).