Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to include some figures on the right of some list items. Here is an example with one figure in the second item:

\starttext
\startitemize[n]
    \item first item
    \item \placefigure[right]{none}{\framed[width=1in]{Figure}} \input knuth
    \item third item
\stopitemize
\stoptext

Everything is great except there is a blank line after the item label. How can I remove this blank line so the content of the item is right after the item label?

If I use \startfiguretext instead of \placefigure:

    \item \startfiguretext[right]{none}{\framed[width=1in]{}} \input knuth
    \stopfiguretext

Not only is there a blank line after the item label, but the list item is no longer indented.

share|improve this question
    
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say "thank you" to users who helped you. –  Peter Jansson Mar 13 '13 at 18:01
    
It’s a general issue with floats in Context strategies against which are covered on the wiki. Also, possible duplicate of this question. –  phg Mar 13 '13 at 18:07
    
The spacing of the float interferes with the spacing of the itemgroup. Without the caption the \starthanging[location=right]{…}…\stophanging mechanism would probably do the job. –  Marco Mar 13 '13 at 18:09
    
@Marco The commands \starthanging and \stophanging are not recognized. I'm using TeX Live 2012: ConTeXt 2012.05.30 with XeTeX 9.99.99. –  suyang Mar 13 '13 at 19:55
1  
I struggled with a similar problem some time ago. Did you try using \startitem ... \stopitem instead of \item ... and putting your figure between items? (I didn't test this, just had this idea.) –  mbork Mar 13 '13 at 20:36
show 1 more comment

1 Answer

@mbork Your suggestion worked like a charm. The code now looks like this:

\starttext
\startitemize[n,joinedup]
    \item first item
\stopitemize
\placefigure[right]{none}{\framed[width=1in,height=3in]{Dummy\crlf Figure}}
\startitemize[n,continue]
    \item \input knuth
    \item \input tufte
\stopitemize
\stoptext
share|improve this answer
    
It looks like you've got two separate accounts, which means you cannot edit your original post or leave comments. The StackExchange staff can merge them together for you. –  Peter Jansson Mar 14 '13 at 18:55
    
You don't need to stop the itemize; simply put the \placefigure before the item that you want to float around. –  Aditya Mar 14 '13 at 23:20
    
You are right, just need to put \placefigure before the \item, although logically this looks as if the placefigure belongs to the previous item. –  suyang Mar 16 '13 at 0:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.