Reputation
2,115
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
11 35
Newest
 Revival
Impact
~360k people reached

May
18
comment How can I apply actions to specific items or after specific items in a sequence in LaTeX3?
@Manuel +1 That is not good news. It seems the only way to do it with a sequence is to create a loop that generates variables to store each item, and then another loop that "pops" each item into those variables. Then one or more loops to handle actions for the other items. Quite a bit of work for such a simple task.
May
17
comment How can I apply actions to specific items or after specific items in a sequence in LaTeX3?
@egreg Could you maybe help me to understand why you think it is vague? I think you are likely the most qualified person to answer this question. I really like the flexibility of keys, and I think they could have many other useful applications. I am thinking that the solution might include a pgf foreach` loop or makedo loop. (of course that is based on my limited understanding of the LaTeX 3 syntax.
May
17
comment How can I apply actions to specific items or after specific items in a sequence in LaTeX3?
@egreg hmm. well I tried to be specific. I just wanted to know how it would be done. It seems like a reasonable thing to be able to do (access items and manipulate them based on counts).
May
17
comment How can I create a list as a variable that can be appended and eventually typeset?
I don't see how the #1 is transferred to l_macmadness_list_#1_seq in \cs_new_protected:Npn. Could you explain that?
May
14
comment How can I get a count of the optional arguments with xparse?
I meant, can I compile this document on a machine with an older version of LaTeX, just by installing the expl3 package. I think I already found my answer though, and the answer is yes.
May
12
comment XeLatex otf font won't load
@ajon I am not sure what your issue is. It should not be a problem. I assume you have the right user permissions to read these files. Hint: I noticed you changed your original example. Don't change your original code. It makes it very difficult to identify your problem. You can also add updates, but keep the original code somewhere please.
May
11
comment Change space between title and text in \paragraph command
It is always good to provide a minimal example ;) Do you mean you have a doc where \paragraph{Some text.} follows \maketitle{The Title}? Also, it is generally not a good idea to take typographical tips from someone who uses Microsoft Word haha.
May
11
comment How does LaTeX calculate the width of a caption? What is it based on?
@Mico Hey Mico, that is what I am asking YOU :). How does LaTeX calculate the width of captions?
May
8
comment How can I use the ampersand (&) as a delineator for tabs in LaTeX3 (expl3)/xparse syntax?
You say that often, I noticed. This is why I explicitly said what I want above. Your solution is quite restrictive (you cannot isolate items in the loop), which is why I left it unanswered for the time being. Perhaps in time it will be the best answer. I am already looking into other solutions (ways of spreading information automatically across a page horizontally where widths are calculated automatically based on the number of args other than tab stops so that I can use the int_step_inline iterator).
May
7
comment How can I use the ampersand (&) as a delineator for tabs in LaTeX3 (expl3)/xparse syntax?
Actually, I do not even want to simplify it that much. I just need to be able to access each item individually. Therefore, \clist_use isn't really an option, I think.
May
7
comment How can I use the ampersand (&) as a delineator for tabs in LaTeX3 (expl3)/xparse syntax?
Thanks for the answer. Unfortunately, I seem to loose flexibility at every turn due to the simplicity of MWEs. I need to be able to use \int_step_inline:nnnn{2}{1}{\clist_count:N \g_macmadness_mygroup_items_clist}. I am going to have item 1 be left-aligned and the rest be right-aligned in the tabular. (Also, I will be using longtable, but I think that is superfluous here)
May
7
comment How to iterate over a comma separated list?
@egreg Thanks. Did you write LaTeX3? Why are you so tremendously skilled at this? To deal with separate formatting on the last item (like removing a comma), I tried using: \str_if_eq:nnTF { ##1 } { \clist_count:N \arglist }{\clist_item:Nn \arglist {##1}}{\clist_item:Nn \arglist {##1},~}. Is that the right approach? (##1 is not expanded correctly in parameters: T and F) Another option is to just make the steps go to \clist_count-1 (whatever the correct syntax for that is).
May
7
comment How to iterate over a comma separated list?
@egreg How can I create a loop with specific start and end indexes e.g. for \itemStep from 2 to \clist_count; do \clist_item:Nn\arglist{}. It seems that the example you demonstrated are automated interations without much control over the individual steps/iterations.
May
7
comment How can I get a count of the optional arguments with xparse?
+1 Thanks for the tip. I will hop to it. Just to clarify, this code with the ExplSyntaxOn/Off is fully backwards compatible?
May
7
comment How can I get a count of the optional arguments with xparse?
Thank you for the excellent answer. Do you think you should show me how to iterate the parameters. e.g. My idea: user command variant and turn this: \noindent\clist_item:Nn\arglist{1},~\clist_item:Nn\arglist{2},~\clist_item:Nn\a‌​rglist{3},~\clist_item:Nn\arglist{4}\par into a loop. Each item can be put into a tabular using the trick you showed me \tabular{l{\arglist{\clist_count:N\arglist}}} (num of cols determined by clist_count). Each item (\clist_item:Nn\arglist{itemStep}) can be followed by & until column step=clist_count:N\arglist then a `\` is inserted. +1Automation
May
6
comment How can I get a count of the optional arguments with xparse?
@Manuel Ah I did not know that #9 would always be the mandatory argument. Thank you for that information.
May
6
comment How can I get a count of the optional arguments with xparse?
@DavidCarlisle Putting aside that this doesn't really answer the question of getting an argument count, I do appreciate that you're trying to help me create a more efficient way of doing this. The actual use is to create a specially formatted form. I need to isolate the arguments to insert them in specific places. Another criterion is to keep the code readable. Being able to put argument inputs on separate lines is key. The other option is to create horrible looking tables of this information (I am trying to provide a better option)
May
6
comment How can I get a count of the optional arguments with xparse?
@egreg Please consider my last comment. to Manuel. How do I know which number represents the last variable if the user can sometimes use 3 args (last=#3), sometimes 8 (last=#8)? Thats a pretty general judgement right there (about this syntax being clumsy), by the way.
May
6
comment How can I get a count of the optional arguments with xparse?
@Manuel Ok oops, the answer to your question about just declaring the last arg m is that I still do not know whether m=#1,#2,#3,#4,#5,#6,#7,#8, or #9.
May
6
comment How can I get a count of the optional arguments with xparse?
@Manuel I knew about the \IfValueTF but I was hoping for a "cleaner" solution (less code). I think just making the ninth argument mandatory is a good idea and should work for my purposes! I did not know about the maximum number of arguments.