TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using the commands of the discussion How to check if a column type is defined? and How to implement a command that checks for loaded packages?

I have build an enviroment to check if more than one column is defined




  \ifboolexpr{ bool{tpl@coltype@#1} }{#2}{#3}%

    % define \@tempa with trimmed index element.
    \edef\@tempa{\zap@space##1 \@empty}%
    % check if package of current index is loaded
  % Process csv list with command \do (etoolbox)
  % ??



\IfColumntypeDefined{L}{L is defined}{L is not defined}
\IfColumntypeDefined{C}{C is defined}{C is not defined}

{L and C columns are defined}
{L and C columns are not defined}


It however returns always false which I do not understand and do not know how to debug. So the output is

L is defined C is defined

L and C columns are not defined

share|improve this question
up vote 1 down vote accepted

I don't see any point in defining \IfColumntypesDefined with a list of column types; however the problem is in the


line. With


you get the correct result. The reason is that \string#1 is used in \CheckIfColumntypeDefined (which is a good thing, because it protects against wrong input).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.