⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 epsf.tex

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 TEX
📖 第 1 页 / 共 2 页
字号:
%%% ====================================================================%%%   This file is freely redistributable and placed into the%%%   public domain by Tomas Rokicki.%%%  @TeX-file{%%%     author          = "Tom Rokicki",%%%     version         = "2.7k",%%%     date            = "19 July 1997",%%%     time            = "10:00:05 MDT",%%%     filename        = "epsf.tex",%%%     address         = "Tom Rokicki%%%                        Box 2081%%%                        Stanford, CA 94309%%%                        USA",%%%     telephone       = "+1 415 855 9989",%%%     email           = "rokicki@cs.stanford.edu (Internet)",%%%     codetable       = "ISO/ASCII",%%%     keywords        = "PostScript, TeX",%%%     supported       = "yes",%%%     abstract        = "This file contains macros to support the inclusion%%%                        of Encapsulated PostScript files in TeX documents.",%%%     docstring       = "This file contains TeX macros to include an%%%                        Encapsulated PostScript graphic.  It works%%%                        by finding the bounding box comment,%%%                        calculating the correct scale values, and%%%                        inserting a vbox of the appropriate size at%%%                        the current position in the TeX document.%%%%%%                        To use, simply say%%%%%%                        \input epsf % somewhere early on in your TeX file%%%%%%                        % then where you want to insert a vbox for a figure:%%%                        \epsfbox{filename.ps}%%%%%%                        Alternatively, you can supply your own%%%                        bounding box by%%%%%%                        \epsfbox[0 0 30 50]{filename.ps}%%%%%%                        This will not read in the file, and will%%%                        instead use the bounding box you specify.%%%%%%                        The effect will be to typeset the figure as%%%                        a TeX box, at the point of your \epsfbox%%%                        command. By default, the graphic will have%%%                        its `natural' width (namely the width of%%%                        its bounding box, as described in%%%                        filename.ps). The TeX box will have depth%%%                        zero.%%%%%%                        You can enlarge or reduce the figure by%%%                        saying%%%%%%                          \epsfxsize=<dimen> \epsfbox{filename.ps}%%%                        or%%%                          \epsfysize=<dimen> \epsfbox{filename.ps}%%%%%%                        instead. Then the width of the TeX box will%%%                        be \epsfxsize and its height will be scaled%%%                        proportionately (or the height will be%%%                        \epsfysize and its width will be scaled%%%                        proportionately).%%%%%%                        The width (and height) is restored to zero%%%                        after each use, so \epsfxsize or \epsfysize%%%                        must be specified before EACH use of%%%                        \epsfbox.%%%%%%                        A more general facility for sizing is%%%                        available by defining the \epsfsize macro.%%%                        Normally you can redefine this macro to do%%%                        almost anything.  The first parameter is%%%                        the natural x size of the PostScript%%%                        graphic, the second parameter is the%%%                        natural y size of the PostScript graphic.%%%                        It must return the xsize to use, or 0 if%%%                        natural scaling is to be used.  Common uses%%%                        include:%%%%%%                           \epsfxsize  % just leave the old value alone%%%                           0pt         % use the natural sizes%%%                           #1          % use the natural sizes%%%                           \hsize      % scale to full width%%%                           0.5#1       % scale to 50% of natural size%%%                           \ifnum #1>\hsize\hsize\else#1\fi%%%                                       % smaller of natural, hsize%%%%%%                        If you want TeX to report the size of the%%%                        figure (as a message on your terminal when%%%                        it processes each figure), say%%%                        `\epsfverbosetrue'.%%%%%%                        If you only want to get the bounding box%%%                        extents, without producing any output boxes%%%                        or \special{}, then say%%%                        \epsfgetbb{filename}.  The extents will be%%%                        saved in the macros \epsfllx \epsflly%%%                        \epsfurx \epsfury in PostScript units of%%%                        big points.%%%%%%                        Revision history:%%%%%%                        ---------------------------------------------%%%                        epsf.tex macro file:%%%                        Originally written by Tomas Rokicki of%%%                        Radical Eye Software, 29 Mar 1989.%%%%%%                        ---------------------------------------------%%%                        Revised by Don Knuth, 3 Jan 1990.%%%%%%                        ---------------------------------------------%%%                        Revised by Tomas Rokicki, 18 Jul 1990.%%%                        Accept bounding boxes with no space after%%%                        the colon.%%%%%%                        ---------------------------------------------%%%                        Revised by Nelson H. F. Beebe%%%                        <beebe@math.utah.edu>, 03 Dec 1991 [2.0].%%%                        Add version number and date typeout.%%%%%%                        Use \immediate\write16 instead of \message%%%                        to ensure output on new line.%%%%%%                        Handle nested EPS files.%%%%%%                        Handle %%BoundingBox: (atend) lines.%%%%%%                        Do not quit when blank lines are found.%%%%%%                        Add a few percents to remove generation of%%%                        spurious blank space.%%%%%%                        Move \special output to%%%                        \epsfspecial{filename} so that other macro%%%                        packages can input this one, then change%%%                        the definition of \epsfspecial to match%%%                        another DVI driver.%%%%%%                        Move size computation to \epsfsetsize which%%%                        can be called by the user; the verbose%%%                        output of the bounding box and scaled width%%%                        and height happens here.%%%%%%                        ---------------------------------------------%%%                        Revised by Nelson H. F. Beebe%%%                        <beebe@math.utah.edu>, 05 May 1992 [2.1].%%%                        Wrap \leavevmode\hbox{} around \vbox{} with%%%                        the \special so that \epsffile{} can be%%%                        used inside \begin{center}...\end{center}%%%%%%                        ---------------------------------------------%%%                        Revised by Nelson H. F. Beebe%%%                        <beebe@math.utah.edu>, 09 Dec 1992 [2.2].%%%                        Introduce \epsfshow{true,false} and%%%                        \epsfframe{true,false} macros; the latter%%%                        suppresses the insertion of the PostScript,%%%                        and instead just creates an empty box,%%%                        which may be handy for rapid prototyping.%%%%%%                        ---------------------------------------------%%%                        Revised by Nelson H. F. Beebe%%%                        <beebe@math.utah.edu>, 14 Dec 1992 [2.3].%%%                        Add \epsfshowfilename{true,false}.  When%%%                        true, and \epsfshowfalse is specified, the%%%                        PostScript file name will be displayed%%%                        centered in the figure box.%%%%%%                        ---------------------------------------------%%%                        Revised by Nelson H. F. Beebe%%%                        <beebe@math.utah.edu>, 20 June 1993 [2.4].%%%                        Remove non-zero debug setting of \epsfframemargin,%%%                        and change margin handling to preserve EPS image%%%                        size and aspect ratio, so that the actual%%%                        box is \epsfxsize+\epsfframemargin wide by%%%                        \epsfysize+\epsfframemargin high.%%%                        Reduce output of \epsfshowfilenametrue to%%%                        just the bare file name.%%%%%%                        ---------------------------------------------%%%                        Revised by Nelson H. F. Beebe%%%                        <beebe@math.utah.edu>, 13 July 1993 [2.5].%%%                        Add \epsfframethickness for control of%%%                        \epsfframe frame lines.%%%%%%                        ---------------------------------------------%%%                        Revised by Nelson H. F. Beebe%%%                        <beebe@math.utah.edu>, 02 July 1996 [2.6]%%%                        Add missing initialization \epsfatendfalse;%%%                        the lack of this resulted in the wrong%%%                        BoundingBox being picked up, mea culpa, sigh...%%%                        ---------------------------------------------%%%%%%                        ---------------------------------------------%%%                        Revised by Nelson H. F. Beebe%%%                        <beebe@math.utah.edu>, 25 October 1996 [2.7]%%%                        Update to match changes in from dvips 5-600%%%                        distribution: new user-accessible macros:%%%                        \epsfclipon, \epsfclipoff, \epsfdrafton,%%%                        \epsfdraftoff, change \empty to \epsfempty.%%%                        ---------------------------------------------%%%                        %%%                        Modified to avoid verbosity, give help.%%%                        --kb@cs.umb.edu, for Texinfo.%%%  }%%% ====================================================================%\ifx\epsfannounce\undefined \def\epsfannounce{\immediate\write16}\fi \epsfannounce{This is `epsf.tex' v2.7k <10 July 1997>}%%\newread\epsffilein    % file to \read\newif\ifepsfatend     % need to scan to LAST %%BoundingBox comment?\newif\ifepsfbbfound   % success?\newif\ifepsfdraft     % use draft mode?\newif\ifepsffileok    % continue looking for the bounding box?\newif\ifepsfframe     % frame the bounding box?\newif\ifepsfshow      % show PostScript file, or just bounding box?\epsfshowtrue          % default is to display PostScript file\newif\ifepsfshowfilename % show the file name if \epsfshowfalse specified?\newif\ifepsfverbose   % report what you're making?\newdimen\epsfframemargin % margin between box and frame\newdimen\epsfframethickness % thickness of frame rules\newdimen\epsfrsize    % vertical size before scaling\newdimen\epsftmp      % register for arithmetic manipulation\newdimen\epsftsize    % horizontal size before scaling\newdimen\epsfxsize    % horizontal size after scaling\newdimen\epsfysize    % vertical size after scaling\newdimen\pspoints     % conversion factor%\pspoints = 1bp        % Adobe points are `big'\epsfxsize = 0pt       % default value, means `use natural size'\epsfysize = 0pt       % ditto\epsfframemargin = 0pt % default value: frame box flush around picture\epsfframethickness = 0.4pt % TeX's default rule thickness%\def\epsfbox#1{\global\def\epsfllx{72}\global\def\epsflly{72}%   \global\def\epsfurx{540}\global\def\epsfury{720}%   \def\lbracket{[}\def\testit{#1}\ifx\testit\lbracket   \let\next=\epsfgetlitbb\else\let\next=\epsfnormal\fi\next{#1}}%%% We use \epsfgetlitbb if the user specified an explicit bounding box,% and \epsfnormal otherwise.  Because \epsfgetbb can be called% separately to retrieve the bounding box, we move the verbose% printing the bounding box extents and size on the terminal to% \epsfstatus.  Therefore, when the user provided the bounding box,% \epsfgetbb will not be called, so we must call \epsfsetsize and% \epsfstatus ourselves.%\def\epsfgetlitbb#1#2 #3 #4 #5]#6{%   \epsfgrab #2 #3 #4 #5 .\\%   \epsfsetsize   \epsfstatus{#6}%   \epsfsetgraph{#6}%}%%\def\epsfnormal#1{%    \epsfgetbb{#1}%    \epsfsetgraph{#1}%}%%\newhelp\epsfnoopenhelp{The PostScript image file must be findable byTeX, i.e., somewhere in the TEXINPUTS (or equivalent) path.}%%\def\epsfgetbb#1{%%%   The first thing we need to do is to open the%   PostScript file, if possible.%    \openin\epsffilein=#1    \ifeof\epsffilein        \errhelp = \epsfnoopenhelp        \errmessage{Could not open file #1, ignoring it}%    \else                       %process the file        {%                      %start a group to contain catcode changes            % Make all special characters, except space, to be of type

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -