Linked Questions

19 votes
4 answers
2k 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 \...
Hafid Boukhoulda's user avatar
17 votes
3 answers
3k views

How do I use the ampersand (&) inside a foreach or conditional (or other group/environment) when building tables?

I am trying to build a table, and inside the tabularx environment I would like to have a loop, something like (here is a MWE): \documentclass[10pt,a4paper]{article} \usepackage{tabularx} \usepackage{...
Shafique Jamal's user avatar
9 votes
1 answer
954 views

Tabular with conditional rows based on content

I would like to define appropriate column types which suppress an entire row of a table if all of the columns (besides the title column, ie the first column) are empty. That is, with the tabular ...
Peter Grill's user avatar
8 votes
2 answers
328 views

"Extra \else" and inserted "\inaccessible" when using textbf with pgffor

I'm getting errors whenever I try to make \textbf interact with pgffor and xparse. Here's an MWE that gives ERROR: Extra \else and ERROR: Missing control sequence inserted at the end of the \coljoin ...
mdrop's user avatar
  • 95
8 votes
2 answers
382 views

Exercise & Solution Page

In an earlier post of mine, I asked how to create separate exercise and solution pages for basic arithmetic. I'm trying the same thing now for factoring simple trinomials, but it's not working and I'm ...
WeCanLearnAnything's user avatar
5 votes
1 answer
867 views

Generate rows in table using \multido (or something similar)

Consider the following example: \documentclass{article} \usepackage{booktabs} \usepackage[locale = DE]{siunitx} %\usepackage{multido} \ExplSyntaxOn \cs_new_eq:NN \calc \fp_eval:n \ExplSyntaxOff \...
Svend Tveskæg's user avatar
8 votes
1 answer
595 views

Generate automatic revision's numbering tabular

Situation I have to make a cover template for a document. At the end of the page, I have to add the revision number with other useful info like this example: \begin{tabular}{lccl} Revision 0 &...
Gabriel L.'s user avatar
2 votes
2 answers
220 views

tabularray: How to comment out some rows using \if condition inside a table stored in a macro?

The following gets me this error ! Incomplete \iffalse; all text was ignored after line 26. So, how to make \if work inside the table stored in the macro \MyTable? \newif\ifShowRow \ShowRowfalse \...
Diaa's user avatar
  • 9,019
6 votes
2 answers
104 views

Table from multiple delimiter list

Question I am trying to get a table based on a multiple delimiter string. My current idea is to use \setsepchar{} and \readlist. I put my requirements and details into a table because I would have a ...
cdickstein's user avatar
3 votes
1 answer
494 views

Create Tabular from comma separated parameter list

I tried to find an answer to this but currently I have no idea how to get it to work. I want to create a new command which fills some lines of a tabular based on a given list with variable length ...
baghira's user avatar
  • 469
3 votes
2 answers
71 views

Can I partially re-use a table or build it up over chapters?

In my thesis I have a table that I want to build up over the course of a chapter. Specifically, I am presenting statistics about different datasets, including one that I created myself to address ...
dmh's user avatar
  • 133
2 votes
1 answer
102 views

Create table with for loop (\Numpoint loops) and formula

Im trying to get a table added to my exam tex file that shows the grade earned based on all possible amounts of scorable points. I am running intwo two issues: The amount of \numpoints of the {exam} ...
Zr.Ms. Bruinvis's user avatar
0 votes
1 answer
21 views

Using \pgfplotsinvokeforeach to create rows in a matrix of nodes

I'm working on a complicated set of figures using the pgfplots package. As part of the figures, I'd like to be able to create a matrix of nodes in which rows are added using a call to \...
Steven Gardiner's user avatar