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

global use of counter commands such as \alph* to access the current counter. #1632

Open
davidcarlisle opened this issue Jan 21, 2025 · 0 comments
Assignees
Labels
category base (latex) enhancement fixed in dev Fixed in development branch, not in stable release

Comments

@davidcarlisle
Copy link
Member

Brief outline of the enhancement

enumitem has popularised using \arabic* and similar in item labels to access the current list counter. This feature isn't yet available in the latex-lab list module but the addition of \@currentcounter to the format back in 2020 makes it possible for these commands to be globally available, not just in item labels. So for example \roman* (really \roman{*}) would access the current counter as used by \label and typeset it in roman.

It could have a trivial definition, as shown below,

\documentclass{article}
\makeatletter
\protected\ExpandArgs{c}\def{c@*}{\value\@currentcounter}
\makeatother

\begin{document}

\section{aaa}
\arabic*

\subsection{bb}
\subsection{bbb}

\arabic*


\begin{enumerate}
\item \arabic*
\end{enumerate}
\end{document}
@davidcarlisle davidcarlisle self-assigned this Jan 21, 2025
davidcarlisle added a commit that referenced this issue Jan 22, 2025
@davidcarlisle davidcarlisle mentioned this issue Jan 22, 2025
6 tasks
davidcarlisle added a commit that referenced this issue Jan 25, 2025
davidcarlisle added a commit that referenced this issue Jan 25, 2025
davidcarlisle added a commit that referenced this issue Jan 26, 2025
* code for #1632

* verb

* Update base/ltcounts.dtx

Co-authored-by: Yukai Chou <[email protected]>

* Update base/ltcounts.dtx

Co-authored-by: Yukai Chou <[email protected]>

* commas and brackets

* the

* updates from review

* safer test for  argument

* extra macro env

* commit test file for #1632

* guard star in counterwithin/out, from review #1632

* more words for ltnews #1632

---------

Co-authored-by: Yukai Chou <[email protected]>
@github-project-automation github-project-automation bot moved this to Pool (unscheduled issues) in upcoming LaTeX2e releases Jan 29, 2025
@FrankMittelbach FrankMittelbach moved this from Pool (unscheduled issues) to Done in dev in upcoming LaTeX2e releases Jan 29, 2025
@FrankMittelbach FrankMittelbach added the fixed in dev Fixed in development branch, not in stable release label Jan 29, 2025
@FrankMittelbach FrankMittelbach added this to the Release 2025 Q2 milestone Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category base (latex) enhancement fixed in dev Fixed in development branch, not in stable release
Projects
Status: Done in dev
Development

No branches or pull requests

2 participants