[OS X TeX] Unwanted blank page

Alain Schremmer Schremmer.Alain at gmail.com
Thu Jan 5 01:24:38 CET 2006


Josep M. Font wrote:

> El 04/01/2006, a las 23:51, Alain Schremmer escribió:
>
>> Here it is and it works:
>>
>>    \newboolean{FinalVersionWithExercises} % defaults to false
>>    % \setboolean{FinalVersionWithExercises}{true} %% uncomment 
>> this    line to actually include the exercises
>>
>>    \newcommand{\includeExercises}[1]{%
>>    \ifthenelse{\boolean{FinalVersionWithExercises}}% if true, do 
>> the    first thing, otherwise the second.
>>    {%
>>        \input{#1}% true part
>>    }{%
>>        {\url{#1}}% else part
>>    }%
>>    }
>
>
> Some years ago I used a different trick which does not force one to 
> modify the source file  every time one wants to include or exclude the 
> exercises. It uses some TeX mechanisms (which of course work with 
> LaTeX), which ask interactively what option you want. Adapting my own 
> code to your situation, I think the following should work:
>
> \typein[\withexercises]{Enter 1 to INCLUDE the Exercises, enter 0 to 
> EXCLUDE them, and press INTRO}  % This asks interactively through the 
> console; do what it says.
>
> \newif\ifexercises     % similar to boolean of ifthen package, 
> defaults to false
> \if\withexercises1\exercisestrue\fi   % if you entered 1, then make it 
> true
>
> \newcommand{\includeExercises}[1]{%
>    \ifexercises%     if true, do the first thing, otherwise the second
>    \input{#1}%       true part
>    \else%
>    \url{#1}%         else part
>    \fi%
>    }
>
> This code should replace the one you quote above. Moreover you do not 
> need the ifthen package (I presume it is actually a more user-friendly 
> interface to what I am using). When you typeset the source file, TeX 
> will stop, show the message ("Enter 1 ...") in the console, and a line 
> saying "\withexercies=?". Then you type 1 or 0 in the writing space 
> and hit Intro (i.e., carriage return). Then the file will be typeset 
> according to your wishes.
>
> One thing to remember with these and similar tricks is that each 
> successive TeX run destroys the previous one, so if one wants to keep 
> both versions, one has to rename the PDF file resulting from the first 
> run...
>
> Hope it helps...
>
> JMaF


Thank you very much. It looks very nice but I won't be able to try it 
for a while because, not being very smart, I lost a lot of time with the 
problem so that, right now, I really have to work on the text and 
exercises themselves and so I must stick with what I have. In any case, 
at least I think so for the time being, this is really something to be 
used only once in a while.

Very grateful 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