ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Rik Kabel <context@rik.users.panix.com>
To: ntg-context@ntg.nl
Subject: Caption location with vertical \startplacefigure
Date: Thu, 16 Apr 2015 23:12:32 -0400	[thread overview]
Message-ID: <55307A20.7070407@rik.users.panix.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 4641 bytes --]

How can I get the caption for the vertical figures (figures 2 and 4 in 
the example) aligned below the figures with the caption width limited to 
the figure width? Sorry for the noise -- I am sure I am missing 
something simple, but I cannot find it at this point. (Running current 
beta and earlier versions, so it does not appear to be a regression.)

      \showframe
      \setuppapersize[A4][A3,landscape]
      \useMPlibrary[dum]
    %% Enable the first set of three for wider picture margins,
    %% and the second set of three for standard picture margins
      \def\FullWidth{\the\dimexpr(\textwidth+2\margindistance)}
      \def\PicWidth{\the\dimexpr((\FullWidth-2em)/3)}
      \def\RPicMaxWidth{\the\dimexpr(\PicWidth-\margindistance)}
    %\def\FullWidth{\textwidth}
    %\def\PicWidth{\the\dimexpr((\FullWidth-2em)/3)}
    %\def\RPicMaxWidth{\the\dimexpr(\PicWidth)}

      \setupcombinations[width=\FullWidth]

      \definefloat [rightFigure][rightFigures]
                   [figure]
      \setupfloat  [rightFigure]
                   [
                    location=right, % this does nothing!
                    maxwidth=\RPicMaxWidth,
                   ]
      \setupcaption[rightFigure]
                   [
                    width=\PicWidth,
                    location=bottom,
                    align=middle,
                   ]

      \definefloat [leftFigure][leftFigures]
                   [figure]
      \setupfloat  [leftFigure]
                   [
                    location=left, % this does nothing!
                    maxwidth=\textwidth,
                   ]
      \setupcaption[leftFigure]
                   [
                    width=\PicWidth,
                    location=bottom,
                    align=middle,
                   ]

      \define\testtext{\dorecurse{5}{This is some text to fill up the
        space. }This is some text to fill up the space.\par}

      \starttext

        \testtext

        \startplacefigure[title={You see this caption!}]
          \startcombination[3*1]
            \startcontent
             \externalfigure[dummy][width=\PicWidth]
           \stopcontent
           \startcaption
             {\bf a.} Subfigure
           \stopcaption
            \startcontent
             \externalfigure[dummy][width=\PicWidth]
           \stopcontent
           \startcaption
             {\bf b.} Subfigure
           \stopcaption
            \startcontent
             \externalfigure[dummy][width=\PicWidth]
           \stopcontent
           \startcaption
             {\bf c.} Subfigure
           \stopcaption
          \stopcombination
         \stopplacefigure

        {\em\testtext}

        \startplacerightFigure[title={Can you see this one?},
            location=right,
          ]
          \startcombination[1*2]
            \startcontent
             \externalfigure[dummy][width=\PicWidth]
           \stopcontent
           \startcaption
             {\bf a.} Subfigure
           \stopcaption
            \startcontent
             \externalfigure[dummy][width=\PicWidth]
           \stopcontent
           \startcaption
             {\bf b.} Subfigure
           \stopcaption
          \stopcombination
        \stopplacerightFigure

        \dorecurse{5}{\testtext}

        \page

        \testtext

        \startplacefigure[title={You see this caption!}]
          \startcombination[3*1]
            \startcontent
             \externalfigure[dummy][width=\PicWidth]
           \stopcontent
           \startcaption
             {\bf a.} Subfigure
           \stopcaption
            \startcontent
             \externalfigure[dummy][width=\PicWidth]
           \stopcontent
           \startcaption
             {\bf b.} Subfigure
           \stopcaption
            \startcontent
             \externalfigure[dummy][width=\PicWidth]
           \stopcontent
           \startcaption
             {\bf c.} Subfigure
           \stopcaption
          \stopcombination
         \stopplacefigure

        {\em\testtext}

        \startplaceleftFigure[title={Can you see this one?},
            location=left,
          ]
          \startcombination[1*2]
            \startcontent
             \externalfigure[dummy][width=\PicWidth]
           \stopcontent
           \startcaption
             {\bf a.} Subfigure
           \stopcaption
            \startcontent
             \externalfigure[dummy][width=\PicWidth]
           \stopcontent
           \startcaption
             {\bf b.} Subfigure
           \stopcaption
          \stopcombination
        \stopplaceleftFigure

        \dorecurse{5}{\testtext}

    \stoptext


-- 
Rik

[-- Attachment #1.2: Type: text/html, Size: 9085 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2015-04-17  3:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17  3:12 Rik Kabel [this message]
2015-04-19  4:11 ` Rik

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=55307A20.7070407@rik.users.panix.com \
    --to=context@rik.users.panix.com \
    --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).