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

\indexlibrary-global or -member? #6705

Open
burblebee opened this issue Nov 17, 2023 · 1 comment
Open

\indexlibrary-global or -member? #6705

burblebee opened this issue Nov 17, 2023 · 1 comment

Comments

@burblebee
Copy link
Contributor

burblebee commented Nov 17, 2023

We sometimes use \indexlibrarymember when indexing "global" library entities (in std namespace really). Elsewhere, we use \indexlibraryglobal. Why? What should the convention be?

For example, with the addition of P2819R2, Joel E. pointed out that tuple_size and tuple_element are actually "global", yet the convention used for similar entities (e.g. tanh) was to index them as if they were members of complex. See #6693 (comment)

Note that elsewhere we've also used indexes like the following:
\indexlibrary{\idxcode{formatter}!specializations!\idxcode{nullptr_t}}%

With \indexlibrarymember{x}{y}, we get y under x in the index which might be helpful, but we also get x under y which might not make sense, and we don't get x by itself. In the cases in question, neither x nor y is a member, so using ,\indexlibrarymember to index them is confusing. Note that we're also inconsistent as to whether we write \indexlibrarymember{x}{y} vs. \indexlibrarymember{y}{x}, so we need to be careful when fixing this issue.

Originally posted by @burblebee in #6693 (comment)

@burblebee burblebee changed the title lib-global or -member? \indexlibrary-global or -member? Nov 17, 2023
@JohelEGP
Copy link
Contributor

Note that we're also inconsistent as to whether we write \indexlibrarymember{x}{y} vs. \indexlibrarymember{y}{x}, so we need to be careful when fixing this issue.

The effect should be the same:

% class member library index
\newcommand{\indexlibraryboth}[2]{\indexlibrarymisc{#1}{#2}\indexlibrarymisc{#2}{#1}}
\newcommand{\indexlibrarymember}[2]{\indexlibraryboth{\idxcode{#1}}{\idxcode{#2}}}
\newcommand{\indexlibrarymemberexpos}[2]{\indexlibraryboth{\idxcode{#1}}{#2@\exposid{#2}}}
\newcommand{\indexlibrarymemberx}[2]{\indexlibrarymisc{\idxcode{#1}}{\idxcode{#2}}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants