{comma-separated-list} is a data format consisting of fields, most commonly separated by commas

learn more… | top users | synonyms

4
votes
1answer
407 views

Comma in macro parameters

I have a macro accepting several optional arguments in a comma separated list. I would like to assign a value containing a comma to a particular argument. Is there a way to "escape" this particular ...
4
votes
2answers
401 views

Cutting a table to fit the available space on a page

I have a long list of data, in a CSV file, formatted like this: tiger, 300, 10.0, 7, 4.0 lion, 200, 15.0, 5, 3.0 bear, 100, 15.0, 3, 1.0 fish, 10, 10.0, 2, 0.1 The first rows are more important ...
3
votes
2answers
190 views

Separator between author names (with LaTeX kernel programming)

I try to make my own macro for a typesetting an authors block instead of using package authblk. How can I suppress separator near the fist author of the article. Main condition is to use only LaTeX ...
3
votes
1answer
138 views

Select largest value from a list of variables in LaTeX

I am trying to adapt this example How to iterate over a comma separated list? as my base. Except, rather than display all values, I actually want to iterate through all the values and only return / ...
3
votes
2answers
195 views

Deleting duplicates from a comma-separated list of strings

This is a followup to Difference in compilation time between two slightly different versions. As became obvious when asking that question, the speed of that compilation is seriously affected by the ...
3
votes
1answer
92 views

Beamer and a for each loop

I'm using the beamer presentation package and trying to combine the examples from this post How to iterate over a comma separated list? with the beamer package. In modifying the top example, chaning ...
3
votes
2answers
75 views

Reading arguments in a command?

I now know that if I want to get for example the 3rd argument passed to a command, I have use #3. My question is if this argument is an array how can I read elements of array without a for loop? For ...
3
votes
2answers
141 views

Generate comma separated list with some non-empty strings

I'm trying to generate a comma separated list that uses strings that may or may not be empty. For example \mylist{\stringA,\stringB,\stringC} would expand to A, C if B is empty or B, C if A is empty, ...
3
votes
1answer
81 views

Why aren't my keywords recognized when immediately followed by a comma?

I am using listings to display custom keywords in bold. In my listings, those keywords are sometimes followed by a comma. However, in the example below, any comma following a keyword will prevent the ...
3
votes
1answer
137 views

Check if a number is in a comma separated list (print or display selected sections from a specific list)

I'm trying to check if a section number belongs to a specified list: \ifnum\value{section}=\mylist % check if section number in mylist --- WRONG \dosomething \fi The conditional is ...
3
votes
1answer
85 views

List Version of \str_if_eq

I am using \str_if_eq:xxTF{\A}{\Target}{<true>}{<false} to execute the <true> or <false> code if \A=\Target. What is the list version equivalent of this? So I am looking for ...
3
votes
1answer
607 views

How to create a comma-separated list in LaTeX according to the number of elements in another list?

I have been looking for a way to create dynamically a comma-separated list consisting of n entries, all entries equal, defined by \newcommand\mytext{species:} (example) and n being the number of ...
3
votes
0answers
66 views

Insert or apply a decision structure to sequence or list

I would like to make the function calls \findLargest in the MWE below a little more dynamic and compact. As demonstrated in the example below, I can store glossaries values and include them in the ...
2
votes
1answer
83 views

What is the right number of #’s for nested sequence mappings?

Im trying to nest two sequence mappings, which works so far but I want to use them inside a command definition so the <items> should be accessible as ##1 and ###1 but this won’t work. Is it ...
2
votes
1answer
207 views

Compare two comma separated lists

Hi I would like to compare two comma separated lists. \documentclass[a4paper]{article} \usepackage{comment} \usepackage{ifthen} \usepackage{xargs} \usepackage{xkeyval} \usepackage{xfor} ...
2
votes
1answer
35 views

Rearranging \cite arguments

I have the following requirement for my thesis: If I cite multiple citations, I should cite my papers first. The names of all my papers start with “my:”. So I want to define a new command that ...
2
votes
0answers
47 views

Automatically return list of all uses of a command, without repeats e.g. \compound using chemstyle

I'd like to automatically generate a comma separated list of all occurrences in my .tex file of a particular command. Specifically, I want to ensure the correct numbering of chemical structures using ...
1
vote
3answers
133 views

Parse csv-list, function with >1 parameters as callback

In my texts I have to deal with lists, whose items need to be formatted seperatly, i.e.: \funktion[3][]{T}--\funktion{S}--\funktion[3][7]{D}--\funktion{T} In \funktion which leads to \emphsubsup the ...
1
vote
1answer
81 views

Programming language-like syntax for nested lists

Consider the following code that simply nests two lists using the \ForEach command: \documentclass{article} \usepackage{forarray} \newcommand{\demo}[1] { \begin{itemize} \ForEach{.}{\item ...
1
vote
0answers
40 views

Math lists: commas inside or outside of math mode? [duplicate]

I am wondering whether to use that (1) $A_{a}, B_{b}, C_{c}$ # comma in math mode or that (2) $A_{a}$, $B_{b}$, $C_{c}$ # multiple math modes, comma outside math mode Any good reasons for ...
0
votes
1answer
31 views

Highlighting items in a list

I'm trying to create a macro where the optional item emboldens an item in the list. I can process the list using the expl3/xparse package and can compare the two strings but I'm having trouble doing ...