[OS X TeX] Latex programming
Alain Matthes
alain.matthes at mac.com
Sun May 22 13:42:01 EDT 2005
Le 22 mai 05 à 18:58, Bruno Voisin a écrit :
> Le 22 mai 05 à 18:10, Alain Matthes a écrit :
>
>
>> In a folder (FA) i have some files f1; f2; f4; and f5
>>
>> I would like to compile all the files of the folder
>>
>> The next code works with success :
>>
>> with the packages ifthen and calc and with a modification of my
>> texmf.cnf file
>>
>> \newcounter{max}
>> \setcounter{max}{6}
>> \newcounter{nb}
>> \setcounter{nb}{1}
>> \whiledo{\value{nb}<\value{max}}{%
>> \InputIfFileExists{FA/f\thenb}{}{}
>> \setcounter{nb}{\value{nb}+1}}
>>
>> I need \InputIfFileExists because there is no f3 in the list of
>> files.
>>
>> Now i would like to compile only the files f1 and f5.
>> \newcommand{\set}{1,5}
>>
>
> Are you willing to put together the result of the compilation of
> all f* files in a single PDF file, or are you simply willing to
> compile separately all f* files in a given directory?
>
> - In the second case, you could try, in Terminal, after using "cd"
> to move to the required directory, something like
>
> apply pdflatex f*.tex
>
> This may require passing on options to pdflatex, to get the desired
> page setup for the output.
>
> - In the first case, you could use LaTeX's \include facility.
> Namely, create a master file of the form
>
> \documentclass{report}
>
> \includeonly{f1,f2,f4,f5}
> %\includeonly{f1,f5}
>
> \begin{document}
>
> \include{f1}
> \include{f2}
> \include{f4}
> \include{f5}
>
> \end{document}
>
> In case you want to compile only f1 and f5, comment out the first
> \includeonly and uncomment the second. The drawback of this method
> is that, of course, it's not automated and you have to enter the
> file names manually. And that each new input file will start a new
> page (or even possibly a new right-hand page and add a blank left-
> hand page if necessary).
>
Thanks for the answer .
It's the second case but it's not automated !! [ if i have 20 or 30
files in a folder :( ( exercices of math...)] and each new input
file will start a new page (I do not want that). If i want a document
with all the exercices, my method with \InputIfFileExists is fine ( i
can insert a macro for numerotation and presentation etc....
\InputIfFileExists{file}{macro}{}
i need a method with a list like \newcommand{\set}{1,5} etc... in the
case of a choice of some exercices (for example 10 over 30) and
because i can make a macro and i put the macro in a class. I
In fact, I seek a Package to program some lists of elements. There is
some examples in TeX In Pratice v III (Stephane Von Bechtolsheim)
but in TEX not LATEX.
And i would like to understand why the example of the Guide to Latex
(fourth Edition Kopka-Daly ) page 439
\newcommand{\set}{start,middle,end}
\@for \xx:=\set \do {This is the \xx.}
do not work
Thanks Alain Matthes--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
More information about the MacOSX-TeX
mailing list