Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Sat, 22 Nov 2008 10:42:52 +0100 Received: by mail.proteosys.com (8.13.8/8.13.8) with ESMTP id mAM9gnYf005510 for ; Sat, 22 Nov 2008 10:42:49 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id mAM9blMi015410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 22 Nov 2008 10:37:47 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id mALN26a5001634; Sat, 22 Nov 2008 10:37:36 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 158515 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 22 Nov 2008 10:37:35 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id mAM9bZ2i014100 for ; Sat, 22 Nov 2008 10:37:35 +0100 Received: from mail-in-17.arcor-online.net (mail-in-17.arcor-online.net [151.189.21.57]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id mAM9bQLa015334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 22 Nov 2008 10:37:30 +0100 Received: from mail-in-06-z2.arcor-online.net (mail-in-06-z2.arcor-online.net [151.189.8.18]) by mail-in-17.arcor-online.net (Postfix) with ESMTP id 8141F30E836 for ; Sat, 22 Nov 2008 10:37:25 +0100 (CET) Received: from mail-in-06.arcor-online.net (mail-in-06.arcor-online.net [151.189.21.46]) by mail-in-06-z2.arcor-online.net (Postfix) with ESMTP id 71EB35C2C1 for ; Sat, 22 Nov 2008 10:37:25 +0100 (CET) Received: from lola.goethe.zz (dslb-084-061-040-004.pools.arcor-ip.net [84.61.40.4]) by mail-in-06.arcor-online.net (Postfix) with ESMTP id 47D5335E6AA for ; Sat, 22 Nov 2008 10:37:25 +0100 (CET) Received: by lola.goethe.zz (Postfix, from userid 1002) id B9BE91CDF3B5; Sat, 22 Nov 2008 10:37:24 +0100 (CET) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Virus-Scanned: ClamAV 0.94.1/8662/Sat Nov 22 08:12:04 2008 on mail-in-06.arcor-online.net X-Virus-Status: Clean Message-ID: <85myfs85kb.fsf@lola.goethe.zz> Date: Sat, 22 Nov 2008 10:37:24 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: David Kastrup Subject: [comp.text.tex] Re: Bug in tufte-latex package To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -2.464 () BAYES_00,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang 2.64 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 22 Nov 2008 09:42:52.0268 (UTC) FILETIME=[B039DAC0:01C94C86] Status: R X-Status: X-Keywords: X-UID: 5450 --=-=-= I agree that this is a bug in the LaTeX kernel. The \If... constructs should never rely on propery nested TeX conditionals. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline From: Kjell Magne Fauske Newsgroups: comp.text.tex Subject: Re: Bug in tufte-latex package Date: Sat, 22 Nov 2008 01:14:00 -0800 (PST) Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On Nov 20, 11:29=A0pm, Dan Luecking wrote: > There is a bug in tufte-handout.cls that seems to prevent even the > supplied sample-handout.tex from being compiled. > > Lines 112--116 of tufte-handout.cls say > \IfFileExists{ifpdf.sty}{% > =A0 \RequirePackage{ifpdf}}{% assume we're not using pdfTex? > > =A0 \newif\ifpdf\pdffalse > > } > > Unfortunately, the class loads other packages that have already > loaded ifpdf.sty. > > That means that the \ifpdf in the false-case alternative of > IfFileExists is already recognized as a TeX conditional. The > code of \IfFileExists copies this into another TeX conditional > and it appears as an unbalanced \if-command. > > This ultimately causes large amounts of code in tufte-handout.cls > to be ignored. > > Another potential problem occurs in lines 120--124: > \IfFileExists{ifxetex.sty}{% > =A0 \RequirePackage{ifxetex}}{% not using xelatex > > =A0 \newif\ifxetex\xetexfalse > > } > > Although it causes no problem so far, it could break if > some previously loaded package is changed to require > ifxetex.sty > > There are several ways tufte-handout could be corrected. > I am unsure which is best, but I would leave the false-case > alternative empty and use > =A0\@ifundefined{ifpdf}{\newif\ifpdf}{} > afterwards. > > It occurs to me, however, that the LaTeX kernel might be > corrected so that \IfFileExists doesn't include the second > and third arguments inside conditional code. Something > like: > \def\IfFileExists#1{% > =A0 \openin \@inputcheck #1 > =A0 \ifeof \@inputcheck > =A0 =A0 \ifx \input@path \@undefined > =A0 =A0 =A0 \let\reserved@a\@secondoftwo > =A0 =A0 \else > =A0 =A0 =A0 \def \reserved@a {\@iffileonpath {#1}} > =A0 =A0 \fi > =A0 \else > =A0 =A0 \closein \@inputcheck > =A0 =A0 \edef \@filef@und {#1 } > =A0 =A0 \let\reserved@a\@firstoftwo > =A0 \fi\reserved@a} > > It would also be nice if the kernel provided a version > of \newif where one only had to give it the minimal part > of the conditional's name. Something like the following > would be skippable: > =A0 \safe@newif{name} > (which would define \ifname, \nametrue and \namefalse). > > Dan > To reply by email, change LookInSig to luecking I forwarded the bug report to the tufte-latex mailing list: http://groups.google.com/group/tufte-latex/browse_frm/thread/d7db347ab7a870= ab - Kjell Magne Fauske --=-=-= -- David Kastrup, Kriemhildstr. 15, 44793 Bochum UKTUG FAQ: --=-=-=--