ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Descriptions and headerwidth, distance and align
Date: Wed, 30 Jan 2008 16:21:08 +0100	[thread overview]
Message-ID: <115224fb0801300721t20b643a1u6cefe7fa2a4f0135@mail.gmail.com> (raw)

Hi all,

I tried to use descriptions in a module from me and get a few unwanted
and wrong results from the settings.

In my first example I try to set the headerwidth to 3cm and the distance between
the header and the text to 1cm. The result I get from this example is a 2cm wide
header and 2cm between the header and the text. I know the real width for the
header is the difference between width and distance and 2cm are correct but this
is a stupid method, changing this will break many documents but a alternative
solution would be to introduce a label headerwidth.

The wrong distance between the header and the text is also a result
from this method,
the description macros reduce the headerwidth by the distance value
and introduce
a extra value between the headerbox and the text, this give me twice
the distance
width and is a bug for me.

Another missing thing is a key headeralign, a workaround for moment is to misuse
the text key but this should be implemented.

\definedescription
  [test]
  [width=3cm,
   text=\hfill, % better headalign=flushright
   distance=1cm]

\starttext

\showframe

\test{One} Text for the first description.

\test{Two} Text for the second description.

\stoptext


My second example deals with the same problem as above (headerwidth is reduced
by distance width) but it gives a completely broken output.

I let ConTeXt calculate the width for the header and set a distance value of 1cm
between the header and text. This works prefect but the text itself is placed in
a box with the width "calculated textwidth - distance" and this is not
enough room
for the text and it is broken into two lines.

\definedescription
  [test]
  [width=fit,
   distance=1cm]

\starttext

\test{First description} Text for the first description.

\test{Second description} Text for the second description.

\stoptext


Greetings,

Wolfgang
___________________________________________________________________________________
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:[~2008-01-30 15:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=115224fb0801300721t20b643a1u6cefe7fa2a4f0135@mail.gmail.com \
    --to=schuster.wolfgang@googlemail.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).