Re: Problems with db2latex and current TeX distributions: \pdfoutput
James Devenish <[email protected]> Tue, 27 Dec 2005 17:24:04 +0800
| Newsgroups | gmane.text.docbook.db2latex.general |
|---|---|
| Message-ID | <[email protected]> |
--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi Frank,
Can you find out if the attached patches fix the problem for Debian?
--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="preamble.mod.xsl.diff"
Index: preamble.mod.xsl
===================================================================
RCS file: /cvsroot/db2latex/db2latex/xsl/preamble.mod.xsl,v
retrieving revision 1.82
diff -u -r1.82 preamble.mod.xsl
--- preamble.mod.xsl 31 Jan 2004 12:26:12 -0000 1.82
+++ preamble.mod.xsl 27 Dec 2005 09:18:34 -0000
@@ -54,7 +54,8 @@
<para>
If <xref linkend="param.latex.override"/> is empty, the template
- outputs <xref linkend="param.latex.article.preamblestart"/> and
+ outputs <xref linkend="param.latex.common.pdfdetection"/>,
+ <xref linkend="param.latex.article.preamblestart"/> and
<xref linkend="param.latex.article.preamble.pre"/>, then calls
<xref linkend="template.generate.latex.common.preamble"/> and <xref
linkend="template.generate.latex.essential.preamble"/> followed by
@@ -69,6 +70,7 @@
<xsl:template name="generate.latex.article.preamble">
<xsl:choose>
<xsl:when test="$latex.override = ''">
+ <xsl:value-of select="$latex.common.pdfdetection"/>
<xsl:value-of select="$latex.article.preamblestart"/>
<xsl:value-of select="$latex.article.preamble.pre"/>
<xsl:call-template name="label.id"/>
@@ -95,7 +97,8 @@
<para>
If <xref linkend="param.latex.override"/> is empty, the template
- outputs <xref linkend="param.latex.book.preamblestart"/> and
+ outputs <xref linkend="param.latex.common.pdfdetection"/>,
+ <xref linkend="param.latex.book.preamblestart"/> and
<xref linkend="param.latex.book.preamble.pre"/>, then calls
<xref linkend="template.generate.latex.common.preamble"/> and <xref
linkend="template.generate.latex.essential.preamble"/> followed by
@@ -110,6 +113,7 @@
<xsl:template name="generate.latex.book.preamble">
<xsl:choose>
<xsl:when test="$latex.override = ''">
+ <xsl:value-of select="$latex.common.pdfdetection"/>
<xsl:value-of select="$latex.book.preamblestart"/>
<xsl:value-of select="$latex.book.preamble.pre"/>
<xsl:call-template name="label.id"/>
@@ -142,8 +146,8 @@
<xsl:text>% -------------------------------------------- </xsl:text>
<xsl:text>% Autogenerated LaTeX file for articles </xsl:text>
<xsl:text>% -------------------------------------------- </xsl:text>
- <xsl:text>\ifx\pdfoutput\undefined </xsl:text>
- <xsl:text>\documentclass[</xsl:text>
+ <xsl:text>\ifdblatexpdf </xsl:text>
+ <xsl:text>\documentclass[pdftex,</xsl:text>
<xsl:value-of select='$latex.documentclass.common' />
<xsl:text>,</xsl:text>
<xsl:value-of select='$latex.documentclass.article' />
@@ -156,7 +160,7 @@
</xsl:choose>
<xsl:text>} </xsl:text>
<xsl:text>\else </xsl:text>
- <xsl:text>\documentclass[pdftex,</xsl:text>
+ <xsl:text>\documentclass[</xsl:text>
<xsl:value-of select='$latex.documentclass.common' />
<xsl:text>,</xsl:text>
<xsl:value-of select='$latex.documentclass.article' />
@@ -189,8 +193,8 @@
<xsl:text>% ------------------------------------------------------------ </xsl:text>
<xsl:text>% Autogenerated LaTeX file for books </xsl:text>
<xsl:text>% ------------------------------------------------------------ </xsl:text>
- <xsl:text>\ifx\pdfoutput\undefined </xsl:text>
- <xsl:text>\documentclass[</xsl:text>
+ <xsl:text>\ifdblatexpdf </xsl:text>
+ <xsl:text>\documentclass[pdftex,</xsl:text>
<xsl:value-of select='$latex.documentclass.common' />
<xsl:text>,</xsl:text>
<xsl:value-of select='$latex.documentclass.book' />
@@ -203,7 +207,7 @@
</xsl:choose>
<xsl:text>} </xsl:text>
<xsl:text>\else </xsl:text>
- <xsl:text>\documentclass[pdftex,</xsl:text>
+ <xsl:text>\documentclass[</xsl:text>
<xsl:value-of select='$latex.documentclass.common' />
<xsl:text>,</xsl:text>
<xsl:value-of select='$latex.documentclass.book' />
@@ -875,21 +879,10 @@
<doc:param name="latex.pdf.preamble" xmlns="">
<doc:description>
<screen>
- \usepackage{ifthen}
- % --------------------------------------------
- % Check for PDFLaTeX/LaTeX
- % --------------------------------------------
- \newif\ifpdf
- \ifx\pdfoutput\undefined
- \pdffalse % we are not running PDFLaTeX
- \else
- \pdfoutput=1 % we are running PDFLaTeX
- \pdftrue
- \fi
% --------------------------------------------
% Load graphicx package with pdf if needed
% --------------------------------------------
- \ifpdf
+ \ifdblatexpdf
\usepackage[pdftex]{graphicx}
\pdfcompresslevel=9
\else
@@ -899,10 +892,11 @@
</doc:description>
</doc:param>
<xsl:param name="latex.pdf.preamble">
+ <!--
<xsl:text>\usepackage{ifthen} </xsl:text>
- <xsl:text>% -------------------------------------------- </xsl:text>
+ <xsl:text>% ============================================ </xsl:text>
<xsl:text>% Check for PDFLaTeX/LaTeX </xsl:text>
- <xsl:text>% -------------------------------------------- </xsl:text>
+ <xsl:text>% ============================================ </xsl:text>
<xsl:text>\newif\ifpdf </xsl:text>
<xsl:text>\ifx\pdfoutput\undefined </xsl:text>
<xsl:text>\pdffalse % we are not running PDFLaTeX </xsl:text>
@@ -910,10 +904,11 @@
<xsl:text>\pdfoutput=1 % we are running PDFLaTeX </xsl:text>
<xsl:text>\pdftrue </xsl:text>
<xsl:text>\fi </xsl:text>
+ -->
<xsl:text>% -------------------------------------------- </xsl:text>
<xsl:text>% Load graphicx package with pdf if needed </xsl:text>
<xsl:text>% -------------------------------------------- </xsl:text>
- <xsl:text>\ifpdf </xsl:text>
+ <xsl:text>\ifdblatexpdf </xsl:text>
<xsl:text>\usepackage[pdftex]{graphicx} </xsl:text>
<xsl:text>\pdfcompresslevel=9 </xsl:text>
<xsl:text>\else </xsl:text>
@@ -937,7 +932,7 @@
% --------------------------------------------
% Load hyperref package with pdf if needed
% --------------------------------------------
- \ifpdf
+ \ifdblatexpdf
\usepackage[pdftex,bookmarksnumbered,colorlinks,backref, bookmarks, breaklinks, linktocpage]{hyperref}
\else
\usepackage[bookmarksnumbered,colorlinks,backref, bookmarks, breaklinks, linktocpage]{hyperref}
@@ -969,7 +964,7 @@
<xsl:text>% -------------------------------------------- </xsl:text>
<xsl:text>% Load hyperref package with pdf if needed </xsl:text>
<xsl:text>% -------------------------------------------- </xsl:text>
- <xsl:text>\ifpdf </xsl:text>
+ <xsl:text>\ifdblatexpdf </xsl:text>
<xsl:text>\usepackage[pdftex,</xsl:text>
<xsl:value-of select="$latex.hyperref.param.common" />
<xsl:text>,</xsl:text>
@@ -1079,7 +1074,7 @@
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$latex.pdf.support=1">
- <xsl:text>\ifpdf </xsl:text>
+ <xsl:text>\ifdblatexpdf </xsl:text>
<xsl:text>\DeclareGraphicsExtensions{.pdf,.png,.jpg} </xsl:text>
<xsl:text>\else </xsl:text>
<xsl:text>\DeclareGraphicsExtensions{.eps} </xsl:text>
@@ -1114,7 +1109,7 @@
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$latex.pdf.support=1">
- <xsl:text>\ifpdf </xsl:text>
+ <xsl:text>\ifdblatexpdf </xsl:text>
<xsl:text>\DeclareGraphicsExtensions{.pdf,.png,.jpg} </xsl:text>
<xsl:text>\else </xsl:text>
<xsl:text>\DeclareGraphicsExtensions{.eps} </xsl:text>
--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="param-direct.mod.xsl.diff"
Index: param-direct.mod.xsl
===================================================================
RCS file: /cvsroot/db2latex/db2latex/xsl/param-direct.mod.xsl,v
retrieving revision 1.9
diff -u -r1.9 param-direct.mod.xsl
--- param-direct.mod.xsl 12 Aug 2004 05:17:01 -0000 1.9
+++ param-direct.mod.xsl 27 Dec 2005 09:18:59 -0000
@@ -39,6 +39,16 @@
</doc:reference>
<doc:param xmlns="">
+ <refpurpose> Undocumented </refpurpose>
+ <doc:description>
+ <para> Undocumented. </para>
+ </doc:description>
+ </doc:param>
+ <xsl:param name="latex.common.pdfdetection">
+ <xsl:text>\newif\ifdblatexpdf \ifx\pdfoutput\undefined \else \ifx\pdfoutput\relax \else \ifnum\pdfoutput>0 \dblatexpdftrue \fi \fi \fi </xsl:text>
+ </xsl:param>
+
+ <doc:param xmlns="">
<refpurpose> DB2LaTeX document class </refpurpose>
<doc:description>
<para>
--yrj/dFKFPuw6o+aM--
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click