4
votes
1answer
48 views

Auto colour numbers in range

If I had some numbers in a tabular column, is there a way to automatically change the font colour of them if they are outside a range; eg red if under 10 and green if over 50? \documentclass{article} ...
6
votes
1answer
91 views

Using conditionals in tabular preamble with array

I'm trying to use a conditional in the column setup for my tabular. That is, the definition of one column (actually several columns) is dependent on a boolean value (as set up from the etoolbox ...
8
votes
2answers
56 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 ...
1
vote
1answer
54 views

Remove empty row inserted by etoolbox

I generate table with some conditional expression using toolbox package. \documentclass{article} \usepackage{etoolbox} \begin{document} \providetoggle{ch} \begin{tabular}{ |l|c|} \hline ...
3
votes
0answers
173 views

Conditional formatting, rounding and postprocessing of a column in pgfplotstable

I want to round p-values in a table to two decimals (for example 0.05), have values less than 0.05 in bold font and have values less than 0.01 to come out as '<0.01' in bold font. Like this (the ...
5
votes
1answer
79 views

Conditional expression to convert figure to table. Is it possible?

I have a though one for you: I'm writing in MultiMarkdown and all my figures, tables, charts are usually pictures. This allows me to write something like this: The MultiMarkdown input ![This is the ...
1
vote
1answer
223 views

Tabu/Longtabu: Conditional Column Definition

I want to create a longtabu table with a conditional number of columns: In development mode, 5 columns should be visiable. In the final version, only the first and the last column should be visible. ...
7
votes
3answers
179 views

Defining tabular rows with macros using `\ifnum` leads to `Incomplete \ifnum`

I am trying to define tabular rows using a macro which shall perform an conditional definition of the tabular row according to a given parameter. Please consider the following MWE: ...
5
votes
1answer
63 views

How to “count” some table cells and print the result?

Thanks to an answer from David Carlisle found on this site I managed to code this: \documentclass[a4paper,10pt]{article} \usepackage{colortbl} \usepackage{xcolor} ...
4
votes
3answers
576 views

Misplaced \omit and \multicolumn in \IfEqCase

I have the following code with a command that creates rows for a tabular: \documentclass[letterpaper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{xstring} \newcommand*{\condrow}[2]{ ...
3
votes
2answers
108 views

Test for empty possibly itemized argument in tabu

For some reason, I can't test if #2 is empty in the following tabu use case. An Incomplete \ifx; all text was ignored after line 14 is thrown executing the following code. ...
1
vote
1answer
177 views

Conditional inputfile , latex

I am using a conditionalinput file inside my main file %% Out2 doesn't exits %% Out exists I don't want to get caption and table number at position where I don't have file. ...
4
votes
1answer
210 views

How to make tabularx columns using \whiledo?

My question is similar to that discussed in How to programmatically make tabular rows using `\whiledo` ?. The difference is that I want to produce columns rather than rows with using \whiledo. ...
4
votes
1answer
259 views

Counters for use in array/tabular cells

The following practical example \documentclass{article} \usepackage{array}% http://ctan.org/pkg/array \newcounter{tabcol}\newcounter{tabrow} \newcolumntype{C}{>{\stepcounter{tabcol}}c} ...
5
votes
1answer
165 views

Problem with a conditional in a tabular

I want to use conditionals to fill a tabular, but it fails. My MWE: \documentclass{article} \usepackage{environ} \newcounter{mycounter} \NewEnviron{montab}{% \setcounter{mycounter}{0} ...
26
votes
3answers
2k views

Parametrize shading in table through TikZ

I wanted to do some shading in a table according to its values. For example, if you see the table below: a b c d a 90 10 0 0 b 0 80 10 10 c 0 0 95 5 d 0 10 5 85 I want to ...
6
votes
2answers
642 views

problem with \ifthenelse + multicolumn

I encounter various problems when i want to control the display of a table with a ifthenelse test. For example, consider the following M(non)WE : \documentclass{article} \usepackage{multirow} ...
8
votes
2answers
365 views

How to check if a column type is defined?

Column types for tables can be defined and overwritten with \newcolumntype. I would like to know if a column type is already defined for an example which shall only be executed in the case where the ...
4
votes
1answer
441 views

Booleans fail in tabular environment

I've got a workaround for this problem, but maybe someone knows a cleaner way to fix it. I'm using the standard packages in TexLive 2009. Here's the code that doesn't work: \documentclass{article} ...
6
votes
3answers
590 views

etoolbox conditional causes unwanted empty row in tabular

This code leaves an empty row at the bottom: \documentclass{article} \usepackage{etoolbox} \def\somedef{foo} \begin{document} \begin{tabular}{|l|} \hline First row, not important \\ \hline ...
6
votes
1answer
567 views

How to display some text based on a condition inside a tabular environment?

I defined a variable \@afwezig that holds people that were not present at a certain meeting. \long\def\@afwezig{} \def\afwezig#1{\def\@afwezig{#1}} Now I want to make the header of the meeting ...