Account Options

  1. Sign in
Google Groups Home
« Groups Home
Message from discussion Dateinamenproblem
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Heiko Oberdiek  
View profile  
 More options Jul 18 2004, 12:29 pm
Newsgroups: de.comp.text.tex
From: Heiko Oberdiek <oberd...@uni-freiburg.de>
Date: Sun, 18 Jul 2004 18:29:27 +0200
Local: Sun, Jul 18 2004 12:29 pm
Subject: Re: Dateinamenproblem

Heiko Oberdiek <oberd...@uni-freiburg.de> wrote:
> Versuchte Zusammenfassung:
> [...]
> implementieren ...

%%% cut %%% grffile.sty %%% cut %%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{grffile}%
  [2004/07/18 v0.5 Extended file name support for graphics (HO)]

% The package defines three options that allows a larger range
% of file names that can be used with graphics or graphicx.
%
% "multidot"
%
% The file name parsing is changed, in order to detect
% known extensions. This allows both the use of dots inside the
% base name and extensions with several dots.
%
% Example:
%   \usepackage[multidot]{grffile}
%
%   % Files: Hello.World.eps, Hello.World.pdf
%   \includegraphics{Hello.World}
%   % will find "Hello.World.pdf" with driver "pdftex"
%   % or "Hello.World.eps" with driver "dvips".
%
% "extendedchars"
%
% If the input encoding is the same encoding as the encoding that
% is used for file names and the driver allows non-asscii characters,
% then this option can be used to try file names with such characters.
%
% Example:
%   \usepackage[latin1]{inputenc}
%   \usepackage[extendedchars]{grffile}
%   \includegraphics{Bäckerstraße}
%
% If "draft" is enabled, the file name is printed with the
% current font encoding for \ttfamily. Thus it is possible,
% that such characters are omitted or the wrong characters
% are displayed, if the font encoding is not the same as
% the file name encoding.
%
% "nofilecheck"
%
% \TeX\ considers the space character as termination in its
% syntax for commands that expect a file name.
% Therefore files with spaces cannot be used with TeX.
% However, pdfTeX's primitive \pdfximage that is used for
% including file names uses curly braces to delimit the
% file name, so spaces are possible.
%   But the \TeX's limitation applies for some operations
% of the graphics package:
% * Print a warning message, if the file cannot be found.
% * If a file name is given without extension, then graphics
%   looks for an existent file with a supported file extension.
% Both relies on existence checks that are done by TeX's
% limited primitives.
%
% Option "nofilecheck" disables both features to allow
% files with spaces. This works for pdf\TeX, if the
% file is given with extension. But beware, many of the other
% drivers does not expect spaces in file names and this can
% lead to errors in the process chain after the \LaTeX\ run.
%
% Example:
%   \usepackage[pdftex]{graphics}
%   \usepackage[multidot]{grffile}
%
%   \includegraphics{Hello World.pdf}% the extension must be given
%
% Use
%
% The options can be given at many places:
%
% a) Package: \usepackage[<options>]{grffile}
%
% The following possibilities are supported, if package graphicx
% is used:
%
% b) Graphics configuration: \setkeys{Gin}{<options>}
%
% c) Applying of options for just one file:
%    \includegraphics[<options>]{...}
%

\newif\ifGin@multidot
\newif\ifGin@extendedchars
\newif\ifGin@nofilecheck

\DeclareOption{multidot}{\Gin@multidottrue}
\DeclareOption{extendedchars}{\Gin@extendedcharstrue}
\DeclareOption{nofilecheck}{\Gin@nofilechecktrue}

\DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
\ProcessOptions\relax
\RequirePackage{graphics}

% Support for graphicx

