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

I want to pass some argument to an external script. I try :

    \immediate\write18{./script \a\ \b\ \c > output.tex}

It works, but \a \b and \c are not given as three different arguments, but as one concatened string to the first argument.

How to pass three or more arguments ?

share|improve this question
up vote 7 down vote accepted

"" is a command for the typesetting engine of TeX, here you just need a space token that is provided by macro \space:

\immediate\write18{./script \a\space\b\space\c >output.tex}

Macro \space is defined in the LaTeX kernel as:

\def\space{ }
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.