[OS X TeX] Unwanted blank page

Alain Schremmer Schremmer.Alain at gmail.com
Mon Apr 24 22:31:27 CEST 2006


I am back with this issue even though the "include/don't include 
exercises" was solved to my entire satisfaction.

Here is the new issue—and I didn't see how to apply the previous to the 
latter.

I have a lot of very small, preamble-less files, 1, 2, 3 etc, in each of 
which are the variants of a given question of an exam.

Once all done, they are used by a file with preamble using the package 
probsoln—very nice—but, to keep things straight as I write these files, 
I use a file with a preamble and

Question 1: About Blah 1
\include{1}
Question 2: About Blah 2
\include{2}
Question 3: About Blah 3
\include{3}

etc

This works well except that each "Question n: About Blah n" sits all by 
itself on the page with the corresponding file "n" on the next page 
whereas I would like it to be just after "Question 1: About Blah n".

Someone once sent me off list a modified \include that did not insist 
that the included file be on a new page (the third line I assume):

    \makeatletter
    \def\@include#1 {%
    %\clearpage
    \if at filesw
    \immediate\write\@mainaux{\string\@input{#1.aux}}%
    \fi
    \@tempswatrue
    \if at partsw
    \@tempswafalse
    \edef\reserved at b{#1}%
    \@for\reserved at a:=\@partlist\do
    {\ifx\reserved at a\reserved at b\@tempswatrue\fi}%
    \fi
    \if at tempswa
    \let\@auxout\@partaux
    \if at filesw
    \immediate\openout\@partaux #1.aux
    \immediate\write\@partaux{\relax}%
    \fi
    \@input@{#1.tex}%
    \clearpage
    \@writeckpt{#1}%
    \if at filesw
    \immediate\closeout\@partaux
    \fi
    \else
    \deadcycles\z@
    \@nameuse{cp@#1}%
    \fi
    \let\@auxout\@mainaux}
    \makeatother

but someone else strongly advised against it when I mentioned it on list 
but, as I recall, didn't say why.

What would be the danger if the modified include was under another name, 
say, \xxxinclude?

Other than when keeping track of the questions and their variants, I 
would not use anywhere else.

Regards
--schremmer
------------------------- 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 Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list