ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* What's the difference between \dontleavehmode and \leavevmode?
@ 2016-08-18 15:23 Henri Menke
  2016-08-18 15:50 ` Wolfgang Schuster
  2016-08-18 16:39 ` Hans Hagen
  0 siblings, 2 replies; 5+ messages in thread
From: Henri Menke @ 2016-08-18 15:23 UTC (permalink / raw)
  To: ntg-context

Dear list,

could someone please explain what is the difference between \dontleavehmode and \leavevmode?

Internally, I also stumbled upon \quitvmode.  Is this a synonym for \leavevmode?  It seems to be primitive.

Cheers, Henri
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: What's the difference between \dontleavehmode and \leavevmode?
  2016-08-18 15:23 What's the difference between \dontleavehmode and \leavevmode? Henri Menke
@ 2016-08-18 15:50 ` Wolfgang Schuster
  2016-08-18 16:39 ` Hans Hagen
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2016-08-18 15:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 450 bytes --]

> Henri Menke <mailto:henrimenke@gmail.com>
> 18. August 2016 um 17:23
> Dear list,
>
> could someone please explain what is the difference between 
> \dontleavehmode and \leavevmode?
>
> Internally, I also stumbled upon \quitvmode. Is this a synonym for 
> \leavevmode? It seems to be primitive.
No, \quitvmode is a LuaTeX primitive which adds the \dontleavehmode 
function to the core and \dontleavehmode is now a synonym for \quitvmode.

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 1433 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: What's the difference between \dontleavehmode and \leavevmode?
  2016-08-18 15:23 What's the difference between \dontleavehmode and \leavevmode? Henri Menke
  2016-08-18 15:50 ` Wolfgang Schuster
@ 2016-08-18 16:39 ` Hans Hagen
  2016-08-18 18:14   ` Henri Menke
  1 sibling, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2016-08-18 16:39 UTC (permalink / raw)
  To: ntg-context

On 8/18/2016 5:23 PM, Henri Menke wrote:
> Dear list,
>
> could someone please explain what is the difference between \dontleavehmode and \leavevmode?
>
> Internally, I also stumbled upon \quitvmode.  Is this a synonym for \leavevmode?  It seems to be primitive.

\leavevmode is kind of useless as it can interfere in spacing so we 
always used \dontleavehmode in context (a macro) that later was added as 
primitive \quitvmode to luatex

You sometimes need \dontleavehmode to make sure you enter hmode (esp 
when you start a paragraph with a group or boxed stuff)

(the only two places in context where \leavevmode is used is in rather 
plain macros that get overloaded later)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: What's the difference between \dontleavehmode and \leavevmode?
  2016-08-18 16:39 ` Hans Hagen
@ 2016-08-18 18:14   ` Henri Menke
  2016-08-18 21:48     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: Henri Menke @ 2016-08-18 18:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hans, Wolfgang,

thank you for your speedy reply.  However, I still do not know the difference between \leavevmode and \quitvmode.  Could you please elaborate?

Cheers, Henri

On 08/18/2016 06:39 PM, Hans Hagen wrote:
> On 8/18/2016 5:23 PM, Henri Menke wrote:
>> Dear list,
>>
>> could someone please explain what is the difference between \dontleavehmode and \leavevmode?
>>
>> Internally, I also stumbled upon \quitvmode.  Is this a synonym for \leavevmode?  It seems to be primitive.
> 
> \leavevmode is kind of useless as it can interfere in spacing so we always used \dontleavehmode in context (a macro) that later was added as primitive \quitvmode to luatex
> 
> You sometimes need \dontleavehmode to make sure you enter hmode (esp when you start a paragraph with a group or boxed stuff)
> 
> (the only two places in context where \leavevmode is used is in rather plain macros that get overloaded later)
> 
> Hans
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: What's the difference between \dontleavehmode and \leavevmode?
  2016-08-18 18:14   ` Henri Menke
@ 2016-08-18 21:48     ` Hans Hagen
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Hagen @ 2016-08-18 21:48 UTC (permalink / raw)
  To: ntg-context

On 8/18/2016 8:14 PM, Henri Menke wrote:
> Hans, Wolfgang,
>
> thank you for your speedy reply.  However, I still do not know the difference between \leavevmode and \quitvmode.  Could you please elaborate?

simple explanation: \quitvmode checks if it's in h mode already and 
doesn't do redundant mode switching (which involves injecting 
indentation boxes)

> Cheers, Henri
>
> On 08/18/2016 06:39 PM, Hans Hagen wrote:
>> On 8/18/2016 5:23 PM, Henri Menke wrote:
>>> Dear list,
>>>
>>> could someone please explain what is the difference between \dontleavehmode and \leavevmode?
>>>
>>> Internally, I also stumbled upon \quitvmode.  Is this a synonym for \leavevmode?  It seems to be primitive.
>>
>> \leavevmode is kind of useless as it can interfere in spacing so we always used \dontleavehmode in context (a macro) that later was added as primitive \quitvmode to luatex
>>
>> You sometimes need \dontleavehmode to make sure you enter hmode (esp when you start a paragraph with a group or boxed stuff)
>>
>> (the only two places in context where \leavevmode is used is in rather plain macros that get overloaded later)
>>
>> Hans
>>
>> -----------------------------------------------------------------
>>                                           Hans Hagen | PRAGMA ADE
>>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
>> -----------------------------------------------------------------
>> ___________________________________________________________________________________
>> 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
>> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

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

end of thread, other threads:[~2016-08-18 21:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-18 15:23 What's the difference between \dontleavehmode and \leavevmode? Henri Menke
2016-08-18 15:50 ` Wolfgang Schuster
2016-08-18 16:39 ` Hans Hagen
2016-08-18 18:14   ` Henri Menke
2016-08-18 21:48     ` 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).