On Sun, 28 Aug 2016, Aditya Mahajan wrote:

Hi,

This is based on a question on TeX.SE
https://tex.stackexchange.com/questions/326653/context-wrapfigure-interacts-with-marginrule

All marginrules except those of level 1 stop working after \placefigure[right]. Here is a minimal example:

\useexternalfigure[ctanlion][http://www.ctan.org/lion/ctan_lion_350x350.png][width=4cm]
\starttext

\placefigure[here,none,right]{}{\externalfigure[ctanlion]}
\input knuth

\startmarginrule[2]
 \input ward
\stopmarginrule

\startmarginrule[1]
 \input ward
\stopmarginrule

\startmarginrule[3]
 \input ward
\stopmarginrule

\stoptext

The output is attached.

The attached patch seems to fix the bug.

Aditya
*** /opt/context-minimals/tex/texmf-context/tex/context/base/mkiv/anch-bar.mkiv	2016-08-28 16:55:00.000000000 -0400
--- anch-bar.mkiv	2016-08-28 16:52:47.000000000 -0400
***************
*** 111,118 ****
         \advance\d_anch_sidebars_distance\scratchdistance\relax
       \fi
     \else
       \ifnum\m_level=\plusone
-        \scratchdimen\sidebarparameter\c!leftmargindistance\relax
         \ifdim\scratchdimen=\zeropoint
           \advance\d_anch_sidebars_distance\scratchdistance\relax
         \else
--- 111,118 ----
         \advance\d_anch_sidebars_distance\scratchdistance\relax
       \fi
     \else
+      \scratchdimen\sidebarparameter\c!leftmargindistance\relax
       \ifnum\m_level=\plusone
         \ifdim\scratchdimen=\zeropoint
           \advance\d_anch_sidebars_distance\scratchdistance\relax
         \else
___________________________________________________________________________________
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 via email to