ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* treat framed and externalfigure as characters
@ 2006-05-09 16:11 Peter Münster
  2006-05-09 19:22 ` Taco Hoekwater
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Münster @ 2006-05-09 16:11 UTC (permalink / raw)


Hello Taco and Hans,

in http://context.literatesolutions.com/collector/89
you write
   "Both Hans and me have documents that depend on \framed staying in
    vertical mode."

Could you give me an example please?

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: treat framed and externalfigure as characters
  2006-05-09 16:11 treat framed and externalfigure as characters Peter Münster
@ 2006-05-09 19:22 ` Taco Hoekwater
  2006-05-09 20:19   ` Peter Münster
  2006-05-09 20:53   ` Hans Hagen
  0 siblings, 2 replies; 7+ messages in thread
From: Taco Hoekwater @ 2006-05-09 19:22 UTC (permalink / raw)


Peter Münster wrote:
> Hello Taco and Hans,
> 
> in http://context.literatesolutions.com/collector/89
> you write
>    "Both Hans and me have documents that depend on \framed staying in
>     vertical mode."
> 
> Could you give me an example please?

For instance in a recipe booklet, where one of the macros
goes like this:

   \def\startrecipe[#1]%
     {\getparameters[Recipe]
        [Title=,Summary=,Image=none,#1]% ..
      \framed{\tfd \RecipeTitle}%
      \externalfigure[\RecipeImage]%
      {\bf\RecipeSummary}%
      \blank }

I am not saying that that is the best way to write macros (and I 
certainly do not do it like that anymore) but changing the behaviour
would break quite a lot of my existing documents, including some
I have been payed for to do.

Maybe Hans is willing to add a global switch that you can set at
the top of your document(s).

For Hans: Peter would like an implicit \dontleavehmode added to
\framed and \externalfigure, so they behave more like characters
(not like \hboxes).

Cheers, Taco

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: treat framed and externalfigure as characters
  2006-05-09 19:22 ` Taco Hoekwater
@ 2006-05-09 20:19   ` Peter Münster
  2006-05-09 21:07     ` Hans Hagen
  2006-05-09 20:53   ` Hans Hagen
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Münster @ 2006-05-09 20:19 UTC (permalink / raw)


On Tue, 9 May 2006, Taco Hoekwater wrote:

> Peter Münster wrote:
> > Hello Taco and Hans,
> > 
> > in http://context.literatesolutions.com/collector/89
> > you write
> >    "Both Hans and me have documents that depend on \framed staying in
> >     vertical mode."
> > 
> > Could you give me an example please?
> 
> For instance in a recipe booklet, where one of the macros
> goes like this:
> 
>    \def\startrecipe[#1]%
>      {\getparameters[Recipe]
>         [Title=,Summary=,Image=none,#1]% ..
>       \framed{\tfd \RecipeTitle}%
>       \externalfigure[\RecipeImage]%
>       {\bf\RecipeSummary}%
>       \blank }
> 
> I am not saying that that is the best way to write macros (and I 
> certainly do not do it like that anymore) but changing the behaviour
> would break quite a lot of my existing documents, including some
> I have been payed for to do.

Hello Taco,
I understand and accept your arguments. Even for me, it's no more problem
to add here and there a \dontleavehmode, since I know it now. But for a
beginner and a user without ambition to become a ConTeXt expert, the actual
behaviour is annoying. He just sees a line break, where he does not expect
it. There is a fundamental difference between
                     bla \framed{bla} bla
and
                     \framed{bla} bla bla
that is not understandable.

It's much more straightforward and clear to add a \par (and perhaps
\noindentation) if you really want this line break (for example in your
macro \startrecipe).

> Maybe Hans is willing to add a global switch that you can set at
> the top of your document(s).

Perhaps one day, I would like to convert some of my colleagues from M$-Word
to ConTeXt, but if I have to teach them about things like \dontleavehmode
there is no need for further efforts. So, such a switch would be very
welcome (I would put it into cont-sys.tex)!

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: treat framed and externalfigure as characters
  2006-05-09 19:22 ` Taco Hoekwater
  2006-05-09 20:19   ` Peter Münster
@ 2006-05-09 20:53   ` Hans Hagen
  1 sibling, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2006-05-09 20:53 UTC (permalink / raw)


Taco Hoekwater wrote:
> Peter M�nster wrote:
>   
>> Hello Taco and Hans,
>>
>> in http://context.literatesolutions.com/collector/89
>> you write
>>    "Both Hans and me have documents that depend on \framed staying in
>>     vertical mode."
>>
>> Could you give me an example please?
>>     
>
> For instance in a recipe booklet, where one of the macros
> goes like this:
>
>    \def\startrecipe[#1]%
>      {\getparameters[Recipe]
>         [Title=,Summary=,Image=none,#1]% ..
>       \framed{\tfd \RecipeTitle}%
>       \externalfigure[\RecipeImage]%
>       {\bf\RecipeSummary}%
>       \blank }
>
> I am not saying that that is the best way to write macros (and I 
> certainly do not do it like that anymore) but changing the behaviour
> would break quite a lot of my existing documents, including some
> I have been payed for to do.
>
> Maybe Hans is willing to add a global switch that you can set at
> the top of your document(s).
>
> For Hans: Peter would like an implicit \dontleavehmode added to
> \framed and \externalfigure, so they behave more like characters
> (not like \hboxes).
>   
as you say, a dangerous feature that would break much (keep in mind that 
\framed is used all over the place)


Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: treat framed and externalfigure as characters
  2006-05-09 20:19   ` Peter Münster
@ 2006-05-09 21:07     ` Hans Hagen
  2006-05-10 15:37       ` Peter Münster
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2006-05-09 21:07 UTC (permalink / raw)


� wrote:
>
> I understand and accept your arguments. Even for me, it's no more problem
> to add here and there a \dontleavehmode, since I know it now. But for a
> beginner and a user without ambition to become a ConTeXt expert, the actual
> behaviour is annoying. He just sees a line break, where he does not expect
> it. There is a fundamental difference between
>                      bla \framed{bla} bla
> and
>                      \framed{bla} bla bla
> that is not understandable.
>   
this is the case for many more things and a tex speciality which takes 
while to get accustomed to; a similar case is

{\bf whatever} rest of par

best put a \dontleavevmode or \strut in front if you want indentation 
and related features to work
> Perhaps one day, I would like to convert some of my colleagues from M$-Word
> to ConTeXt, but if I have to teach them about things like \dontleavehmode
> there is no need for further efforts. So, such a switch would be very
> welcome (I would put it into cont-sys.tex)!
>   
but then it would break other things and your collegues would scream about that 

btw, there is \inframed for inline usage, or one could define a symbol 

Hans 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: treat framed and externalfigure as characters
  2006-05-09 21:07     ` Hans Hagen
@ 2006-05-10 15:37       ` Peter Münster
  2006-05-10 18:35         ` Hans Hagen
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Münster @ 2006-05-10 15:37 UTC (permalink / raw)


On Tue, 9 May 2006, Hans Hagen wrote:

> > There is a fundamental difference between
> >                      bla \framed{bla} bla
> > and
> >                      \framed{bla} bla bla
> > that is not understandable.
> >   
> this is the case for many more things and a tex speciality which takes 
> while to get accustomed to; a similar case is
> 
> {\bf whatever} rest of par

Hello Hans,
I tried this:
\setupindenting[big,yes]
\starttext
\input tufte

{\bf whatever} rest of par
\input tufte
\stoptext

But I don't see the problem... ?

> btw, there is \inframed for inline usage, or one could define a symbol

Thanks, I'll take a look at it.

Cheers, Peter

-- 
http://pmrb.free.fr/contact/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: treat framed and externalfigure as characters
  2006-05-10 15:37       ` Peter Münster
@ 2006-05-10 18:35         ` Hans Hagen
  0 siblings, 0 replies; 7+ messages in thread
From: Hans Hagen @ 2006-05-10 18:35 UTC (permalink / raw)


� wrote:
> On Tue, 9 May 2006, Hans Hagen wrote:
>
>   
>>> There is a fundamental difference between
>>>                      bla \framed{bla} bla
>>> and
>>>                      \framed{bla} bla bla
>>> that is not understandable.
>>>   
>>>       
>> this is the case for many more things and a tex speciality which takes 
>> while to get accustomed to; a similar case is
>>
>> {\bf whatever} rest of par
>>     
>
> Hello Hans,
> I tried this:
> \setupindenting[big,yes]
> \starttext
> \input tufte
>
> {\bf whatever} rest of par
> \input tufte
> \stoptext
>
> But I don't see the problem... ?
>   
it's just an example (bad one because i don't remember the cases)

think of

{\command ...} rest of par
\command ... rest of par

and possible interferences with special \everypar situations (par starts 
in group or with command that itself does something that depends on the 
h/v mode)

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-05-10 18:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-09 16:11 treat framed and externalfigure as characters Peter Münster
2006-05-09 19:22 ` Taco Hoekwater
2006-05-09 20:19   ` Peter Münster
2006-05-09 21:07     ` Hans Hagen
2006-05-10 15:37       ` Peter Münster
2006-05-10 18:35         ` Hans Hagen
2006-05-09 20:53   ` Hans Hagen

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