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

[impldef] Fixed index entry collation to support keys containing code #772

Closed
wants to merge 1 commit into from

Conversation

tkoeppe
Copy link
Contributor

@tkoeppe tkoeppe commented Jun 27, 2016

OK, I reworked this. The new solution involves stripping out certain well-known commands from the index text and using the bare text for collation, while retaining the original text for the index entry. The stripped commands are \tcode, \_, \mname and \grammarterm.

For advanced entries that add further index structure, this duplication mechanism fails, so we provide a new macro \impldefplain that has the original functionality. It's only used for one set of entries (value of bit-fields).

Only two pages of diffs.

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Jun 27, 2016

One consequence of the auto-generation of the collation order is that nested magic underscores (provided by the underscore package) don't work inside index entries. Magic underscores can always be replaced by explicit underscores (\_), though, which is what I've done here.

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Jul 9, 2016

This change will impose the following permanent maintenance cost:

  • Anything inside an \impldef or \impdefx needs to explicitly escape underscores: \_
  • If text inside an \impldef or \impdefx uses macros (e.g. \Cpp), we either need to add a replacement for that macro to macros.tex, or we need to use the plain index form instead and manually provide the collation key.

I think that's manageable, but it's something that might catch you out as you add new content and it suddenly doesn't compile.

@tkoeppe
Copy link
Contributor Author

tkoeppe commented Jul 9, 2016

The two pages of diffs are now:

image

image

@tkoeppe tkoeppe force-pushed the coll branch 5 times, most recently from 8964f3b to 545fb4a Compare July 12, 2016 23:19
@tkoeppe
Copy link
Contributor Author

tkoeppe commented Jul 19, 2016

Superseded by PR #834.

@tkoeppe tkoeppe closed this Jul 19, 2016
@tkoeppe tkoeppe deleted the coll branch July 20, 2016 22:19
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

Successfully merging this pull request may close these issues.

None yet

1 participant