home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / macros / contrib / prettyref.sty < prev    next >
Encoding:
Text File  |  1995-03-15  |  1.5 KB  |  61 lines

  1. %% 
  2. %% This is file `prettyref.sty', generated 
  3. %% on <1995/3/5> with the docstrip utility (2.2i).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% prettyref.dtx  (with options: `style')
  8. %% 
  9. %% Copyright (c) 1995 Kevin Ruland 
  10. %% 
  11. %%
  12. %% prettyref v1.0
  13. %%
  14. %% Copyright 1995.  by Kevin Ruland kevin@rodin.wustl.edu
  15. %%
  16. \ProvidesPackage{prettyref}
  17. \long\def\@firstofthree#1#2#3{#1}
  18. \long\def\@secondofthree#1#2#3{#2}
  19. \long\def\@thirdofthree#1#2#3{#3}
  20. \def\pr@table#1#2{Table #1}
  21. \def\pr@eq#1#2{\textup{(#1)}}
  22. \def\pr@lemma#1#2{Lemma #1}
  23. \def\pr@thm#1#2{Theorem #1}
  24. \def\pr@section#1#2{Section #1}
  25. \def\pr@figure#1#2{Figure #1}
  26. \def\@setref#1#2#3{%
  27.   \ifx#1\relax
  28.    \protect\G@refundefinedtrue
  29.    \nfss@text{\reset@font\bfseries ??}%
  30.    \@latex@warning{Reference `#3' on page \thepage \space
  31.              undefined}%
  32.   \else
  33.    \expandafter#2#1\null
  34.   \fi}
  35. \def\ref#1{%
  36.   \expandafter\@setref\csname r@#1\endcsname\@firstofthree{#1}}
  37. \def\pageref#1{%
  38.   \expandafter\@setref\csname r@#1\endcsname\@secondofthree{#1}}
  39. \def\prettyref#1{%
  40.   \expandafter\@setref\csname r@#1\endcsname\@thirdofthree{#1}}
  41. \def\@prettylabel#1[#2]{
  42.   \@bsphack
  43.   \protected@write\@auxout{}%
  44.     {\string\newlabel{#1}%
  45.      {{\@currentlabel}{\thepage}%
  46.       {\csname pr@#2\endcsname\@currentlabel\thepage}}}%
  47.   \@esphack}
  48. \def\@noprettylabel#1{
  49.   \@bsphack
  50.   \protected@write\@auxout{}%
  51.     {\string\newlabel{#1}%
  52.      {{\@currentlabel}{\thepage}%
  53.       {\pr@eq\@currentlabel\thepage}}}%
  54.   \@esphack}
  55. \def\label#1{
  56. \@ifnextchar[{\@prettylabel{#1}}{\@noprettylabel{#1}}
  57. }
  58. \endinput
  59. %% 
  60. %% End of file `prettyref.sty'.
  61.