summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/eplain/base/test/usepackage.tex
blob: ab797823fe7da68de8daf309423fd044c5854ea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
% This file is public domain.
%
% Test \usepackage with packages:  color, graphicx, autopict, psfrag, url.
\input ../eplain

\beginpackages
  \usepackage[dvipsnames]{color}
  %\usepackage[draft,hidescale]{graphicx,autopict}\let\ttfamily\relax
  \usepackage{graphicx,autopict}
  \usepackage{psfrag}
  \usepackage[obeyspaces,spaces]{url}[2005/06/27]
\endpackages

%\enablehyperlinks

\ifpdf
  \pdfpagewidth=8.5in
  \pdfpageheight=11in
\fi

% The following redefinition works around a bug in pdftex.def v0.03m
% related to \pagecolor.
\ifpdf
\makeatletter
\ifx\GPT@outputbox\undefined
\def\set@page@color{%
  \@ifundefined{GPT@outputbox}{%
    % \newbox is outer in plain
    \csname newbox\endcsname\GPT@outputbox
  }{}%
  \global\let\current@page@color\current@color
  \@ifundefined{GPTorg@shipout}{%
    \global\let\GPTorg@shipout\shipout
    \gdef\shipout{%
      \afterassignment\GPT@shipout
      \global\setbox\GPT@outputbox=%
    }%
    \gdef\GPT@shipout{%
      \ifvoid\GPT@outputbox\relax
         \aftergroup\GPT@@shipout
         \GPT@pageliteral
      \else
        \GPTorg@shipout\vbox{%
          \GPT@pageliteral
          \box\GPT@outputbox
        }%
      \fi
    }%
    \gdef\GPT@@shipout{%
      \GPTorg@shipout\box\GPT@outputbox\relax
    }%
    \gdef\GPT@pageliteral{%
      \pdfliteral direct{%
        q % gsave
        \current@page@color\space
        n % newpath
        0 0 \strip@pt\pdfpagewidth\space
        \strip@pt\pdfpageheight\space re % rectangle
        % there is no need to convert to bp
        f % fill
        Q% grestore
      }%
    }%
  }{}%
}
\fi
\resetatcatcode
\fi


\pagecolor[rgb]{.3,.8,.95}

\centerline{\bf URL, color, rotation and scaling tests:}
\smallskip

{\color[rgb]{1,0.2,0.3} RGB-colored text. }Non-colored text.\par
{\color[cmyk]{.2,.7,.5,.1}CMYK-colored text. }Non-colored text.\par
{\color[gray]{.4} GRAY-colored text. }Non-colored text.\par
\definecolor{refcolor}{cmyk}{0.28,1,1,0.35}
{\color{refcolor}Defined color. }Non-colored text.\par
\colorbox{green}{Green-colored box.}\par
\colorbox[rgb]{1,0,0}{Red-colored box.}\par
%\fcolorbox doesn't work because plain TeX does not have LaTeX's \fbox
What is this:
\rotatebox[origin=c]{180}{\reflectbox{\color[rgb]{.5,.3,.3}%
  \hloff[url]\url{http : // tug . org / eplain}}}\par
Example of a line break inside a URL: \url{http://www.this.is.some/very.very.very.long.URL/which.goes.on/and.on/and.on.html}\par
\textcolor{red}{Predefined color `{\tt red}'. }Non-colored text.\par
\rotatebox{20}{\scalebox{2}[5]{\color[named]{DarkOrchid}Rotated,
  scaled, and colored text.}}\par
\resizebox{1in}{\height}{Some text $\sum$.}
  \resizebox*{1in}{\height}{Some text $\sum$.}
  \resizebox{1in}{!}{Some text $\sum$.}\par


\bigskip
\centerline{\bf \LaTeX's picture environment:}
\smallskip

\picture(50,50)
  \color{red}
  \thicklines
  \put(0,0){\line(1,1){50}}
  \color{blue}
  \put(40,0){\circle{50}}
  \put(0,0){\vector(1,0){50}}
  \color{green}
  \put(20,0){\circle*{12}}
  \put(55,40){\oval(80,70)[t]}
  \color{black}
  \put(55,40){\oval(50,30)}
  \bezier{0}(10,10)(40,90)(110,90)
  %\qbezier does not work
  %\qbezier[0](10,10)(40,90)(110,90)
\endpicture

\LaTeXbegin

\begin{picture}(40,40)
\put(0,0){\vector(1,1){40}}
\multiput(0,5)(10,10){4}{a}
\end{picture}

\vfil\eject


\pagecolor[named]{SkyBlue}

\centerline{\bf PSfrag test (uses {\tt example.eps} from the PSfrag package):}
\smallskip

\centerline{\includegraphics[width=3.5in]{example.eps}
\quad
\psfragscanon
\psfrag*{p1}[][l]{$\ast$}
\psfrag{p2}[][l]{$\ast$}
\psfrag{p3}{$\cos(t)$}
\includegraphics[width=3.5in]{example.eps}}


\bye

% Local variables:
% compile-command: "(cd .. && make eplain.tex) && pdftex --interact=nonstopmode usepackage.tex"
% compile-command: "(cd .. && make eplain.tex) && tex --interact=nonstopmode usepackage.tex && dvips -t letter usepackage.dvi -o"
% End: