ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Descriptions and headerwidth, distance and align
@ 2008-01-30 15:21 Wolfgang Schuster
  0 siblings, 0 replies; only message in thread
From: Wolfgang Schuster @ 2008-01-30 15:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-30 15:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-30 15:21 Descriptions and headerwidth, distance and align Wolfgang Schuster

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).