Sat, 6 Mar 2021 18:04:47 +0100
Frank Mittelbach <[log in to unmask]> writes:
> Hi Pieter
>> I am working on a new implementation of my 'extramarks' package,
>> based on the '\marks' command. To get a clean namespace, I would
>> prefix all internal commands with '\extramarks@', or \extramarks_' in
>> expl3 syntax (which I am slowly learning now). However, this causes
>> the names to get quite long.
> as Phelype suggested the best practice approach in l3 is to use the @@
> notation and let docstrip add the prefix into stripped code. works for
> all private csnames and automatically adds the double underscore so
> automagically becomes
> Using the package name as namespace then becomes simple. Personally I
> sometimes use more cryptic ones starting with my initial, e.g. fmdug in
> the dashundergaps package using the long package name is probably better.
>> So I was thinking of changing that to something shorter, and I came
>> up with \xmarks@'/'\xmarks_', and then 'xmarks' for the package name,
>> and in fact I already did that edit. But then I remembered that in
>> the past there had been an 'xmarks' or 'xmarks2' package by the LaTeX
> The xmarks package is currently not distributed that is true but I would
> ask you to please not use marks or xmarks as prefix names nor as package
> names as there will be a marks interface eventually again and "xmarks"
> would the "extension" of that.
OK, thanks. I will refrain to use these names. Knowing this will give me some peace of conscience :)
> Not knowing exactly what the package is out to do (is it an extension to
> extramarks?) it is difficult to suggest a name, but when using the @@
> convention in l3 long names aren't a problem.
Yes, it is an extension of the extramarks package. Regularly, I get questions (by email or on stackexchange) that can't be solved by the current implementation of extramarks because the marks are not independent. So I am experimenting with a new implementation based on the e-tex \newmarks mechanism.
I now use the package name extramarks2 and the macro names will have 'extramarks' as module part.
It is actually fun experimenting, but I don't know if I will release the result. If the new marks mechanism becomes available in LaTeX2e, it might be easier to use that to implement it.
In the meantime, I am also learning expl3 syntax, which is more of a challenge.
Pieter van Oostrum
PGP key: [8DAE142BE17999C4]