latex3 / latex2e

The LaTeX2e kernel
https://www.latex-project.org/
LaTeX Project Public License v1.3c
1.95k stars 267 forks source link

Re-work \MakeTitlecase implementation #1547

Closed josephwright closed 1 week ago

josephwright commented 2 weeks ago

Fixes latex3/latex3#1316

Internal housekeeping

Status of pull request

Checklist of required changes before merge will be approved

I've gone without rollback here: I think we have been adjusting this code a bit and can live with telling users that.

car222222 commented 2 weeks ago

Whilst this selective capitalization is often done (in some typesetting traditions for English at least), coming up with a generally used list of such words would be difficult, and maybe controversial.

Thus, I would state that "the details of such capitalization are normally the work of an author or editor, rather than of such an automated process", and simply provide the "all" option in case it is sometimes useful!

FrankMittelbach commented 2 weeks ago

Whilst this selective capitalization is often done (in some typesetting traditions for English at least), coming up with a generally used list of such words would be difficult, and maybe controversial.

Thus, I would state that "the details of such capitalization are normally the work of an author or editor, rather than of such an automated process", and simply provide the "all" option in case it is sometimes useful!

coming up with a list at our end would not work, I agree, but I was just suggesting to offer the possibility to specify such a list. Then a journal or a biblatex style or ... could specify what they want fora specific journal and this way allowing the automation to work.

josephwright commented 2 weeks ago

@FrankMittelbach As @car222222 says, this is very tricky and there tends to be an editorial aspect - different people regard different words as 'small'. So whilst we could try to extend to cover the typical expectation of titlecasing in English, I think that might be a stretch too far - at least at present.

car222222 commented 2 weeks ago

OK, understood.

Whilst this is certainly doable, it is not clear whether it will be used much by "LaTeX editors" etc.

josephwright commented 2 weeks ago

coming up with a list at our end would not work, I agree, but I was just suggesting to offer the possibility to specify such a list. Then a journal or a biblatex style or ... could specify what they want fora specific journal and this way allowing the automation to work.

We could look at this as a feature request at the expl3 layer - that would then be available to the document command - we could have some additional key option to choose between them.

car222222 commented 2 weeks ago

I hope it is clear that my previous response was to @FrankMittelbach re his further explanation of what he is suggesting.

FrankMittelbach commented 1 week ago

We could look at this as a feature request at the expl3 layer - that would then be available to the document command - we could have some additional key option to choose between them.

that is roughly what I was suggesting. Basically that doesn't need a key but simply a single clist macro to which one can specify the "small" words that should not be titlecased. That could then be used in a class and would by default be empty, e.g., \SetTitlecaseExceptions{of,the,and,or} or something similar as an interface.

josephwright commented 1 week ago

@FrankMittelbach I'll add it to the to-do list :) But I think it's out-of-scope for the PR

FrankMittelbach commented 1 week ago

@FrankMittelbach I'll add it to the to-do list :) But I think it's out-of-scope for the PR

that's what I said, didn't I? more something to consider separately

josephwright commented 1 week ago

We good to go here?

josephwright commented 1 week ago

We good to go here?

FrankMittelbach commented 1 week ago

from my point yes, (modula resolving conflicts)