[OS X TeX] Unwanted blank page

Alain Schremmer Schremmer.Alain at gmail.com
Tue Jan 3 11:54:39 EST 2006


Johan Almqvist wrote:

>>>   \include is _only_ meant for  chapters, where you probably  _want_ 
>>> to start on a new page.
>>
>>
>> But the little bit that I now know about LaTeX says there has to be  
>> a way to get a non-standard \include that will not start on a new  
>> page but I don't know how to do it. This, though, is precisely what  
>> I need here.
>
>
> \input{file}
>
> -Johan

Well, yes, it works but, as mentioned before, I would also need, 
occasionally,

    \renewcommand{\input}[1][]{\url}

and, being that \input{file} is a TeX command and cannot be renewed, I 
cannot use it.

On the other hand, someone suggested I redefine \include by just 
commenting out \clearpage on the third line (see below) and everything 
seems to work: Chapters continue to start on odd pages but included 
files start right away. Go figure.

The author of the idea, though, wishes to remain anonymous because 
"[s/he is sure that it violates all  sorts of good latex practice and 
[s/he] can live without the resulting  grief."

Regards
--Schremmer

\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

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 MacOSX-TeX mailing list