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 have downloaded a template for writing thesis from MIT website, which can be found here. In the file main.tex, I have to modify the following code:

\typein [\files]{Enter file names to process, (chap1,chap2 ...), or `all' to process all files:}
\def\all{all}
\ifx\files\all \typeout{Including all files.} \else \typeout{Including only \files.} \includeonly{\files} \fi

Could someone please let me know how I should modify the above code? I have tried for example:

\typein [\files]{'all'}

but still I get errors such as Emergency Stop.

share|improve this question

1 Answer 1

\typein asks for input on run. While running the unmodified file, you'd get the following question:

Enter file names to process, (chap1,chap2 ...), or `all' to process all files:

\files=

At this point you'd have to enter all to include all files.

If you always want to include all files, replace this:

\typein [\files]{Enter file names to process, (chap1,chap2 ...), or `all' to process all files:}

with this:

\def\files{all}

This way you can always change the included files by changing the definition. It for some reason you'll never do that you can remove (or comment out) this part entirely:

\typein [\files]{Enter file names to process, (chap1,chap2 ...), or `all' to process all files:}
\def\all{all}
\ifx\files\all \typeout{Including all files.} \else \typeout{Including only \files.} \includeonly{\files} \fi
share|improve this answer
    
Thanks @Silex. What should I do with the line having \typeout? –  A2009 Feb 6 '13 at 22:30
    
@Ahmad: \typeout simply displays a message while running the file. As for the \ifx line: this either includes all files or just one file depending on the value of \files. If you want to be able to change the included files you should leave it there. –  Silex Feb 7 '13 at 13:23
    
+1 for \def\files{all} –  NKN Oct 27 at 14:49

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.