Linked Questions
1
vote
1
answer
3k
views
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 ...
15
votes
3
answers
3k
views
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 ...
18
votes
2
answers
3k
views
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
\...
6
votes
2
answers
690
views
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 ...
9
votes
1
answer
955
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 ...
7
votes
1
answer
2k
views
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 ...
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 ...
2
votes
2
answers
2k
views
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
\...
5
votes
3
answers
361
views
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 &
...
4
votes
1
answer
2k
views
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 ...
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
\...
9
votes
1
answer
125
views
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 ...
4
votes
2
answers
423
views
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 ...
4
votes
1
answer
120
views
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{...
3
votes
2
answers
116
views
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 ...