3

I am trying rewrite an already formatted layout to ConTeXt, but I face two major problems. Please have a look at the goal I am aiming at and at the source code below.
I have tried many suggestions from various manuals and the wiki, however, there is no way I can format the layout as depicted. Having tried
\startfiguretext, the text stays in it's narrow structure.
\placefigure does allow me to place the bold text in the first line only if the text above is the picture.
\starthangaround could work, but there is always an offset between the text area and the - invisible - frame. Not to mention, I do not get it it to the right hand side.
Either way, those paragraphs borders get violated easily, \hboxes are overfull constantly. Messing around with sloppypar or emergencystretch did not help. Any help is greatly appreciated. Thank you.
Link to Layout: http://www-user.tu-cottbus.de/~kitzmrob/desiredLayoutScreenshot.png

\enableregime   [utf-8]
\setuppapersize         [A5][]
\setuplayout[           height=middle,
                    location=middle,
                    backspace=2.0cm,            
                    leftmargin=1.5cm,           
                    leftmargindistance=0.25cm,
                    width=10.80cm,          
                    rightmargin=1.5cm,
                    rightmargindistance=0.25cm,
                    topspace=0.35cm,            
                    header=0.5cm,               
                    headerdistance=1.15cm,      
                    footer=0.5cm,
                    footerdistance=0.75cm,
                    bottomspace=0.75cm,
            ]

\starttext

\starthangaround {
    \framed         [%align=bottom, % unclear behavior
                    frame=on,       % visible for demonstration
                    width=.475\textwidth]
    {\externalfigure [amIaCow?] [width=.475\textwidth] 
    % \crlf
    % \placefloatcaption
    % [figure]
    % [ref:acow]
    % {undesiredCaption}
    }
}
{\bf Bold text \hfill Bold text}
\input montgomery
%\input davis
%\input zapf
%\input thuan
%\input knuth
%\input dawkins

\stophangaround

\stoptext
2

1 Answer 1

4

Here is an MkIV solution (compile with context, instead of texexec). It uses the option right which pushes the float to the right of the following paragraph, none removes the caption and high fixes the spacing.

Also see my answer to the question Context: Placing float (figure) and text-top at same height for a related example.

\useMPlibrary [dum]  %% only for demonstration
\starttext

  \startplacefigure [location={right,none,high}]
    \externalfigure
  \stopplacefigure

  \startlinealignment [middle]
    \bold{Bold Text}\hfill\bold{Bold Text}
  \stoplinealignment

  \input montgomery

\stoptext

result

8
  • Thank you for your quick reply, Marco. Using ConTeXt, I am not able to compile neither this example nor the other, really nice one, that you have provided. What is this [dum] all about?
    – lactea
    Mar 29, 2013 at 15:20
  • 1
    It created the nice looking picture instead of a gray box, just eye-candy. Which version are you running? The example is MkIV only as I mentioned. If you already use MkIV try to replace the linealignment environment with a single \midaligned{\bold{…}…\hfill…} call since it's a rather new command.
    – Marco
    Mar 29, 2013 at 15:25
  • I am using ConTeXt (LuaTex), editing in TeXworks
    – lactea
    Mar 29, 2013 at 15:29
  • If you can't get it working we need to know your exact version? You can obtain it running the following document \starttext\contextversion\stoptext.
    – Marco
    Mar 29, 2013 at 15:34
  • 2011.05.18 18:04 This is getting embarrasing for me now.. For my excuse: I am sitting at ol' university workstation.
    – lactea
    Mar 29, 2013 at 15:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .