Re: [NTG-context] Centering the last line in combination subcaptions
Am 08.02.2014 um 00:07 schrieb Jan Tosovsky
This is the improved example. The only remaining issue is an one empty line between the image and the label when \startnarrower command is used.
Please compare two pages w/o this option set:
%\definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}] %\setupbodyfont[palatino] \setupnarrower[middle=-2.8cm]
\starttext test \startplacefigure[location=page, number=no, title={}] \setupcombinations[align={last, hz, hanging}] {\startcombination[1*2] {\externalfigure[cow]} {\startnarrower {\itx \input{tufte}} \stopnarrower} {\externalfigure[cow]} {\startnarrower {\itx \input{lorem}} \stopnarrower} \stopcombination} \stopplacefigure
\startplacefigure[location=page, number=no, title={}] \setupcombinations[align={last, hz, hanging}] {\startcombination[1*2] {\externalfigure[cow]} {\itx \input{ward}} {\externalfigure[cow]} {\itx \input{ward}} \stopcombination} \stopplacefigure
\stoptext
I haven't find any better way to extend the caption width than that negative value for narrowed text. It works, but that empty space above looks weird
You have to force a certain width for your images because the width of the text space depends on the width of the images. You can use \framed (instead of loffset/roffset you can also set a fixed width) or \simplealignedbox to set the width of the images. \setupexternalfigures[location=default] \defineframed[CombinationBox][frame=off,offset=none,loffset=3cm,roffset=3cm] \starttext \startplacefigure[location={force,none}] \startcombination[nx=1,ny=2,align={last,hz,hanging},style=\itx] % first image \startcontent %\simplealignedbox{11cm}{middle}{\externalfigure[cow][width=5cm]} \CombinationBox{\externalfigure[cow][width=5cm]} \stopcontent \startcaption \input{ward} \stopcaption % second image \startcontent %\simplealignedbox{11cm}{middle}{\externalfigure[cow][width=5cm]} \CombinationBox{\externalfigure[cow][width=5cm]} \stopcontent \startcaption \input{ward} \stopcaption \stopcombination \stopplacefigure \stoptext Wolfgang
On 2014-02-08 Wolfgang Schuster wrote:
I haven't find any better way to extend the caption width than that negative value for narrowed text. It works, but that empty space above looks weird
You have to force a certain width for your images because the width of the text space depends on the width of the images. You can use \framed (instead of loffset/roffset you can also set a fixed width) or \simplealignedbox to set the width of the images.
\setupexternalfigures[location=default]
\defineframed[CombinationBox][frame=off,offset=none,loffset=3cm,roffset =3cm]
\starttext
\startplacefigure[location={force,none}] \startcombination[nx=1,ny=2,align={last,hz,hanging},style=\itx] % first image \startcontent
%\simplealignedbox{11cm}{middle}{\externalfigure[cow][width=5cm]} \CombinationBox{\externalfigure[cow][width=5cm]} \stopcontent \startcaption \input{ward} \stopcaption % second image \startcontent
%\simplealignedbox{11cm}{middle}{\externalfigure[cow][width=5cm]} \CombinationBox{\externalfigure[cow][width=5cm]} \stopcontent \startcaption \input{ward} \stopcaption \stopcombination \stopplacefigure
\stoptext
Thanks a lot, it is much simpler! I also like that \start \stop structure which makes the code more clear. Just for future reference: CombinationBox extends the current image width with the fixed value. When different image widths are used in your document, the caption width varies as well. To keep the consistency within the document I've chosen that simplealignedbox instead. Jan
participants (2)
-
Jan Tosovsky
-
Wolfgang Schuster