[NTG-context] Extend figure to margin, or extend figure from margin to text

Zhichu chenzhichu at zjlab.org.cn
Wed May 29 10:28:52 CEST 2019


Hi everyone,

I am writing a book, in which all figures are placed in the margin. But some graphics are too big to fit in the margin. I was wondering whether there's an elegant way to use some room of the text body?

The output is close to the following, but the caption should be as wide as the figure and the part in the margin should not affect other marginal notes:

====================================
\showframe

\starttext

Hello\inright{Very very very long test notes.}, world!

\startplacefigure
 [reference=fig:whatever,
 title={Test figure.},
 location=outer]
\hbox{%
\framed
 [frame=on%
 ,offset=0pt%
 ,width=\dimexpr\rightmarginwidth+\rightmargindistance\relax
 ,height=\rightmarginwidth
 ]{Extended Part}%
\framed
 [frame=on%
 ,offset=0pt%
 ,width=\rightmarginwidth
 ,height=\rightmarginwidth
 ]{My Figure Here}%
\kern-\rightmargindistance
\kern-\rightmarginwidth
}
\stopplacefigure

\input knuth

\stoptext
====================================

Lua codes are also welcomed.

Best Regards,
Zhichu Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20190529/ca752f90/attachment.html>


More information about the ntg-context mailing list