ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Margin figure in itemize
@ 2022-11-21 13:00 Alexandre Christe via ntg-context
  2022-11-22 13:13 ` Alain Delmotte via ntg-context
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Christe via ntg-context @ 2022-11-21 13:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Alexandre Christe


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

Dear list,

With the following MWE I end up with big gaps between margin figures in an
itemized list. Is there a way to remove that space in the text and place
the figures in the margin one below the other the best one can?

\setuppagenumbering
  [alternative=doublesided, location=margin]

\setuplayout
  [header=0pt,
   margin=4cm,
   footerdistance=.5cm,
   topspace=1cm,
   backspace=1cm,
   cutspace=2cm,
   width=fit,
   height=\dimexpr
    \paperheight-\topspace+\footerheight+\footerdistance-4cm\relax]

% \showframe

\definefloat
  [marginfigure]
  [figure]

\setupfloat
  [marginfigure]
  [outermargindistance=-\outermargintotal,
  default={outermargin,height,high,low,none}]

\starttext

\startstaticMPfigure{square}
  draw fullsquare scaled 3cm;
\stopstaticMPfigure

\startitemize
  \placemarginfigure{}{\usestaticMPfigure[square]}
  \item bla
  \item bla
  \placemarginfigure{}{\usestaticMPfigure[square]}
  \item bla
\stopitemize

\stoptext

Thanks in advance,
Alex

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

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

* Re: Margin figure in itemize
  2022-11-21 13:00 Margin figure in itemize Alexandre Christe via ntg-context
@ 2022-11-22 13:13 ` Alain Delmotte via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Alain Delmotte via ntg-context @ 2022-11-22 13:13 UTC (permalink / raw)
  To: Alexandre Christe via ntg-context; +Cc: Alain Delmotte


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

Hi!

Le 21/11/2022 à 14:00, Alexandre Christe via ntg-context a 
écrit :
> Dear list,
>
> With the following MWE I end up with big gaps between 
> margin figures in an itemized list. Is there a way to 
> remove that space in the text and place the figures in the 
> margin one below the other the best one can?
>
> \setuppagenumbering
>   [alternative=doublesided, location=margin]
>
> \setuplayout
>   [header=0pt,
>    margin=4cm,
>    footerdistance=.5cm,
>    topspace=1cm,
>    backspace=1cm,
>    cutspace=2cm,
>    width=fit,
>    height=\dimexpr
> \paperheight-\topspace+\footerheight+\footerdistance-4cm\relax]
>
> % \showframe
>
> \definefloat
>   [marginfigure]
>   [figure]
>
> \setupfloat
>   [marginfigure]
>   [outermargindistance=-\outermargintotal,
>   default={outermargin,height,high,low,none}]
>
> \starttext
>
> \startstaticMPfigure{square}
>   draw fullsquare scaled 3cm;
> \stopstaticMPfigure
>
> \startitemize
>   \placemarginfigure{}{\usestaticMPfigure[square]}
>   \item bla
>   \item bla
>   \placemarginfigure{}{\usestaticMPfigure[square]}
>   \item bla
> \stopitemize
>
> \stoptext
>
> Thanks in advance,
> Alex
>
For me it looks alright, in particular if you have longer 
text in the \item. The figures are aligned with the \item's.

One thing which changes is the space between de items: 
between 2 and 3. I have no answer for that.

---
Alain



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

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2022-11-22 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 13:00 Margin figure in itemize Alexandre Christe via ntg-context
2022-11-22 13:13 ` Alain Delmotte via ntg-context

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