Linked Questions

7
votes
2answers
300 views

foreach-loop in align [duplicate]

I want to write a macro for optimisation problems and my current approach is to write a macro, that takes the target function and a list of constraints. The entries are separated by comma, and each ...
18
votes
4answers
1k views

Using loops to create tables

The goal is to create the following table without having to typeset all the rows one after another but using some kind of loops like the \foreach command provided by the pgffor package MWE \...
9
votes
3answers
413 views

Appending active and expansion sensitive characters to a macro

This question comes up pretty often when people want to build tables with empty columns or similarly building up some active characters inside a macro hoping to expand them at the right time right ...
8
votes
2answers
165 views

etoolbox do with macro as parameter

I'm trying to make an automatized meeting log generator using pdflatex. I want to create a table with the n rows, and fill them up with comma separated typein inputs. I've got the myTable macro from ...
3
votes
3answers
204 views

How to automatic increasing row-col in table?

My MWE \documentclass[a4paper,twoside,openright,12pt]{book} \usepackage[left=1.5cm,right=1cm,top=2.5cm,bottom=2.5cm,marginparwidth=0cm,marginparsep=0cm,outer=1cm]{geometry} \usepackage[T1]{fontenc} ...
1
vote
1answer
406 views

LaTeX error: illegal parameter number in definition of \pgffor@b

I am trying to use a loop. The following does not work: \foreach \a in {no,has}{ \begin{table}[H] \footnotesize \captionsetup{width=.9\linewidth} \caption{text} \vspace{-22pt} ...
1
vote
2answers
143 views

Macro that takes a variable number of arguments, and creates a table with one row per argument

I am trying to create a macro that takes a variable number of arguments and creates a table where each argument becomes one row; so assuming the command is called dynamictable, calling it like this \...
3
votes
3answers
92 views

An extra row in the table generated by \whileboolexpr command

I used \whileboolexpr command from etoolbox package to generate a table. But there was an extra unwanted row. What is the problem with the following code? \documentclass[12pt]{article} \usepackage{...
2
votes
2answers
150 views

Auto generate a table with different number of columns

I'm trying to create a command to generate this type of tables: where the number of columns changes (for example \preguntas{4} or \preguntas{5}). My first idea was \newcommand{\preguntas}[1] \...
1
vote
1answer
187 views

Customizing a point label style

There are some points labels that overlap on one another if the points were near an axis or close to one another, because the table is relatively long to be written horizontally. How can I writ a ...
2
votes
0answers
208 views

Adding a variable with backslash as argument

i would like to make a command to create tables. In a minimal idea the function "autotabell" should be like: \documentclass{article} \usepackage{tikz} \usepackage{csvsimple} \usepackage[latin1]{...
3
votes
1answer
65 views

Using foreach to make an alphabet chart?

I'm trying to make an alphabet chart similar to this one here: I've got a set of images prenamed with pic1.png, pic2.png. I've been able to get a forloop working to get a set of the images to appear ...
1
vote
0answers
30 views

How do you define a row macro inside a table? [closed]

I am trying to make a macro for the rows in my table, just to make it look a bit more elegant. However, the document fails to compile when I use more than one row. Here's the code I'm trying to ...