ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Indentation after margin float with caption
@ 2016-09-02  7:47 Mikael P. Sundqvist
  2016-09-06 19:07 ` Mikael P. Sundqvist
  0 siblings, 1 reply; 5+ messages in thread
From: Mikael P. Sundqvist @ 2016-09-02  7:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 690 bytes --]

Dear list,

is it possible to have a margin figure with caption, and automatically
have the next paragraph indented? Look at the example below (pdf
result attached). If I add the none argument to the float, then the
next paragraph is indented. Otherwise not. Is it a bug or a feature?

Best regards, Mikael

\setupindenting[yes,medium]

\setupfloats[indentafter=yes]

\starttext

\input tufte

\placefigure[outermargin,middle]{}{\blackrule[width=1cm,height=1cm]}

This should be indented, but it is not! \input tufte

\input tufte

\placefigure[outermargin,middle,none]{}{\blackrule[width=1cm,height=1cm]}

This should be indented, and it is! But I want the caption. \input tufte
\stoptext

[-- Attachment #2: ctx-example9.pdf --]
[-- Type: application/pdf, Size: 12819 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Indentation after margin float with caption
  2016-09-02  7:47 Indentation after margin float with caption Mikael P. Sundqvist
@ 2016-09-06 19:07 ` Mikael P. Sundqvist
  2016-09-06 19:23   ` Wolfgang Schuster
  2016-09-07 11:25   ` Aditya Mahajan
  0 siblings, 2 replies; 5+ messages in thread
From: Mikael P. Sundqvist @ 2016-09-06 19:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Sep 2, 2016 at 9:47 AM, Mikael P. Sundqvist <mickep@gmail.com> wrote:
> Dear list,
>
> is it possible to have a margin figure with caption, and automatically
> have the next paragraph indented? Look at the example below (pdf
> result attached). If I add the none argument to the float, then the
> next paragraph is indented. Otherwise not. Is it a bug or a feature?
>
> Best regards, Mikael
>
> \setupindenting[yes,medium]
>
> \setupfloats[indentafter=yes]
>
> \starttext
>
> \input tufte
>
> \placefigure[outermargin,middle]{}{\blackrule[width=1cm,height=1cm]}
>
> This should be indented, but it is not! \input tufte
>
> \input tufte
>
> \placefigure[outermargin,middle,none]{}{\blackrule[width=1cm,height=1cm]}
>
> This should be indented, and it is! But I want the caption. \input tufte
> \stoptext

Dear all,

