Linked Questions

4
votes
5answers
2k views

How to define a command that takes more than 18 arguments [duplicate]

This question is based on this answer. It is a continuation of my previous qestion regarding list of values in latex. According to first link there is a limitation on the number of arguments I have ...
0
votes
1answer
77 views

10 parameters separated by comma. How can I do it? [duplicate]

\def\g(#1,#2,#3,#4,#5,#6,#7,#8,#9,#10){(#6)*exp(-(#2)/(#7))+((#6)**2)*exp(2*(-(#2))/(#7))*(#9)*exp((#4)/(#7)}% \def\f(#1,#2,#3,#4,#5,#6,#7,#8,#9,#10){1+2*(#6)*exp(-(#2)/(#7))+((#6)**2)*exp(2*(-(#2))/(...
1
vote
0answers
56 views

How to handle more than 9 parameters in Kiviat Diagrams? [duplicate]

This email is regarding Solution 2 mentioned in this post to draw Kiviat Diagrams. This Solution is working perfectly upto 9 axis. But when we make number of axis as 10, it's giving error as : "You ...
1
vote
0answers
19 views

Writing macros with a large number of arguments [duplicate]

How can I write a macro with more than 10 arguments?
41
votes
8answers
16k views

Is it possible to connect a database to LaTeX to produce data-driven documents?

I'm starting to write a LaTeX-based reference manual, and have realised that a lot of my needs could be solved by writing a database and then producing the reference manual from that. Lots of my pages ...
14
votes
5answers
353 views

A macro that conditionally disregards the need for one of its arguments

Let's suppose I want to write nested equations that contain a fair few nested parenthetical/delimiter characters, like (), [], {}, ||, and perhaps others. Suppose too that I think these things look ...
7
votes
7answers
2k views

newcommand with comma separated argument, and optional arguments

I want to define a command (not with \def) the simplest possible way that it takes arguments separated by a comma, supports an optional argument (the first one). maybe another solution with extra ...
8
votes
4answers
957 views

How to access i'th argument of a macro?

How can I access the i'th argument of a \newcommand declaration via an iteration variable? Assume I want a command \foo like: \newcommand{\barr}[1]{argument 1 is: #1} \newcommand{\foo}[6]{ \...
9
votes
2answers
824 views

Macro with more than 9 arguments

Consider the following example: \documentclass{article} \usepackage[ a4paper, hmargin = 2.4cm, vmargin = 3cm ]{geometry} % https://ctan.org/pkg/geometry \usepackage{xskak} % https://...
5
votes
3answers
439 views

Generate a table with 19 arguments using key-value interface

I'm doing my bachelor thesis, and need to make a table with lots of data. I want to make a macro for that table, since I'm going to use it a few times. Considering egreg's answer in this question, ...
6
votes
2answers
985 views

Why do I get “! You can't use a prefix with `the character 0'.” when using \ifnum?

Using a pgffor loop, I run through a comma-delimited list to separate the CMYK values. I think the problem is in my \ifnum comparison. I am getting an error. Obviously I simplified the code to keep ...
9
votes
2answers
180 views

Error when using defs inside a macro to write a row in a table

For the following MWE \documentclass{article} \newcommand{\cmd}[5]{% \def\tA{#1}% \def\tB{#2}% \def\tC{#3}% \def\tD{#4}% \def\tE{#5}% \tA & \tB & \tC & \tD & \tE \\ } \...
7
votes
2answers
860 views

How to use variables inside a command when generating a table?

I'm not sure about the question, since I do not really understand why it fails. I tend to use commands to generate my tables, and when I use the #1 style of accessing the arguments it works. But now ...
5
votes
3answers
291 views

How to generate a matrix from an arbitrary sequence of arguments?

This answer shows me how I can handle an arbitrary number of arguments. I have adapted it a bit to my purpose: \usepackage{pgffor} \newcommand*{\twolinematrix}[1]{% \foreach \firstrowelement/\...
3
votes
3answers
182 views

Unbounded number of arguments - Good practice

Here is how I do to work with unbounded number of arguments of a macro. Is there a better way to do that ? \documentclass[12pt,a4paper]{article} \usepackage{ifmtarg} \usepackage{nicematrix} \...

15 30 50 per page