In TeXstudio editor one can easily choose which labels to reference as soon as you type the cross-referencing-macro you intended to use, for instance, \cref{} of the cleveref package (see image below).

enter image description here
One problem, though, when you use ctable package to create a table, a user-friendly package indeed, you soon discover that you should label the table the way that ctable understands:


Here comes the problem, since labels of tables were marked the way ctable understands, TeXstudio can no more recognize them as normal labels, and you won't find these labels in the drop down menu among other labels made by whatever else method.

This can be of course tolerated when you have a couple of labels, but when you have a lot of them, it turns out to be a tedious task to recall or call out the labels exactly as they are.

I would be grateful if someone would provide a workaround solution for this issue, without sacrificing the use of either ctable package or TeXstudio IDE.

TeXstudio version 2.6.4
ctable version June 14, 2013

  • This would be something something for a Feature Request, this cannot be solved with TeX. Maybe by defining a new \ctablewithlabel{<label>}[<other options>]{<arg 1>}{<arg 2>}{<arg 3>} macro (that is added to a custom .cwl file with the l classifier. Maybe there is a way with TeXstudio’s (JavaScript) macros. Well, and you can always add something like \iffalse\label{tab:somelabel}\fi so that TeXstudio picks up the label but not TeX. (A comment won’t suffice.) Commented Dec 12, 2013 at 5:42
  • Feature request added: #614 TeXstudio won't show labels if created by ctable package
    – doctorate
    Commented Dec 12, 2013 at 10:53
  • @Qrrbrbirlbel, can you pls provide line of code in an answer for the first option of newcommand and how to edit the cutom .cwl file? that would be very kind of you.
    – doctorate
    Commented Dec 16, 2013 at 19:53

1 Answer 1


Keyword arguments are not interpreted by the parser of TXS.

Qrrbrbirlbel has already indicated possible workarounds

  1. (recommended) Define a new command \ctablewithlabel{<label>}[<other options>]{<arg 1>}{<arg 2>}{<arg 3>} and declare it in a cwl file as label

  2. Trick the parser with an additional \iffalse\label{tab:somelabel}\fi

User macros (JavaScript) cannot be hooked into to parser.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .