ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Caption location with vertical \startplacefigure
@ 2015-04-17  3:12 Rik Kabel
  2015-04-19  4:11 ` Rik
  0 siblings, 1 reply; 2+ messages in thread
From: Rik Kabel @ 2015-04-17  3:12 UTC (permalink / raw)
  To: ntg-context


[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Caption location with vertical \startplacefigure
  2015-04-17  3:12 Caption location with vertical \startplacefigure Rik Kabel
@ 2015-04-19  4:11 ` Rik
  0 siblings, 0 replies; 2+ messages in thread
From: Rik @ 2015-04-19  4:11 UTC (permalink / raw)
  To: ntg-context


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

On 2015-04-16 23:12, Rik Kabel wrote:
> 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.)

Nevermind. A night's sleep and coffee in the AM, and all is well.

-- 
Rik


[-- Attachment #1.2: Type: text/html, Size: 954 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-19  4:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-17  3:12 Caption location with vertical \startplacefigure Rik Kabel
2015-04-19  4:11 ` Rik

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).