I'm using latex to do syntactical analysis, using the following specifications:

 For super-script \tss{super-script}
\newcommand\tabspace{1cm}           % Adjust tab length here

\newenvironment{syntax}[1][\mytabs] % The syntax environment, used for syntactical analyses
\newcommand{\tab}[2][\>]{#1 #2}     % Tab command, used in syntactical analyses

Currently, I can make five times \tab. My question is how I can change the number of possible \tab(s), so at to make it larger.

  • 2
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Jul 11, 2014 at 13:08
  • well you have 5 tabs set in \mytabs which can obviously be extended, but tabbing is a pretty useless latex environment so often it's best not to base the markup on tabbing. It is hard to offer any advice given the lack of information in the question. Please always make a complete (small) document that shows what you are trying to do. Jul 11, 2014 at 13:36
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Jul 11, 2014 at 13:43

1 Answer 1


You could simply add other twenty \=\hspace{\tabspace} commands in the definition of \mytabs, so as to have sufficient room for your tabbing environments.

Here's a different approach. The syntax environment has an optional argument (default 5) for the number of columns; the syntax* environment wants instead an explicit line to be \killed, for setting unequal tab spaces.


  \prg_replicate:nn { #1 } { \=\hspace{\tabspace} }\kill

\newcommand\tabspace{1cm}           % Adjust tab length here






enter image description here

You must log in to answer this question.

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