home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 3 / Meeting_Pearls_III.iso / Pearls / texmf / inputs / latex / unpacked / tracefnt.sty < prev    next >
Encoding:
Text File  |  1995-06-21  |  9.6 KB  |  287 lines

  1. %% 
  2. %% This is file `tracefnt.sty', generated 
  3. %% on <1995/6/21> with the docstrip utility (2.2i).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% ltfsstrc.dtx  (with options: `package,trace')
  8. %% 
  9. %% This is a generated file. 
  10. %% 
  11. %% Copyright 1993-1995 the LaTeX3 project and any individual authors 
  12. %% listed elsewhere in this file. All rights reserved. 
  13. %% 
  14. %% For further copyright information see the file legal.txt, and any 
  15. %% other copyright notices in this file. 
  16. %% 
  17. %% This file is part of the LaTeX2e system. 
  18. %% ---------------------------------------- 
  19. %% This system is distributed in the hope that it will be useful, 
  20. %% but WITHOUT ANY WARRANTY; without even the implied warranty of 
  21. %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
  22. %% 
  23. %% For error reports concerning UNCHANGED versions of this file no more 
  24. %% than one year old, see bugs.txt. 
  25. %% 
  26. %% Please do not request updates from us directly. Primary 
  27. %% distribution is through the CTAN archives. 
  28. %% 
  29. %% 
  30. %% IMPORTANT COPYRIGHT NOTICE: 
  31. %% 
  32. %% You are NOT ALLOWED to distribute this file alone. 
  33. %% 
  34. %% You are allowed to distribute this file under the condition that it is 
  35. %% distributed together with all the files listed in manifest.txt. 
  36. %% 
  37. %% If you receive only some of these files from someone, complain! 
  38. %% 
  39. %% Permission is granted to copy this file to another file with a clearly 
  40. %% different name and to customize the declarations in that copy to serve 
  41. %% the needs of your installation, provided that you comply with 
  42. %% the conditions in the file legal.txt. 
  43. %% 
  44. %% However, NO PERMISSION is granted to generate or to distribute a 
  45. %% modified version of this file under its original name. 
  46. %% 
  47. %% You are NOT ALLOWED to change this file. 
  48. %% 
  49. %% 
  50. %% MODIFICATION ADVICE: 
  51. %% 
  52. %% If you want to customize this file, it is best to make a copy of the 
  53. %% source file(s) from which it was produced. Use a different name for 
  54. %% your copy(ies) and modify the copy(ies); this will ensure that your 
  55. %% modifications do not get overwritten when you install a new release of 
  56. %% the standard system. You should also ensure that your modified source 
  57. %% file does not generate any modified file with the same name as a 
  58. %% standard file. You can then easily distribute your modifications by 
  59. %% distributing the modified and renamed copy of the source file, taking 
  60. %% care to observe the conditions in legal.txt; this will ensure that 
  61. %% other users can safely use your modifications. 
  62. %% 
  63. %% You will also need to produce your own, suitably named, .ins file to 
  64. %% control the generation of files from your source file; this file 
  65. %% should contain your own preambles for the files it generates, not 
  66. %% those in the standard .ins files. 
  67. %% 
  68. %% The names of the source files used are shown above. 
  69. %% 
  70. %% 
  71. %%% File: ltfsstrc
  72. %% Copyright (C) 1989-94 by Frank Mittelbach and Rainer Sch\"opf.
  73. %% Copyright (C) 1994-95 by LaTeX3 project. All rights reserved.
  74. \NeedsTeXFormat{LaTeX2e}[1995/05/16]
  75. \ProvidesPackage{tracefnt}
  76.      [1995/06/15 v3.0b  Standard LaTeX package (font tracing)]
  77. \newcount\tracingfonts
  78. \tracingfonts=0
  79. \DeclareOption{errorshow}{%
  80.    \def\@font@info#1{%
  81.          \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
  82.                      {LaTeX Font Info: \space\space\space#1}}%
  83.     \def\@font@warning#1{%
  84.          \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
  85.                         {LaTeX Font Warning: #1}}%
  86.      }
  87. \DeclareOption{warningshow}{%
  88.    \def\@font@info#1{%
  89.          \GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
  90.                      {LaTeX Font Info: \space\space\space#1}}%
  91.     \def\@font@warning#1{%
  92.          \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
  93.                         {LaTeX Font Warning: #1}}%
  94.      }
  95. \DeclareOption{infoshow}{%
  96.    \def\@font@info#1{%
  97.          \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
  98.                      {LaTeX Font Info: \space\space\space#1}}%
  99.     \def\@font@warning#1{%
  100.          \GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
  101.                         {LaTeX Font Warning: #1}}%
  102.      }
  103. \DeclareOption{loading}{%
  104.     \tracingfonts\tw@
  105.    }
  106. \DeclareOption{debugshow}{%
  107.     \ExecuteOptions{infoshow}%
  108.     \tracingfonts\thr@@
  109.    }
  110. \DeclareOption{pausing}{%
  111.     \def\@font@warning#1{%
  112.       \GenericError
  113.              {(Font)\@spaces\@spaces\@spaces\space\space}%
  114.              {LaTeX Font Warning: #1}%
  115.              {See the LaTeX Companion for details.}%
  116.              {I'll stop for every LaTeX Font Warning because
  117.               you requested\\the `pausing' option
  118.               to the tracefnt package.}}%
  119.    }
  120. \ExecuteOptions{infoshow}
  121. \ProcessOptions
  122. \def\extract@font{%
  123.    \get@external@font
  124.    \global\expandafter\font\font@name\external@font\relax
  125.     \ifnum \tracingfonts >\@ne
  126.     \@font@info{External font `\external@font'
  127.               loaded as\MessageBreak \font@name}\fi
  128.     \font@name \relax
  129.     \csname \f@encoding+\f@family\endcsname
  130.     \csname\curr@fontshape\endcsname
  131.     \relax
  132.        }
  133. \DeclareRobustCommand\selectfont
  134.         {%
  135.     \ifx\f@linespread\baselinestretch \else
  136.       \set@fontsize\baselinestretch\f@size\f@baselineskip \fi
  137.     \xdef\font@name{%
  138.       \csname\curr@fontshape/\f@size\endcsname}%
  139.     \pickup@font
  140.     \font@name
  141.     \ifnum \tracingfonts>\tw@
  142.       \@font@info{Switching to \font@name}\fi
  143.     \size@update
  144.     \enc@update
  145.     }
  146. \def\set@fontsize#1#2#3{%
  147.     \@defaultunits\@tempdimb#2pt\relax\@nnil
  148.     \edef\f@size{\strip@pt\@tempdimb}%
  149.     \@defaultunits\@tempskipa#3pt\relax\@nnil
  150.     \edef\f@baselineskip{\the\@tempskipa}%
  151.     \edef\f@linespread{#1}%
  152.     \let\baselinestretch\f@linespread
  153.       \def\size@update{%
  154.         \baselineskip\f@baselineskip\relax
  155.         \baselineskip\f@linespread\baselineskip
  156.         \normalbaselineskip\baselineskip
  157.         \setbox\strutbox\hbox{%
  158.           \vrule\@height.7\baselineskip
  159.                 \@depth.3\baselineskip
  160.                 \@width\z@}%
  161.    \ifnum \tracingfonts>\tw@
  162.       \ifx\f@linespread\@empty
  163.         \let\reserved@a\@empty
  164.       \else
  165.         \def\reserved@a{\f@linespread x}%
  166.       \fi
  167.       \@font@info{Changing size to \f@size/\reserved@a
  168.                 \f@baselineskip}%
  169.       \aftergroup\type@restoreinfo \fi
  170.         \let\size@update\relax}%
  171.   }
  172. \let\size@update\relax
  173.    \def\type@restoreinfo{%
  174.       \ifx\f@linespread\@empty
  175.         \let\reserved@a\@empty
  176.       \else
  177.         \def\reserved@a{\f@linespread x}%
  178.       \fi
  179.       \@font@info{Restoring size to
  180.                 \f@size/\reserved@a\f@baselineskip}}
  181. \def\glb@settings{%
  182.      \expandafter\ifx\csname S@\f@size\endcsname\relax
  183.        \calculate@math@sizes
  184.      \fi
  185.      \csname S@\f@size\endcsname
  186.      \ifmath@fonts
  187.        \ifnum \tracingfonts>\tw@
  188.          \@font@info{Setting up math fonts for
  189.                      \f@size/\f@baselineskip}\fi
  190.        \begingroup
  191.          \escapechar\m@ne
  192.          \csname mv@\math@version \endcsname
  193.          \globaldefs\@ne
  194.          \math@fonts
  195.          \let \glb@currsize \f@size
  196.        \endgroup
  197.         \the\every@math@size
  198.        \else
  199.          \ifnum \tracingfonts>\tw@
  200.            \@font@info{No math setup for
  201.                        \f@size/\f@baselineskip}\fi
  202.      \fi
  203. }
  204. \def\check@mathfonts{%
  205.   \ifx \glb@currsize \f@size
  206.     \ifnum \tracingfonts>\thr@@
  207.         \@font@info{*** MATH: no change \f@size\space
  208.          curr/global (\curr@math@size/\glb@currsize)}\fi
  209.   \else
  210.     \ifnum \tracingfonts>\thr@@
  211.         \@font@info{*** MATH: setting up \f@size\space
  212.          curr/global (\curr@math@size/\glb@currsize)}\fi
  213.      \glb@settings
  214.      \if@inmath
  215.        \aftergroup\restglb@settings
  216.      \else
  217.        \ifnum \tracingfonts>\thr@@
  218.         \@font@info{*** MATH: no resetting (not in
  219.                     nested math)}\fi
  220.      \fi
  221.   \fi
  222.   \let\curr@math@size\f@size
  223.   \@inmathtrue
  224. }
  225. \def\restglb@settings{%
  226.     \ifnum \tracingfonts>\thr@@
  227.         \@font@info{*** MATH: restoring}\fi
  228.       \begingroup
  229.         \let\f@size\curr@math@size
  230.         \ifx\glb@currsize \f@size
  231.     \ifnum \tracingfonts>\thr@@
  232.         \@font@info{*** MATH: ... already okay (\f@size)}\fi
  233.         \else
  234.     \ifnum \tracingfonts>\thr@@
  235.         \@font@info{*** MATH: ... to \f@size}\fi
  236.           \glb@settings
  237.         \fi
  238.       \endgroup
  239. }
  240. \def\use@mathgroup#1#2{\relax\ifmmode
  241.   \ifnum \tracingfonts>\tw@
  242.     \count@#2\relax
  243.     \@font@info{Using \noexpand\mathgroup
  244.              (\the\count@) #2}\fi
  245.      \math@bgroup
  246.          \expandafter\ifx\csname M@\f@encoding\endcsname#1\else
  247.          #1\fi
  248.          \mathgroup#2\relax
  249.      \expandafter\math@egroup\fi}%
  250.   \ifx\math@bgroup\begingroup
  251.     \def\math@egroup#1{#1\endgroup
  252.       \ifnum \tracingfonts>\tw@
  253.      \@font@info{Restoring \noexpand\mathgroup
  254.         (\ifnum\mathgroup=\m@ne default\else \the\mathgroup \fi)%
  255.         }\fi}
  256.   \fi
  257. \def\getanddefine@fonts#1#2{%
  258.   \ifnum \tracingfonts>\tw@
  259.   \count@#1\relax
  260.     \@font@info{\noexpand\mathgroup (\the\count@) #1 :=\MessageBreak
  261.               \string#2 \tf@size/\sf@size/\ssf@size}\fi
  262.   \xdef\font@name{\csname \string#2/\tf@size\endcsname}%
  263.   \pickup@font \let\textfont@name\font@name
  264.   \xdef\font@name{\csname \string#2/\sf@size\endcsname}%
  265.   \pickup@font \let\scriptfont@name\font@name
  266.   \xdef\font@name{\csname \string#2/\ssf@size\endcsname}%
  267.   \pickup@font
  268.   \edef\math@fonts{\math@fonts
  269.                \textfont#1\textfont@name
  270.                \scriptfont#1\scriptfont@name
  271.                \scriptscriptfont#1\font@name}%
  272.     }
  273. %% this could be replaced by \try@size@range making the subst slower!
  274. \def\execute@size@function#1{%
  275.          \@ifundefined{s@fct@#1}%
  276.            {\errmessage{Undefined font size function #1}%
  277.             \s@fct@}%
  278.            {\csname s@fct@#1\endcsname}%
  279. }
  280. \def\fontsubfuzz{0pt}
  281. %%\subst@size             %% coded inline
  282. %%\def\subst@size{%
  283. %%}
  284. \endinput
  285. %% 
  286. %% End of file `tracefnt.sty'.
  287.