ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mikael P. Sundqvist" <mickep@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Figure-text alignment and wrapping text more tightly
Date: Thu, 1 Sep 2016 13:07:50 +0200	[thread overview]
Message-ID: <CAHy-LL-vD+CrTgRvFn_ckehdAoH66mF1o+eCi6VYDmHJ2HgneA@mail.gmail.com> (raw)
In-Reply-To: <A3F23AA4-AE8F-4FF8-BD8B-33C1787B0AB0@posteo.net>

On Thu, Sep 1, 2016 at 12:06 PM, Florian Leupold <fleupold@posteo.net> wrote:
> Dear list,
>
> I am interested in placing a figure on the right-hand side of the page and wrap text around it, see MWE below. This works mostly nicely. But I have got three questions:
>
> 1) Is it possible to top-align the figure with the first line of the paragraph to its left?
>
> 2) Is there a way to reduce the vertical gap between the first and second figures?
>
> 3) The keyword “low” for \placefigure seems to have an effect. But I don’t know why and could not find a reference to that in contextref.pdf. Is this the correct way to wrap text “more tightly” below the figure (compare second and third figures).
>
> Thanks a lot for your input.
>
> Best regards,
> Florian
>
>
> MWE:
>
> \setupexternalfigures[order={pdf,png,jpg}, location={local,global,default}]
> \starttext
> \useexternalfigure[figure][mill]
> \placefigure[right, none]{}{\externalfigure[figure]}
> \input ward
> \placefigure[right, none]{}{\externalfigure[figure]}
> \input ward
> \input ward
> \input ward
> \placefigure[right, low, none]{}{\externalfigure[figure]}
> \input ward
> \input ward
> \input ward
> \stoptext
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

1) I think you look for the high key.
2) Here, sidespaceafter and sidespacebefore might help
3) I'd look in the details.pdf, the low key might be explained there
(or wait for better answers here)

Compare the three pages in this example, regarding 1) and 2):

\setupexternalfigures[order={pdf,png,jpg}, location={local,global,default}]


\starttext

\useexternalfigure[figure][mill]
\placefigure[right, high, none]{}{\externalfigure[figure]}
\input ward
\placefigure[right, high, none]{}{\externalfigure[figure]}
\input ward
\input ward
\input ward
\placefigure[right, high, none]{}{\externalfigure[figure]}
\input ward
\input ward
\input ward
\page[yes]


\setupfloats[sidespaceafter=none,sidespacebefore=none]

\useexternalfigure[figure][mill]
\placefigure[right, high, none]{}{\externalfigure[figure]}
\input ward
\placefigure[right, high, none]{}{\externalfigure[figure]}
\input ward
\input ward
\input ward
\placefigure[right, high, none]{}{\externalfigure[figure]}
\input ward
\input ward
\input ward
\page[yes]


\setupfloats[sidespaceafter=-\baselineskip,sidespacebefore=none]

\placefigure[right, high, none]{}{\externalfigure[figure]}
\input ward
\placefigure[right, high, none]{}{\externalfigure[figure]}
\input ward
\input ward
\input ward
\placefigure[right, high, none]{}{\externalfigure[figure]}
\input ward
\input ward
\input ward
\stoptext


/Mikael
___________________________________________________________________________________
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:[~2016-09-01 11:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 10:06 Florian Leupold
2016-09-01 11:07 ` Mikael P. Sundqvist [this message]

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=CAHy-LL-vD+CrTgRvFn_ckehdAoH66mF1o+eCi6VYDmHJ2HgneA@mail.gmail.com \
    --to=mickep@gmail.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).