Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-defined marks swallowed if inside multicols #1421

Open
cspiel opened this issue Jul 29, 2024 · 4 comments
Open

User-defined marks swallowed if inside multicols #1421

cspiel opened this issue Jul 29, 2024 · 4 comments
Assignees
Labels
bug category tools enhancement fixed in dev Fixed in development branch, not in stable release

Comments

@cspiel
Copy link

cspiel commented Jul 29, 2024

Brief outline of the bug

I find that even with the latest (released) multicol.sty, v1.9h,
user-defined marks are recorded as proven by the log file but
they do not quite make it to \FirstMark or \LastMark if the
insertion points are within a multicols environment.

Otherwise the \NewMarkClass mechanism works flawlessly.

In the example given below I'd expect the head to show a-n,
however what I get is a-b.

The problem may share a distant relationship with issue #1130.

Minimal example showing the bug

\RequirePackage{latexbug}
\documentclass{article}

\usepackage{multicol}

\NewMarkClass{DictMark}
\DebugMarksOn

\makeatletter
\def\@oddhead{\FirstMark{DictMark}--\LastMark{DictMark}\hfill\thepage}
\let\@evenhead=\@oddhead
\makeatother

\begin{document}
\InsertMark{DictMark}{a}a
\InsertMark{DictMark}{b}b

\begin{multicols}{2}
\InsertMark{DictMark}{m}m
\InsertMark{DictMark}{n}n
\end{multicols}

%%--\InsertMark{DictMark}{z}z
\end{document}

Log file (required) and possibly PDF file

l3marks.log
l3marks.pdf

@FrankMittelbach
Copy link
Member

The problem is that multicol is still not yet enabled to support the new mark mechanism. I'm aware of that but haven't found the time to address this.

@FrankMittelbach FrankMittelbach added this to the Release 2024 Fall milestone Aug 1, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity.

@FrankMittelbach
Copy link
Member

Support for the new mark mechanism has now been added to multicol. At the moment it is still in its own branch but will move soon to the develop branch and then show up in the next dev release and eventually in the June 2025 release of LaTeX, so this is just a heads-up that something is actually moving. Feedback on the code and the documentation welcome:
see pull request #1548

I should say, however, that it may not be easy to run the code in the branch as it is based on code changes in ltmarks.dtx, which means one has to build a private format to run it (at the moment), i.e., the multicol.dtx is not enough.

@cspiel
Copy link
Author

cspiel commented Nov 14, 2024

@FrankMittelbach: THX for the tedious work and extra thanks
for warning me of the additional dependencies still involved.

I'll test your new code as soon as multicol.dtx will be enough.

@FrankMittelbach FrankMittelbach moved this from In progress to Done in dev in upcoming LaTeX2e releases Nov 20, 2024
@FrankMittelbach FrankMittelbach added the fixed in dev Fixed in development branch, not in stable release label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug category tools enhancement fixed in dev Fixed in development branch, not in stable release
Projects
Status: Done in dev
Development

No branches or pull requests

3 participants