Linked Questions

1 vote
1 answer

Generate table using the foreach command from pgffor [duplicate]

I want to generate a table from a list. However for some reason it fails to work. I searched: PGFplots foreach equivalent to TikZ's with multiple variables separated by a slash Copy table row n ...
WG-'s user avatar
  • 2,840
15 votes
3 answers

Copy table row n times

I would like to copy the row of a table, let say, n times, but unfortunately my sample below does not compile. It is my understanding that the \foreach command should copy what is in its argument but ...
azetina's user avatar
  • 28.3k
18 votes
2 answers

How to programmatically make tabular rows using `\whiledo` ?

The following code snippet does not work: \documentclass{minimal} \usepackage{longtable} \usepackage{ifthen} \newcounter{xyz} \setcounter{xyz}{0} \begin{document} \begin{longtable}{|*2{c|}} \hline \...
Second Person Shooter's user avatar
6 votes
2 answers

How to create a table automatically for a homework in statistics?

I want to create a long table containing some statistical data, such as the sample, the average, and the variance, etc. I am using the pgf package and its various extensions to do this. Here is a ...
Matsmath's user avatar
  • 936
9 votes
1 answer

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
7 votes
1 answer

Build tabular content via \foreach

I am trying to build up tabular data using the solution at How do I use the ampersand (&) inside a foreach or conditional (or other group/environment) when building tables?, but not having any ...
Peter Grill's user avatar
8 votes
2 answers

"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
2 votes
2 answers

Insert loop inside table?

1- I want to make a table with n number of rows ? my wrong code \newcommand{\xx}{ \begin{tabular}{|c|c|c|} \hline \newcount\fooo \fooo=10 \loop 11 & 12 & 13\\ \hline \advance \fooo -1 \...
user286653's user avatar
5 votes
3 answers

Use array-meaningful ampersand to change column in foreach loop

I wish to loop over this code: \begin{tabular}{l*{8}c} first column & column a & column b & column c & column d & column e & column f & ...
iago-lito's user avatar
  • 1,452
4 votes
1 answer

How can I use \foreach in math environments?

I'm looking for a way to generate in a loop the rows of an align environment, or IEEEeqnarray or some such thing. I can see that \foreach works in math mode (inside \[ \] e.g.), but something like ...
oarfish's user avatar
  • 1,419
2 votes
2 answers

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,029
9 votes
1 answer

Extra space in cells when using token lists to build tabular content

What part of my code is causing the misalignment of the first column? The extra space seems to increase with the number of rows. (Part of my code is from How do I use the ampersand (&) inside a ...
rogue.whistler's user avatar
4 votes
2 answers

How to create a table with fixed-width cells and use cellcolor and multicolumn to create time bars? Or: How to substitute ganttbar with tabular?

Failing to combine a gantt chart with a table I now try to avoid the gantt chart by just using a tabular environment. However I like to keep some neat features of the pgfgantt-package and I'm facing ...
Robert Seifert's user avatar
4 votes
1 answer

Workaround for tabularx inside environment when using csquotes

I need an environment that presents data in a table. The number of right-most columns shall be adjusted at compile-time, and the first column is dynamic width. For this reason I am using \usepackage{...
Kyordhel's user avatar
  • 107
3 votes
2 answers

Inverted token list in a table

I read a lot of questions and answers about this matter, each doing a little of what I was looking for, but when I tried to merge them together, the whole world collapsed... My goal is to build a ...
Miraino Hikari's user avatar

15 30 50 per page