% Test for \define@key without defining it
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname define@key\endcsname\relax
  % package keyval is not loaded yet, thus its definitions
  % are used here to define the new options.
  % \@ifnextchar and \@namedef are provided by miniltx.tex.
  \def\Gin@define@key#1#2{%
    \@ifnextchar[{%
      \Gin@KV@def{#1}{#2}%
    }{%
      \@namedef{KV@#1@#2}####1%
    }%
  }%
  \def\Gin@KV@def#1#2[#3]{%
    \@namedef{KV@#1@#2@default\expandafter}\expandafter
        {\csname KV@#1@#2\endcsname{#3}}%
    \@namedef{KV@#1@#2}##1%
  }%
\else
  \let\Gin@define@key\define@key
\fi
\Gin@define@key{Gin}{nofilecheck}[true]{%
  \lowercase{\Gin@boolkey{#1}}{nofilecheck}%

}

\Gin@define@key{Gin}{multidot}[true]{%
  \lowercase{\Gin@boolkey{#1}}{multidot}%
}

\Gin@define@key{Gin}{extendedchars}[true]{%
  \lowercase{\Gin@boolkey{#1}}{extendedchars}%

}

% paranoid catcode settings
\edef\Gin@RestoreCatcodes{%
  \catcode`\noexpand\=\the\catcode`\=\relax
  \catcode`\noexpand\:\the\catcode`\:\relax
  \catcode`\noexpand\.\the\catcode`\.\relax
  \catcode`\noexpand\'\the\catcode`\'\relax
  \catcode`\noexpand\<\the\catcode`\<\relax
  \catcode`\noexpand\*\the\catcode`\*\relax
  \catcode`\noexpand\^\the\catcode`\^\relax
  \catcode`\noexpand\~\the\catcode`\~\relax
}

\@makeother\=
\@makeother\:
\@makeother\.
\@makeother\'
\@makeother\<
\catcode`\*=11 %
\catcode`\^=7 %
\catcode`\~=\active

\expandafter\renewcommand\string *{\Ginclude@graphics}[1]{%
  \begingroup
    \ifGin@extendedchars
      % babel characters
      \csname @safe@activestrue\endcsname
      % active ~
      \edef~{\string~}%
      % inputenc characters
      \Gin@inputenc@loop\^^A\^^H%
      \Gin@inputenc@loop\^^K\^^K%
      \Gin@inputenc@loop\^^N\^^_%
      \Gin@inputenc@loop\^^?\^^ff%
    \fi
    \let\input@path\Ginput@path
    \ifGin@multidot
      \let\filename@simple\Gin@filename@simple
      \let\filename@base\@empty
    \fi
    \filename@parse{#1}%
    \ifx\filename@ext\relax
      \ifGin@nofilecheck
      \else
        \@for\Gin@temp:=\Gin@extensions\do{%
          \ifx\Gin@ext\relax
            \Gin@getbase\Gin@temp
          \fi
        }%
      \fi
    \else
      \ifGin@nofilecheck
        \edef\Gin@base{\filename@area\filename@base}%
        \edef\Gin@ext{\Gin@sepdefault\filename@ext}%
      \else
        \Gin@getbase{\Gin@sepdefault\filename@ext}%
        \ifx\Gin@ext\relax
          \@warning{File `#1' not found}%
          \def\Gin@base{\filename@area\filename@base}%
          \edef\Gin@ext{\Gin@sepdefault\filename@ext}%
        \fi
      \fi
    \fi
    \ifx\Gin@ext\relax
      \@latex@error{File `#1' not found}%
         {I could not locate the file with any of these %
          extensions:^^J%
          \Gin@extensions^^J\@ehc}%
    \else
      \@ifundefined{Gin@rule@\Gin@ext}{%
        \ifx\Gin@rule@*\@undefined
          \@latex@error{Unknown graphics extension: \Gin@ext}\@ehc
        \else
          \expandafter\Gin@setfile\Gin@rule@*{\Gin@base\Gin@ext}%
        \fi
      }{%
        \expandafter\expandafter\expandafter\Gin@setfile
            \csname Gin@rule@\Gin@ext\endcsname{\Gin@base\Gin@ext}%
      }%
    \fi
  \endgroup

}

\def\Gin@inputenc@loop#1#2{%
  \count@=`#1\relax
  \loop
    \begingroup
      \uccode`\~=\count@
    \uppercase{%
      \endgroup
      \edef~{\string~}%
    }%
  \ifnum\count@<`#2\relax
    \advance\count@\@ne
  \repeat

}

\def\Gin@filename@simple#1.#2\\{%
  \ifx\\#2\\%
    \let\filename@ext\relax
  \else
    \expandafter\ifx\csname
        Gin@rule@.\filename@dot #2\\\endcsname\relax
      \edef\filename@base{\filename@base #1.}%
      \Gin@ReturnAfterFiFiBase{\Gin@filename@simple #2\\}%
    \else
      \edef\filename@ext{\filename@dot #2\\}%
    \fi
  \fi
  \edef\filename@base{\filename@base #1}%
}

\def\Gin@ReturnAfterFiFiBase#1#2\filename@base#3{\fi\fi#1}

\Gin@RestoreCatcodes
\endinput
%%% cut %%% grffile.sty %%% cut %%%

Viele Gruesse
  Heiko <oberd...@uni-freiburg.de>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.