ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* inline-graphics and unwanted line-break
@ 2007-11-29 12:51 Peter Schorsch
  2007-11-29 15:47 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Schorsch @ 2007-11-29 12:51 UTC (permalink / raw)
  To: ntg-context

Hi, 

I have a small metapost graphic I like to use inline. But the arragement 
behaves a little bit "unpractically". As soon there is no character in front 
of the graphic context will break the line after the graphic - but as soon 
there is a character in front of the graphic, context does not adding a 
linebreak after the graphic.

Does anyone know how to prevent the line-break after the graphic if the 
graphic is the first inline?

Thanks, P.

example-file:

\startuseMPgraphic{zo}
	color schwarz ; schwarz := (.0,.0,.0) ;
 	draw 
(0pt,0pt)--(0pt,8pt)--(5pt,12pt)--(10pt,8pt)--(10pt,0pt)--(0pt,0pt)--cycle 
withcolor schwarz ;
\stopuseMPgraphic

\starttext

\hbox{\useMPgraphic{zo}} test text - why a line-break? How to prevent this?

a \hbox{\useMPgraphic{zo}} test text - this is fine: no line-break!

\stoptext
___________________________________________________________________________________
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] 5+ messages in thread

* Re: inline-graphics and unwanted line-break
  2007-11-29 12:51 inline-graphics and unwanted line-break Peter Schorsch
@ 2007-11-29 15:47 ` Wolfgang Schuster
  2007-11-29 16:45   ` luigi scarso
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2007-11-29 15:47 UTC (permalink / raw)
  To: tralalas, mailing list for ConTeXt users

2007/11/29, Peter Schorsch <tralalas@freenet.de>:
> Hi,
>
> I have a small metapost graphic I like to use inline. But the arragement
> behaves a little bit "unpractically". As soon there is no character in front
> of the graphic context will break the line after the graphic - but as soon
> there is a character in front of the graphic, context does not adding a
> linebreak after the graphic.
>
> Does anyone know how to prevent the line-break after the graphic if the
> graphic is the first inline?
>
> Thanks, P.
>
> example-file:
>
> \startuseMPgraphic{zo}
>         color schwarz ; schwarz := (.0,.0,.0) ;
>         draw
> (0pt,0pt)--(0pt,8pt)--(5pt,12pt)--(10pt,8pt)--(10pt,0pt)--(0pt,0pt)--cycle
> withcolor schwarz ;
> \stopuseMPgraphic
>
> \starttext
>
> \hbox{\useMPgraphic{zo}} test text - why a line-break? How to prevent this?

write \dontleavehmode\hbox{...}, this is normal TeX bahaviour and has nothing
special to do with ConTeXt.

> a \hbox{\useMPgraphic{zo}} test text - this is fine: no line-break!

the "a" starts horizontal mode but a \hbox did not and this can be
sometimes usefull

> \stoptext

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] 5+ messages in thread

* Re: inline-graphics and unwanted line-break
  2007-11-29 15:47 ` Wolfgang Schuster
@ 2007-11-29 16:45   ` luigi scarso
  2007-11-29 16:51     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: luigi scarso @ 2007-11-29 16:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

> write \dontleavehmode\hbox{...}, this is normal TeX bahaviour and has nothing
> special to do with ConTeXt.
also
\hskip1sp\hbox{...}
the "invisible touch" effect :))
-- 
luigi
...
it's new .
it's powerful .
it's luatex .
http://www.luatex.org
___________________________________________________________________________________
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] 5+ messages in thread

* Re: inline-graphics and unwanted line-break
  2007-11-29 16:45   ` luigi scarso
@ 2007-11-29 16:51     ` Wolfgang Schuster
  2007-11-29 17:14       ` luigi scarso
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2007-11-29 16:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/11/29, luigi scarso <luigi.scarso@gmail.com>:
> > write \dontleavehmode\hbox{...}, this is normal TeX bahaviour and has nothing
> > special to do with ConTeXt.
> also
> \hskip1sp\hbox{...}
> the "invisible touch" effect :))

\hskip\zeropoint\hbox{} ;-)

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] 5+ messages in thread

* Re: inline-graphics and unwanted line-break
  2007-11-29 16:51     ` Wolfgang Schuster
@ 2007-11-29 17:14       ` luigi scarso
  0 siblings, 0 replies; 5+ messages in thread
From: luigi scarso @ 2007-11-29 17:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

\dontleavehmode
is
 \dontleavehmode=\quitvmode.
and \quitvmode is a primitive
stricly speacking we don't see a space, but a command that switch to a
mode to another.
And it's also sound good: you have put a command to change status.

\hskip\zeropoint\hbox{} ;-)
here we see a space of 0pt.
Can be a bit embarassing that "a horiz. space of 0pt" make  difference
between status,
because one can think "hey, a space of 0pt is nothing and should do nothing!"
(Of course, \hskip0t has sense )

\hskip1sp\hbox{...}
here we see a space of 1sp, ie (1/2^16) * 1pt which is invisible to human eye.
Here my "invisible touch" effect.
It's more "human" because i can say "hey, you have inserted a hor.
space very small, so small that you can see it,
but it's always a hor,. space not null, so it's reasonable  a change of state."

btw,
the context way is
\dontleavehmode

-- 
luigi
...
it's new .
it's powerful .
it's luatex .
http://www.luatex.org
___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2007-11-29 17:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-29 12:51 inline-graphics and unwanted line-break Peter Schorsch
2007-11-29 15:47 ` Wolfgang Schuster
2007-11-29 16:45   ` luigi scarso
2007-11-29 16:51     ` Wolfgang Schuster
2007-11-29 17:14       ` luigi scarso

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