Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.