Linked Questions

7
votes
2answers
142 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 ...
16
votes
4answers
700 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
314 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 ...
3
votes
3answers
163 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
2answers
73 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
52 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{...
0
votes
1answer
98 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} ...
2
votes
2answers
68 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] \...
2
votes
0answers
125 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]{...
1
vote
1answer
92 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 ...
1
vote
0answers
27 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 ...