latex.pdf.preamble

- SourceForge
- Home Page
- Samples

- Reference Contents |
- Download & Install |
- User Guides |
- Notes, E-mail & Bugs |
- Q&A

Suggestions
Search:
Next: latex.hyperref.preamble
Previous: latex.float.preamble Up: Variables and Templates used in LaTeX Preamble Generation

Reference Section

## Name

latex.pdf.preamble

## Synopsis

    <xsl:param name="latex.pdf.preamble">
    		<xsl:text>\usepackage{ifthen}
    </xsl:text>
    		<xsl:text>% --------------------------------------------
    </xsl:text>
    		<xsl:text>% Check for PDFLaTeX/LaTeX
    </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>
    		<xsl:text>\else
    </xsl:text>
    		<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>\usepackage[pdftex]{graphicx}
    </xsl:text>
    		<xsl:text>\pdfcompresslevel=9
    </xsl:text>
    		<xsl:text>\else
    </xsl:text>
    		<xsl:text>\usepackage{graphicx}
    </xsl:text>
    		<xsl:text>\fi
    </xsl:text>
    	</xsl:param>

## A. Description

    				\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
    				\usepackage[pdftex]{graphicx}
    				\pdfcompresslevel=9
    				\else
    				\usepackage{graphicx}
    				\fi

## G. Uses

Documented templates that use this parameter:

- generate.latex.common.preamble

Prev | Up | Next
latex.float.preamble | Home | latex.hyperref.preamble