6
votes
4answers
135 views

How to fill a dynamically generated table with dynamic content?

how do I generate a tabular dynamically while filling it with dynamic data? Example: Let's say I have \def\N{10} and I want to generate a table with \N columns, where the top cell of each column ...
7
votes
1answer
120 views

I'm confused about how expansion is happening here

I was really pleased that I could come up with a means of building the contents of a tabular environment using \foreach \x in {...} {...} structure. But I was curious about what exactly it would take ...
4
votes
2answers
104 views

Parsing rows (`\\`) and tab characters (`&`)

I have a use for parsing what would look like tabular input data, except that it isn't part of a tabular environment, but rather the argument to a macro. So I developed two macros, \readTABrow which ...
2
votes
0answers
85 views

Use input inside a spreadtab environment with calculations

My aim is to create a command for inserting tables, which will format the table, and add calculations on its values, given a file containing the raw data of the rows only. ...
5
votes
2answers
144 views

Color Management with a Family of Curves

I am struggling with following fairly simple looking problem of plotting a family of curves. \documentclass[border=1mm]{standalone} \usepackage{pgfplotstable} \pgfplotsset{compat=1.8} ...
3
votes
1answer
294 views

How to use commands in table specs, and still support array package?

For a package, I want to write code that creates tables, where the exact type of table is configurable (tabular, longtable, tabularx, ... [Update: David rightly remarked that formats like tabularx ...
8
votes
2answers
167 views

Execute non-expandable code inside a tabular environment

As there is no Expandable version of \InputIfFileExists or \IfFileExists, the question arises whether it is possible to execute non-expandable code in a tabular environment after all: File main.tex: ...
13
votes
3answers
1k views

Expandable version of \InputIfFileExists or \IfFileExists

From this question: Cannot use \toprule when doing \input inside tabular -- why? I know that everything inside the tabular environment should better be expandable. The MWE below suggests that ...
8
votes
2answers
2k views

Cannot use \toprule when doing \input inside tabular — why?

Using \input inside a tabular environment does not seem to work in all cases, but I don't see why. The MWE below gives the following error message: ! Misplaced \noalign. \toprule ->\noalign ...
8
votes
3answers
439 views

colortbl: new environments and how to apply \expandafter

This is a followup question from one asked by Andrew Howard. After some discussion, it became clear that colortbl has some issues with the names that can be used for a \newcolumntype. The result of ...
2
votes
2answers
253 views

Macro behaviour different inside tabular environment

I have a lot of problems lately with macros expanding (or not expanding) at unexpected times, so thought I was having a related problem here. But, in this case, things are working as I want outside of ...
12
votes
3answers
315 views

Expansion of first token in a tabular cell

Background I currently do some work on the collcell package which collects the content of a tabular/array cell and provides it to a user defined macro, e.g. using ...