\hbox and figures
![](https://secure.gravatar.com/avatar/abcf726e8937bab9f50babda19270124.jpg?s=120&d=mm&r=g)
Hi to all, I guess it's something obvious but... I was taking a look at the nice cows on p.298 cont-eni: I cannot understand why in compiling this code "test" is always one line down and never on the same line, just on quarter's side. Quarter is a small figure, and I tested with other small figures, both in pdf and png. \starttext \hbox {\externalfigure[quarter]} test \stoptext Many thanks! -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea andrea.valle@unito.it
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
andrea valle wrote:
Hi to all, I guess it's something obvious but...
\hbox {\externalfigure[quarter]} test
If TeX sees a \hbox when in vertical mode, it stays in vertical mode, simply adding the box to the page. Only when it sees the 't' from test does it start the next paragraph. To make the box part of the paragraph, TeX has to be told to enter horizontal mode first. That is done by adding \dontleavehmode: \starttext \dontleavehmode \hbox {\externalfigure[quarter]} test \stoptext Cheers, Taco
![](https://secure.gravatar.com/avatar/abcf726e8937bab9f50babda19270124.jpg?s=120&d=mm&r=g)
Thanks as usual Taco, no errors, but doesn't work for me. \starttext \dontleavehmode \hbox {\externalfigure[quarter][png]} test \stoptext The same as before -a- On 28 Jan 2006, at 11:44, Taco Hoekwater wrote:
\dontleavehmode Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea andrea.valle@unito.it
![](https://secure.gravatar.com/avatar/abcf726e8937bab9f50babda19270124.jpg?s=120&d=mm&r=g)
Thanks, I have never seen it in the docs (at least, in the ones I know). Best -a- On 28 Jan 2006, at 11:59, Taco Hoekwater wrote:
andrea valle wrote:
Thanks as usual Taco, no errors, but doesn't work for me.
\starttext \dontleavehmode
\hbox {\externalfigure[quarter][png]} test
You have to remove that empty line between the \dontleavehmode and the \hbox.
Taco _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea andrea.valle@unito.it
participants (2)
-
andrea valle
-
Taco Hoekwater