* [NTG-context] Line break after a Metapost picture at start of paragraph
@ 2024-11-29 9:02 Florent Michel
2024-11-29 10:00 ` [NTG-context] " Mikael Sundqvist
0 siblings, 1 reply; 3+ messages in thread
From: Florent Michel @ 2024-11-29 9:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1224 bytes --]
Hi,
I have just encountered a (to me) slightly surprising behaviour in ConTeXt
LMTX 2024.10.31: there seems to be an automatic line break after a Metapost
picture if it is at the start of a paragraph. Here is a simple example
showing this behaviour:
------------------------------------------------------------------
\starttext
% Two different lines
\startMPcode
fill fullcircle scaled 10pt;
\stopMPcode
text
% Single line
text
\startMPcode
fill fullcircle scaled 10pt;
\stopMPcode
\stoptext
------------------------------------------------------------------
I'm not sure whether this is a bug or intended behaviour, though - maybe
this is the expected output for users more familiar with TeX and/or
ConTeXt than I am. I would have two question, though:
1) Is there a canonical way to get the second behaviour (multiple Metapost
pictures and text on the same line) if the first Metapost picture starts
the paragraph? One workaround seems to be to add \noindent (plus \hskip if
I do want indentation) before the first Metapost picture, but maybe there
is a better way.
2) If this is intended behaviour, is there already a description of it in
the Wiki or would it make sense for me to add it?
Cheers,
Florent
[-- Attachment #1.2: Type: text/html, Size: 1354 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* [NTG-context] Re: Line break after a Metapost picture at start of paragraph
2024-11-29 9:02 [NTG-context] Line break after a Metapost picture at start of paragraph Florent Michel
@ 2024-11-29 10:00 ` Mikael Sundqvist
2024-11-29 10:53 ` Florent Michel
0 siblings, 1 reply; 3+ messages in thread
From: Mikael Sundqvist @ 2024-11-29 10:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
If you add \dontleavehmode before the MP graphic that starts the line,
you will be fine. There is something to read about it here:
https://wiki.contextgarden.net/Unexpected_behavior
/Mikael
On Fri, Nov 29, 2024 at 10:11 AM Florent Michel <florent.m42@gmail.com> wrote:
>
> Hi,
>
> I have just encountered a (to me) slightly surprising behaviour in ConTeXt LMTX 2024.10.31: there seems to be an automatic line break after a Metapost picture if it is at the start of a paragraph. Here is a simple example showing this behaviour:
>
> ------------------------------------------------------------------
> \starttext
> % Two different lines
> \startMPcode
> fill fullcircle scaled 10pt;
> \stopMPcode
> text
>
> % Single line
> text
> \startMPcode
> fill fullcircle scaled 10pt;
> \stopMPcode
> \stoptext
> ------------------------------------------------------------------
>
> I'm not sure whether this is a bug or intended behaviour, though - maybe this is the expected output for users more familiar with TeX and/or ConTeXt than I am. I would have two question, though:
>
> 1) Is there a canonical way to get the second behaviour (multiple Metapost pictures and text on the same line) if the first Metapost picture starts the paragraph? One workaround seems to be to add \noindent (plus \hskip if I do want indentation) before the first Metapost picture, but maybe there is a better way.
>
> 2) If this is intended behaviour, is there already a description of it in the Wiki or would it make sense for me to add it?
>
> Cheers,
> Florent
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* [NTG-context] Re: Line break after a Metapost picture at start of paragraph
2024-11-29 10:00 ` [NTG-context] " Mikael Sundqvist
@ 2024-11-29 10:53 ` Florent Michel
0 siblings, 0 replies; 3+ messages in thread
From: Florent Michel @ 2024-11-29 10:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 3046 bytes --]
Hi Mikael,
Thanks a lot for the info and for pointing me to this page, which has
other very useful tips I was not aware of!
Cheers,
Florent
Le ven. 29 nov. 2024 à 10:01, Mikael Sundqvist <mickep@gmail.com> a écrit :
> Hi,
>
> If you add \dontleavehmode before the MP graphic that starts the line,
> you will be fine. There is something to read about it here:
>
> https://wiki.contextgarden.net/Unexpected_behavior
>
> /Mikael
>
> On Fri, Nov 29, 2024 at 10:11 AM Florent Michel <florent.m42@gmail.com>
> wrote:
> >
> > Hi,
> >
> > I have just encountered a (to me) slightly surprising behaviour in
> ConTeXt LMTX 2024.10.31: there seems to be an automatic line break after a
> Metapost picture if it is at the start of a paragraph. Here is a simple
> example showing this behaviour:
> >
> > ------------------------------------------------------------------
> > \starttext
> > % Two different lines
> > \startMPcode
> > fill fullcircle scaled 10pt;
> > \stopMPcode
> > text
> >
> > % Single line
> > text
> > \startMPcode
> > fill fullcircle scaled 10pt;
> > \stopMPcode
> > \stoptext
> > ------------------------------------------------------------------
> >
> > I'm not sure whether this is a bug or intended behaviour, though - maybe
> this is the expected output for users more familiar with TeX and/or
> ConTeXt than I am. I would have two question, though:
> >
> > 1) Is there a canonical way to get the second behaviour (multiple
> Metapost pictures and text on the same line) if the first Metapost picture
> starts the paragraph? One workaround seems to be to add \noindent (plus
> \hskip if I do want indentation) before the first Metapost picture, but
> maybe there is a better way.
> >
> > 2) If this is intended behaviour, is there already a description of it
> in the Wiki or would it make sense for me to add it?
> >
> > Cheers,
> > Florent
> >
> ___________________________________________________________________________________
> > If your question is of interest to others as well, please add an entry
> to the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> > webpage : https://www.pragma-ade.nl / https://context.aanhet.net
> (mirror)
> > archive : https://github.com/contextgarden/context
> > wiki : https://wiki.contextgarden.net
> >
> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 4654 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-29 10:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-29 9:02 [NTG-context] Line break after a Metapost picture at start of paragraph Florent Michel
2024-11-29 10:00 ` [NTG-context] " Mikael Sundqvist
2024-11-29 10:53 ` Florent Michel
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).