LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Kelly Smith <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Fri, 3 Jan 2020 22:56:56 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (22 lines)
A happy New Year to everyone!

After a long hiatus, I’m finally able to resume working with LaTeX. Of course, this means that I’ll be popping up, with questions, at regular intervals: my apologies, in advance.

If this question would be better-posed on tex.SX, please let me know, and I’ll move it there.

I am considering the following (generic) problem… I have a function that is meant to do something with a list of words/numbers/&c. Naturally, I would use a sequence, to represent the list, at the code level. I decide that, at the author level, a semicolon-separated list will be the syntax to use for the list.

Now, I have two commands:

— The author-facing command `\makelist{foo; bar; baz}`
— The internal command `\ks__make_list:<?>`

As you can see, from the function signature, I’m not sure what the internal command should expect. There is no way to, say, generate a sequence literal, and pass it as an `n` type argument. I could pass the semicolon-separated list, untouched, and have the internal function split it into a sequence. However, that would break the syntax-code separation.

Would it be better to have a local variable, `\l__ks_make_list_a_seq`, and set it before calling `\ks__make_list:`?

If that is the case, should I follow a the same approach for other, similar situations?

Warmly,
Kelly

ATOM RSS1 RSS2