From 009aeab7483b20e9c747a0844ff23c6447e26b23 Mon Sep 17 00:00:00 2001
From: Dominik Riebeling <Dominik.Riebeling@gmail.com>
Date: Mon, 3 Apr 2006 21:29:47 +0000
Subject: detect pdflatex mode in preparation for work on HTML generation

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9471 a1c6a512-1295-4272-9138-f99709370657
---
 manual/preamble.tex | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

(limited to 'manual/preamble.tex')

diff --git a/manual/preamble.tex b/manual/preamble.tex
index d1317cd700..bc69194b54 100644
--- a/manual/preamble.tex
+++ b/manual/preamble.tex
@@ -3,10 +3,6 @@
 \usepackage{palatino}
 %\renewcommand{\familydefault}{\sfdefault}
 
-%Comment this out at release
-\usepackage{pdfdraftcopy}
-\draftstring{DRAFT VERSION}
-%\draftangle{45}
 \usepackage{tabularx}
 \usepackage{multirow}
 
@@ -44,6 +40,16 @@
 \urlstyle{sf}
 \usepackage{marvosym}
 
+% new \ifpdf to check if running in pdf mode. Helps for html generation.
+\newif\ifpdf\ifx\pdfoutput\undefined\pdffalse\else\pdfoutput=1\pdftrue\fi
+
+% mark this ad draft version (only for pdflatex) -- comment this out at release
+\ifpdf
+  \usepackage{pdfdraftcopy}
+  \draftstring{DRAFT VERSION}
+%   \draftangle{45}
+\fi
+
 % fancy header style adjustments
 %\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
 %\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
-- 
cgit v1.2.3

