ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Maurice Diamantini (dom)" <mdiam@free.fr>
Cc: Diamantini Maurice <Maurice.Diamantini@ensta.fr>
Subject: Re: framed texts for boxing stuff
Date: Mon, 9 Jan 2006 21:54:10 +0100	[thread overview]
Message-ID: <36434073-921C-4BAA-889F-55CEB61C8F5C@free.fr> (raw)
In-Reply-To: <43C2407F.1090303@wxs.nl>

Le 9 janv. 06 à 11:52, Hans Hagen a écrit :

>> If it is impossible, is there any equivalent to de minipage or   
>> \parbox LaTeX
>> equivalent?
>
> i dunno what those are, vboxes?

Not sure what exactly is "vboxes" (something you can put in hbox? yes  
it is) but LaTeX
raisebox, parbox, minipage can be put inside a text line.
minipage can manage its ones footnote, but this is not the question  
here.
As the "LaTeX++" concurrent package designer, you should read some  
page of the
LaTeX reference documentation "A document Preparation System"
It is little book  (272 pages with the index !) and cover the core of  
the
package.

Page 103 to 110 are related to boxes, and is what is missing in context.

I'm not sure that ConTeXt \framed command is able to reproduce
the parbox behavior (position a framed box relatively to its internal  
top
or bottom line and the outside baseline)


> in most cases you can use framed (make sure that you set 'align' to  
> something in order
> to enter vmode)
>
> framedtext is a bit more clever and handles some spacing issues

With your help, and some old reference doc and the wiki
(http://wiki.contextgarden.net/Vertically_Centered_Boxes)
I tested the following "one line text" which works.

(My version of TeXExec 5.2.4 doesn't seem to support \startframed and
\stopframed so I use \framed instead).


\starttext

   % align:    no left right middle normal high low lohi justified
   % location: low depth hanging
   a word and --%
     \framed[width=.2\textwidth,  align=flushright, location=depth]{
         some stuff
     }%
     --%
     \framed[height=3em,width=11em, align={flushleft,lohi},  
location=hanging]{
         other stuff
     }%
     --%
   another word, same line

\stoptext

But more generaly, there is a frequent need about boxing stuff and it
seems that the \framed command is the way to go. But it's not always
easy to guess the various parameters to get an expected behavior.
So what is the current reference documentation about framed
   - Context the manual (page 206) ?
   - ConTeXt an excursion (page 45) ?

Such a command is usefull inside some "hardcoded" slide.
And there could be a "\boxed" or "\cell" macro with default
"frame=off" parameters just to serve as special tabular cell.

I think there has to be two pairs of informations to position a
box (i.e. a "cell" text):
- how is the box is positioned relatively to its environment (the  
location=
   keyword I think),
- how to position the stuff **inside** the box (align= keyword)

What is the need for these 2 parameters :

- inside the box : everywhere. that implies two reals numbers
   between 0.0 and 1.0 (perhaps wider?)
   with some keyword for predefined values (flushleft, middle,  
flushright
   low, high, lohi and baseline,
   (vjustified, justified=hjustified serve another feature)

- outside the box : only verticaly ?
   one real number [0.0..1.0] plus low depth (=base?) hanging (=top)
   Here a parbox provide an option for aligning the external baseline
   on the "top" ou "bottom" internal line.
   How can I simply optain the "0.5 = vertical middle"

   Probably the positionning parameters for outside the box are more
   complicated : more than the internal reference point mention above is
   to which external reference point the inetrenal point should be
   aligned to ?
   Generaly the baseline of the parent is the choosen one, but  
perhaps one
   like to use the "0.5ex hight" one as in minus sign in the "3-2,"  
string
   (but the TeX command \raise0.5ex could do that)

-- Maurice

  reply	other threads:[~2006-01-09 20:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-06 16:19 framed texts Hans van der Meer
2006-01-06 17:20 ` Peter Rolf
2006-01-06 20:43   ` Hans van der Meer
2006-01-07 12:50     ` Hans Hagen
2006-01-07 22:52       ` framed texts and other "minipage" Maurice Diamantini (dom)
2006-01-09 10:52         ` Hans Hagen
2006-01-09 20:54           ` Maurice Diamantini (dom) [this message]
2006-01-09 23:01             ` framed texts for boxing stuff Hans Hagen
2006-01-10 22:14               ` Maurice Diamantini (dom)
2006-01-10 22:50                 ` Hans Hagen
2006-01-10 23:44                   ` Why PDF files generated by ConTeXt are so big? Jilani Khaldi
2006-01-11  8:22                     ` Hans Hagen
2006-01-11 12:41                       ` Jilani Khaldi
2006-01-11 14:14                         ` Hans Hagen
2006-01-11 16:45                           ` Jilani Khaldi
2006-01-11 18:27                             ` Hans Hagen
2006-01-10 22:53                 ` framed texts for boxing stuff Hans Hagen
2006-01-10 23:28                 ` Mojca Miklavec
2006-01-11 20:07               ` Bob Kerstetter

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=36434073-921C-4BAA-889F-55CEB61C8F5C@free.fr \
    --to=mdiam@free.fr \
    --cc=Maurice.Diamantini@ensta.fr \
    --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).