ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: sidebyside figures
Date: Mon, 10 Mar 2003 23:15:02 +0100	[thread overview]
Message-ID: <5.1.0.14.1.20030310230834.03102d00@server-1> (raw)
In-Reply-To: <006701c2e6c0$199b9090$6d6b4442@wang>

Hi,

 > The normal double column mechanism tries to place a graphic, stores it when
> > there is no place, and flushes it as soon as possible.
> >
> > The \startcolumns mechanism works well intermixed with the standard one
> > column mode.
> >
> > In your case, esp for vertical chinese, use columnsets:
> >
> > \startcolumnset
> >
> > \placefigure[tblr:1]{}{}
> > \placefigure[tblr:2]{}{}
> >
> > \input tufte
> >
> > \stopcolumnset
> >
> > This will place the floats on top of the first and second column; an
> > alternative usage is:
> >
> > \placefigure[tblr]{}{}
> > \placefigure[tbrl]{}{}
> >
> > Think of tb meaning flush from top to bottom, and lr to mean from left to
> > right; so, there are quite some ways to place/flush a graphic.
>
>Thanks. It place the figures side by side correctly. But, there is another 
>problem.
>After the two figures, it force a page break and leave a large blank even 
>though
>the blank area can accommodate the next paragraph. I attached the test file
>and waht I really want is:
>
>One column texts
>two figures sidebyside
>One column texts

Well, here you run into the difference between columns and columnsets. 
Columnsets can be mixed with one column mode, but you need to balance 
(automatic balancing is pretty hard for complex columnsets, so this is not 
yet in the kernel, but manual balancing is (one can set the number of lines 
per column). However, it seems that you want something:

\starttext

\startbuffer

\startcombination
   {\externalfigure[cow][frame=on, width=3cm]} {\placefloatcaption[figure]{x}}
   {\externalfigure[cow][frame=on, width=3cm]} {\placefloatcaption[figure]{y}}
\stopcombination

\stopbuffer

\placefigure{none}{\getbuffer}

\stoptext

This special feature (separate captions) was introduced quite some time ago 
for Karel W so you should buy him a beer.

When testing this i foun dout that there is an error in the macro. A few 
days ago i added the 'distance' key to caption setups, and (of course) i 
didn't test that with free floating captions (unresolved intermediate 
macro). So, in page-flt you need to replace the following bit of trivial 
code:

\def\dodosetfloatcaption[#1][#2]#3% to do namespace for number/ascii
   {\ifnofloatnumber               % also handle trialtypesetting
      \letgvalue{@fl@r@#1}\relax
      \letgvalue{@fl@t@#1}\relax
    \else
      \verhoognummer[#1]%
      \maakhetnummer[#1]%
      \globallet\flhetnummer\hetnummer
      \setgvalue{@fl@r@#1}%
        {\dofloatreference
         \redofloatorder{#1}%
         \doschrijfnaarlijst{#1}{\flhetnummer}{#3}{#1}%
         \doglobal\convertargument#3\to\flasciititle % \asciititle is global
         \doifsomething{#2}
           {\rawreference\s!flt{#2}{{\flhetnummer}{\flasciititle}}}%
         \letgvalue{@fl@r@#1}\relax}% nills
      \setgvalue{@fl@t@#1}%
        {\preparethenumber{\??kj#1}\flhetnummer\preparednumber
         \doattributes{\??kj#1}\c!letter\c!kleur
           {\doattributes{\??kj#1}\c!kopletter\c!kopkleur
              {\labeltexts{#1}{\preparednumber}}%
            \doattributes{\??kj#1}\c!tekstletter\c!tekstkleur
              {\dotfskip{\getvalue{\??kj#1\c!afstand}}#3}}}% 
THIS LINE WAS WRONG
     \fi}

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

  reply	other threads:[~2003-03-10 22:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-09  1:08 Problem with references Stefan Karlsson
2003-03-09  2:35 ` sidebyside figures Lei Wang
2003-03-09  9:03   ` Guy Worthington
2003-03-09 17:25     ` Lei Wang
2003-03-09 21:29   ` Hans Hagen
2003-03-10  4:47     ` Lei Wang
2003-03-10 22:15       ` Hans Hagen [this message]
2003-03-11  9:27         ` Re[2]: " Giuseppe Bilotta
2003-03-11 10:49           ` Hans Hagen
2003-03-11 12:26             ` Re[3]: " Giuseppe Bilotta
2003-03-11 14:44               ` Hans Hagen
2003-03-11 17:01                 ` Re[4]: " Giuseppe Bilotta
2003-03-12 10:21                   ` Hans Hagen
2003-03-12 14:00                     ` Re[5]: " Giuseppe Bilotta
2003-03-12 15:03                       ` Hans Hagen
2003-03-13  9:28                         ` Re[6]: " Giuseppe Bilotta
2003-03-11 17:47           ` Re[2]: " K.H. Wesseling
2003-03-12 14:01             ` Re[4]: " Giuseppe Bilotta
2003-03-11 20:48         ` Lei Wang
2003-03-12  0:48           ` K.H. Wesseling
2003-03-10  4:48     ` Lei Wang
2003-03-09  2:42 ` Problem with references Guy Worthington
2003-03-09  9:51   ` Stefan Karlsson
2003-03-09 12:04   ` Stefan Karlsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.0.14.1.20030310230834.03102d00@server-1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).