latex.graphicext

- SourceForge
- Home Page
- Samples

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

Suggestions
Search:
Next: Procedures procedure.mod.xsl
Previous: latex.math.preamble Up: Variables and Templates used in LaTeX Preamble Generation

Reference Section

## Name

latex.graphicext — Declared graphic extensions

## Synopsis

## A. Description

This template checks whether the user has overridden grafic.default.extension Otherwise, declares .pdf, .png, .jpg if using pdflatex and .eps if using latex.

    <xsl:template name="latex.graphicext">
    <xsl:choose>
    <xsl:when test="$graphic.default.extension !=''">
    	<xsl:text>\DeclareGraphicsExtensions{</xsl:text>
    	<xsl:if test="not(contains($graphic.default.extension,'.'))">
    		<xsl:text>.</xsl:text>
    	</xsl:if>
    	<xsl:value-of select="$graphic.default.extension"/>
    	<xsl:text>}&#10;</xsl:text>
    </xsl:when>
    <xsl:otherwise>
    	<xsl:choose>
    	<xsl:when test="$latex.pdf.support=1">
    		<xsl:text>\ifpdf&#10;</xsl:text>
    		<xsl:text>\DeclareGraphicsExtensions{.pdf,.png,.jpg}&#10;</xsl:text>
    		<xsl:text>\else&#10;</xsl:text>
    		<xsl:text>\DeclareGraphicsExtensions{.eps}&#10;</xsl:text>
    		<xsl:text>\fi&#10;</xsl:text>
    	</xsl:when>
    	<xsl:otherwise>
    		<xsl:text>\DeclareGraphicsExtensions{.eps}&#10;</xsl:text>
    	</xsl:otherwise>
    	</xsl:choose>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>

## B. Pertinent Variables

- graphic.default.extension
- latex.pdf.support

Prev | Up | Next
latex.math.preamble | Home | Procedures procedure.mod.xsl