ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Cecil Westerhof <cldwesterhof@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Drawing rectangles
Date: Thu, 12 Nov 2009 17:07:04 +0100	[thread overview]
Message-ID: <bb8b59590911120807m1bc51386x32d65cf97adf164c@mail.gmail.com> (raw)
In-Reply-To: <4AFC21DC.2060706@elvenkind.com>

2009/11/12 Taco Hoekwater <taco@elvenkind.com>:
> But that is just a joke. Try this:
>
> \startTEXpage
>
> \setupalign[middle]\offinterlineskip
>
> \noindent \framed[width=4cm,height=2cm,offset=none]{}
>
> \noindent \dorecurse{2}{\framed[width=4cm,height=2cm,offset=none]{}}
>
> \noindent \dorecurse{3}{\framed[width=4cm,height=2cm,offset=none]{}}
>
> \noindent \framed[width=2cm,height=4cm,offset=none]{}
>
> \stopTEXpage

I made this:
    \usemodule[defaults]

    \setupoutput[pdf]

    \setuplayout[header=0in,
    footer=0in]

    \defineframed
       [action][width=5cm, height=3cm, offset=none]
    \defineframed
       [base]  [width=3cm, height=2cm, offset=none]

    \starttext

    \setupalign[middle]\offinterlineskip

    \noindent \action{}

    \noindent \dorecurse{2}{\action{}}

    \noindent \dorecurse{3}{\action{}}

    \dorecurse{7}{
      \noindent \base{}

    }

    \stoptext

Work like a charm. There is only one minor problem: where frame's
touch eachother, the line is a little bit thicker. Is there something
to be done about this?

In this case I wanted everything to be centered, but is it possible to
define the point of the upper corner of a frame?

-- 
Cecil Westerhof
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2009-11-12 16:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 12:33 Cecil Westerhof
2009-11-12 14:45 ` Cecil Westerhof
2009-11-12 14:55 ` Taco Hoekwater
2009-11-12 16:07   ` Cecil Westerhof [this message]
2009-11-12 16:13     ` luigi scarso
2009-11-13  7:47       ` Cecil Westerhof
2009-11-13 15:06         ` Willi Egger
2009-11-13 16:12           ` CLDWesterhof
2009-11-13  8:51     ` luigi scarso
2009-11-13 10:00       ` Cecil Westerhof
2009-11-14  7:50         ` Aditya Mahajan
2009-11-14 15:48         ` luigi scarso

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=bb8b59590911120807m1bc51386x32d65cf97adf164c@mail.gmail.com \
    --to=cldwesterhof@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).