Hi again,

I tried running the code in the accepted answer from this StackExchange
question:
https://tex.stackexchange.com/questions/641779/adding-column-rules-in-contexts-columnsets-pagecolumns
(see below); but the vertical rules do not seem to appear with LMTX
2025.12.05 17:46. (I think the code gave the expected output until at least
two months ago, although I am not 100% sure of that.)

Would anyone know how to update it to work with the latest version of LMTX?
_______________________________________
\setupbodyfont[dejavu,9pt]

\setuphead[subject][
    style=bold,
    before={\blank[line]},
    after={\blank[none]},
]

\setuplayout[
    backspace=13mm,
    width=middle,
    topspace=13mm,
    height=middle,
    header=0mm,
    footer=0mm,
    grid=yes,
]

\startuseMPgraphic{verticalrule}
save a, b, c, p, q, r ;
path b ; b := positioncolumnbox(CurrentColumn) ;
draw image (
    path p ; p := rightboundary b shifted (\frameddimension{distance}/2,0) ;
    numeric c ; c := positioncolumn(positionregion("allendshere")) ;
    if (positionpage("allendshere") = RealPageNumber):
        if (CurrentColumn < c) :
            draw p withcolor black withpen pencircle scaled 1 ;
        elseif (CurrentColumn > c) :
            % nothing
        else :
            if CurrentColumn < NOfColumns :
                pair a ; a := positionxy ("allendshere") ;
                path q ; q := (0,ypart a) -- (PaperWidth,ypart a) ;
                path r ; r := p cutbeforefirst q ;
                draw r withcolor black withpen pencircle scaled 1 ;
            fi ;
        fi ;
    else :
        if CurrentColumn < NOfColumns :
            draw p withcolor black withpen pencircle scaled 1 ;
        fi ;
    fi ;
) shifted -llcorner b ;
setbounds currentpicture to OverlayBox ;
\stopuseMPgraphic

\defineoverlay[verticalrule][\useMPgraphic{verticalrule}]

\setupalign[verytolerant,stretch]

\starttext

\startpagecolumns[n=3,background=verticalrule]
    \dorecurse{10}{%
        \subject[title={Foo \recurselevel}]
        \samplefile{lorem}
    }
    \hpos{allendshere}{}
\stoppagecolumns

\stoptext
_______________________________________________________

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

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to