From 9d5ab9335266debb0988c137803fcc3528f11545 Mon Sep 17 00:00:00 2001 From: Luca Capello Date: Mon, 2 Oct 2006 21:55:16 +0000 Subject: [PATCH] docs/pbook.py: correct faulty check for PDF output Frank K[_\c3_][_\bc_]ster discovered that docs/pbook.py produces buggy LaTeX code, a faulty check for PDF output. It doesn't show up if you only try to create PDF. But if you want to go the traditional route and produce dvi files (and from that PostScript and maybe finally again PDF), this will fail and still produce PDF. The script itself doesn't do that (or rather, it does that in fact but ignores the output in this first run), but it's still an uglyness. Moreover, it's completely useless, because the only package that uses the information, graphicx, will detect the output format itself (and in a proper way). http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=390629 --- docs/pbook.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/pbook.py b/docs/pbook.py index 3c17267..a599395 100644 --- a/docs/pbook.py +++ b/docs/pbook.py @@ -66,10 +66,7 @@ class TexFile(TxtFile): def beginning(self): return '\n\\documentclass[notitlepage,a4paper,makeidx]{' + self.style + '}\n' + \ '\\usepackage{fancyvrb,color,palatino,makeidx}\n' + \ - "\\newif\\ifpdf\n\\ifx\\pdfoutput\\undefined\n\\pdffalse\n" + \ - "\\else\n\\pdfoutput=1\n\\pdftrue\n\\fi\n" + \ - "\\ifpdf\n\\usepackage[pdftex]{graphicx}\n" + \ - "\\else\n\\usepackage{graphicx}\n\\fi\n" + \ + "\\usepackage{graphicx}\n" + \ '\\definecolor{gray}{gray}{0.6}\n' + \ '\\title{' + TexFile.escapeString(self.title) + '}\n' + \ (self.author and ('\\author{' + self.author + '}\n') or '') + \ -- 2.20.1