ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Zhichu" <chenzhichu@zjlab.org.cn>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Extend figure to margin, or extend figure from margin to text
Date: Wed, 29 May 2019 16:28:52 +0800	[thread overview]
Message-ID: <da4d68fd-c7d1-4643-92a5-18d59e9b9df6.chenzhichu@zjlab.org.cn> (raw)


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


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

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2019-05-29  8:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29  8:28 Zhichu [this message]
2019-05-29  9:55 ` Wolfgang Schuster
2019-05-29 12:27   ` Zhichu
2019-05-31  5:15   ` Zhichu

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=da4d68fd-c7d1-4643-92a5-18d59e9b9df6.chenzhichu@zjlab.org.cn \
    --to=chenzhichu@zjlab.org.cn \
    --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).