LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Thu, 4 Mar 2021 19:39:23 +0100
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID:
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
In-Reply-To:
Content-Type:
text/plain; charset=utf-8; format=flowed
From:
Frank Mittelbach <[log in to unmask]>
Parts/Attachments:
text/plain (45 lines)
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

%<@@=extramarks>
  \l_@@_skip
  \@@_add_mark:Nn

automagically becomes

  \l__extramarks_skip
  \__extramarks_add_mark:Nn


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
> team.

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.

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.

thanks
Frank

ATOM RSS1 RSS2