since I got no answer here I cross posted on stackexchange (see
http://tex.stackexchange.com/q/328147/52406). Now, I got a solution to
this from Aditya. It seems that it is not yet clear to me (or Aditya,
as far as I understand from the reply) which float placements that
respects the \setupfloats[indentnext=yes] and which not. Or more
importantly, why.

To make this email thread more complete, the solution of Aditya adds

\unprotect
\def\page_one_place_float_auto
{\page_one_place_float_otherwise\nonoindentation}
\def\page_one_place_float_bottom
{\page_one_place_float_otherwise\nonoindentation}
\def\page_one_place_float_margin
{\page_margin_blocks_process_float\nonoindentation}
\def\page_one_place_float_leftmargin
{\page_one_place_float_side_indeed\page_sides_process_float_leftmargin\nonoindentation}
\def\page_one_place_float_rightmargin{\page_one_place_float_side_indeed\page_sides_process_float_rightmargin\nonoindentation}
\protect

(this kind of solution was also suggested in 2011 in an old thread,
see https://mailman.ntg.nl/pipermail/ntg-context/2011/058152.html)

/Mikael

PS I have a couple of more questions on the list that has not got any
response. I hope you don't mind me cross posting on stackexchange in
these cases.
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Indentation after margin float with caption
  2016-09-06 19:07 ` Mikael P. Sundqvist
@ 2016-09-06 19:23   ` Wolfgang Schuster
  2016-09-06 19:57     ` Aditya Mahajan
  2016-09-07 11:25   ` Aditya Mahajan
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2016-09-06 19:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Mikael P. Sundqvist <mailto:mickep@gmail.com>
> 6. September 2016 um 21:07
>
> Dear all,
>
> since I got no answer here I cross posted on stackexchange (see
> http://tex.stackexchange.com/q/328147/52406). Now, I got a solution to
> this from Aditya. It seems that it is not yet clear to me (or Aditya,
> as far as I understand from the reply) which float placements that
> respects the \setupfloats[indentnext=yes] and which not. Or more
> importantly, why.
>
> To make this email thread more complete, the solution of Aditya adds
>
> \unprotect
> \def\page_one_place_float_auto
> {\page_one_place_float_otherwise\nonoindentation}
> \def\page_one_place_float_bottom
> {\page_one_place_float_otherwise\nonoindentation}
> \def\page_one_place_float_margin
> {\page_margin_blocks_process_float\nonoindentation}
> \def\page_one_place_float_leftmargin
> {\page_one_place_float_side_indeed\page_sides_process_float_leftmargin\nonoindentation}
> \def\page_one_place_float_rightmargin{\page_one_place_float_side_indeed\page_sides_process_float_rightmargin\nonoindentation}
> \protect
When backwards compatiblity is a reason for not changing this adding a 
hook can be solution, e.g.

-\def\page_one_place_float_auto       {\page_one_place_float_otherwise}
+\def\page_one_place_float_auto       
{\page_one_place_float_otherwise\rootfloatparameter\c!next}

which can be used with \setupfloat[next=\indentation]

Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Indentation after margin float with caption
  2016-09-06 19:23   ` Wolfgang Schuster
@ 2016-09-06 19:57     ` Aditya Mahajan
  0 siblings, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2016-09-06 19:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 6 Sep 2016, Wolfgang Schuster wrote:

>>  Mikael P. Sundqvist <mailto:mickep@gmail.com>
>>  6. September 2016 um 21:07
>>
>>  Dear all,
>>
>>  since I got no answer here I cross posted on stackexchange (see
>>  http://tex.stackexchange.com/q/328147/52406). Now, I got a solution to
>>  this from Aditya. It seems that it is not yet clear to me (or Aditya,
>>  as far as I understand from the reply) which float placements that
>>  respects the \setupfloats[indentnext=yes] and which not. Or more
>>  importantly, why.
>>
>>  To make this email thread more complete, the solution of Aditya adds
>>
>>  \unprotect
>>  \def\page_one_place_float_auto
>>  {\page_one_place_float_otherwise\nonoindentation}
>>  \def\page_one_place_float_bottom
>>  {\page_one_place_float_otherwise\nonoindentation}
>>  \def\page_one_place_float_margin
>>  {\page_margin_blocks_process_float\nonoindentation}
>>  \def\page_one_place_float_leftmargin
>>  {\page_one_place_float_side_indeed\page_sides_process_float_leftmargin\nonoindentation}
>>  \def\page_one_place_float_rightmargin{\page_one_place_float_side_indeed\page_sides_process_float_rightmargin\nonoindentation}
>>  \protect
> When backwards compatiblity is a reason for not changing this adding a hook 
> can be solution, e.g.
>
> -\def\page_one_place_float_auto       {\page_one_place_float_otherwise}
> +\def\page_one_place_float_auto 
> {\page_one_place_float_otherwise\rootfloatparameter\c!next}
>
> which can be used with \setupfloat[next=\indentation]

In the move to MkII to MkIV, there have been many changes that are not 
backward compatible. So, I am not in favor of adding a new key when we 
already have an indentnext key just for the sake of backward 
compatibility.

It will be nice if all the location alternatives in setupfloat honored the 
indentnext key. It is really awkaward that when indentnext=yes (or auto) 
location=top and location=bottom behave differently.

If backward compatibility is really important, we could add a mechanism to 
control the indentnext key for each location; but that would add too much 
complexity to the code for very little benefit. If one wants to mix floats 
that indent the next paragraph with floats that don't indent the next 
paragraph, it is possible to define different types of floats (with the 
same counters and lists) such that indentnext=yes for one type and 
indentnext=no for the other.

Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Indentation after margin float with caption
  2016-09-06 19:07 ` Mikael P. Sundqvist
  2016-09-06 19:23   ` Wolfgang Schuster
@ 2016-09-07 11:25   ` Aditya Mahajan
  1 sibling, 0 replies; 5+ messages in thread
From: Aditya Mahajan @ 2016-09-07 11:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 6 Sep 2016, Mikael P. Sundqvist wrote:

> \unprotect
> \def\page_one_place_float_auto
> {\page_one_place_float_otherwise\nonoindentation}
> \def\page_one_place_float_bottom
> {\page_one_place_float_otherwise\nonoindentation}
> \def\page_one_place_float_margin
> {\page_margin_blocks_process_float\nonoindentation}
> \def\page_one_place_float_leftmargin
> {\page_one_place_float_side_indeed\page_sides_process_float_leftmargin\nonoindentation}
> \def\page_one_place_float_rightmargin{\page_one_place_float_side_indeed\page_sides_process_float_rightmargin\nonoindentation}
> \protect

Actually, this should be:


\unprotect
\def\page_one_place_float_auto 
{\page_one_place_float_otherwise\useindentnextparameter\floatparameter}
\def\page_one_place_float_bottom 
{\page_one_place_float_otherwise\useindentnextparameter\floatparameter}
\def\page_one_place_float_margin 
{\page_margin_blocks_process_float\useindentnextparameter\floatparameter}
\def\page_one_place_float_leftmargin 
{\page_one_place_float_side_indeed\page_sides_process_float_leftmargin\useindentnextparameter\floatparameter}
\def\page_one_place_float_rightmargin{\page_one_place_float_side_indeed\page_sides_process_float_rightmargin\useindentnextparameter\floatparameter}
\protect

so that indentation is not forced, rather depends on indentnext key.

Aditya
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-07 11:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02  7:47 Indentation after margin float with caption Mikael P. Sundqvist
2016-09-06 19:07 ` Mikael P. Sundqvist
2016-09-06 19:23   ` Wolfgang Schuster
2016-09-06 19:57     ` Aditya Mahajan
2016-09-07 11:25   ` Aditya Mahajan

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).