ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Marco Patzer via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Marco Patzer <lists@homerow.info>
Subject: Re: Parameter order in float location matters
Date: Tue, 30 Nov 2021 13:38:57 +0100	[thread overview]
Message-ID: <20211130133857.25b6e838@homerow> (raw)
In-Reply-To: <5b30ebcb-be01-51b2-79be-a03ce5cdbff2@fiee.net>

On Tue, 30 Nov 2021 13:06:00 +0100
Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl> wrote:

> Well, in {bottom,top,here} it’s the order that TeX should try.

“location“ sets the location of the caption as well as the position
of the entire float. If you want to influence one, you'll also have
to specify the other, AFAIK. Which is a bit unfortunate since the
placement belongs in an environment and not the running text (it's a
style decision after all).

Take the following example:

\setupfloats [figure] [default=top]

\setupfloats [table]  [default=bottom]
%% \setupfloats [table]  [default=top]

\starttext
  \samplefile{knuth}

  \startplacefigure %% [location=top]  %% default
    \externalfigure
  \stopplacefigure

  %% Goal here: turn off the caption, not influence the default placement
  %% needs to be adapted when the global style changes
  %% \startplacefigure [location=none]     %% fails, messes up the placement
  \startplacefigure [location={top, none}] %% works
    \externalfigure
  \stopplacefigure

  %% Goal here: turn off the caption, not influence the default placement
  %% needs to be adapted when the global style is changed to “top”
  \startplacetable [location={bottom, none}]
    \externalfigure
  \stopplacetable
\stoptext

As far as I know there's no way to only turn off captions, so one
has to know the default placement value (which might be buried in an
environment file) and specify it again together with the “none”
option.

If you (or someone else) knows a way to disable the caption without
influencing the placement, I'm all ears.

Marco
___________________________________________________________________________________
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:[~2021-11-30 12:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 11:16 Marco Patzer via ntg-context
2021-11-30 12:06 ` Henning Hraban Ramm via ntg-context
2021-11-30 12:38   ` Marco Patzer via ntg-context [this message]
2021-11-30 13:05     ` Henning Hraban Ramm via ntg-context
2021-11-30 14:47       ` Marco Patzer via ntg-context

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=20211130133857.25b6e838@homerow \
    --to=ntg-context@ntg.nl \
    --cc=lists@homerow.info \
    /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).