summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/fancyvrb/t-fvrbex.tex
blob: fcc3de7801a947c06b120b14b14cbaacde308960 (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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
%%
%% This is file `t-fvrbex.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fvrb-ex.dtx  (with options: `t-fvrbex')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from t-fvrbex.tex.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file fvrb-ex.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%%
%% Package `fvrb-ex' (`fvrb-ex', `hbaw' and `hcolor')
%%
%% COPYING:
%% This package may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
%% Denis Girou (CNRS/IDRIS - France) <Denis.Girou@idris.fr> March 27, 1998
%%
%% File `t-fvrbex'
%%
\documentclass{article}

\usepackage[bawcolor,pstricks]{fvrb-ex}
\pstrickstrue
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[charter]{mathdesign}
\usepackage{url}
\usepackage{xcolor}

\begin{document}

\title{Test file for the `\textsf{fvrb-ex}' package}
\author{Denis Girou\\CNRS/IDRIS\\Orsay -- France\\
        {\footnotesize email: Denis.Girou@idris.fr}}
\date{Version 1.2\\March 27, 1998}

\maketitle

\RecustomVerbatimEnvironment{Verbatim}{Verbatim}
  {gobble=2,commentchar=^^a3,numbers=left,numbersep=3pt,frame=single}

\section{\texttt{Example} environment}

\begin{Verbatim}
  \begin{Example}
    First verbatim line.
    Second verbatim line.
    Third verbatim line.
  \end{Example}
\end{Verbatim}

\begin{Example}
  First verbatim line.
  Second verbatim line.
  Third verbatim line.
\end{Example}

\begin{Verbatim}
  \begin{Example}[frame=lines,framerule=1mm,numbers=left]
    First verbatim line.
    Second verbatim line.
    Third verbatim line.
  \end{Example}
\end{Verbatim}

\begin{Example}[frame=lines,framerule=1mm,numbers=left]
  First verbatim line.
  Second verbatim line.
  Third verbatim line.
\end{Example}

\section{\texttt{CenterExample} environment}

\begin{Verbatim}
  \begin{CenterExample}[frame=single,numbers=right]
    First verbatim line.
    Second verbatim line.
    Third verbatim line.
  \end{CenterExample}
\end{Verbatim}

\begin{CenterExample}[frame=single,numbers=right]
  First verbatim line.
  Second verbatim line.
  Third verbatim line.
\end{CenterExample}

\begin{Verbatim}
  \begin{CenterExample}[frame=lines,numbers=left]
    ^^a7HLa^^b5First^^b6 verbatim line.
    ^^a7HLb^^b5Second^^b6 verbatim line.
    ^^a7HLCBWz^^b5Third^^b6 verbatim line.
  \end{CenterExample}
\end{Verbatim}

\begin{CenterExample}[frame=lines,numbers=left]
  ^^a7HLa^^b5First^^b6 verbatim line.
  ^^a7HLb^^b5Second^^b6 verbatim line.
  ^^a7HLCBWz^^b5Third^^b6 verbatim line.
\end{CenterExample}

\section{\texttt{SideBySideExample} environment}

\begin{Verbatim}
  \begin{SideBySideExample}[xrightmargin=5cm,frame=lines,
                            numbers=left]
    First verbatim line.
    Second verbatim line.
    Third verbatim line.
  \end{SideBySideExample}
\end{Verbatim}

\begin{SideBySideExample}[xrightmargin=5cm,frame=single,numbers=left]
  First verbatim line.
  Second verbatim line.
  Third verbatim line.
\end{SideBySideExample}

\ifpstricks                     % If PSTricks is available

\section{\texttt{PCenterExample} environment}

\begin{Verbatim}
  \fvset{frame=lines,framerule=0.5mm,numbers=left}

  \begin{PCenterExample}(-0.5,-0.5)(0.5,0.5)
    \setlength{\unitlength}{1cm}
    \put(0,0){\circle{1}}
  \end{PCenterExample}

  \showgrid
  \begin{PCenterExample}(-1,-1)(1,1)
    \setlength{\unitlength}{1cm}
    \put(0,0){\circle{1}}
  \end{PCenterExample}
\end{Verbatim}

{\fvset{frame=lines,framerule=0.5mm,numbers=left}
\begin{PCenterExample}(-0.5,-0.5)(0.5,0.5)
  \setlength{\unitlength}{1cm}
  \put(0,0){\circle{1}}
\end{PCenterExample}
\showgrid
\begin{PCenterExample}(-1,-1)(1,1)
   \setlength{\unitlength}{1cm}
   \put(0,0){\circle{1}}
\end{PCenterExample}
}

\section{\texttt{PSideBySideExample} environment}

\begin{Verbatim}
  \fvset{frame=single,xrightmargin=5cm}
  \begin{PSideBySideExample}(-2,-1)(2,1)
    \psellipse*[linecolor=yellow](2,1)
  \end{PSideBySideExample}
  \showgrid
  \begin{PSideBySideExample}(-2,-1)(2,1)
    \psellipse[linestyle=dashed](2,1)
  \end{PSideBySideExample}
\end{Verbatim}

{\fvset{frame=single,xrightmargin=5cm}
\begin{PSideBySideExample}(-2,-1)(2,1)
  \psellipse*[linecolor=yellow](2,1)
\end{PSideBySideExample}

\showgrid
\begin{PSideBySideExample}(-2,-1)(2,1)
  \psellipse[linestyle=dashed](2,1)
\end{PSideBySideExample}
}

\begin{Verbatim}
  \fvset{frame=single,xrightmargin=5cm}
  \begin{PSideBySideExample}(-2,-1)(2,1)
    \psellipse[linestyle=^^a7HLCBWe^^b5dashed^^b6](2,1)
  \end{PSideBySideExample}
  \begin{PSideBySideExample}[numbers=right](-2,-1)(2,1)
    \psellipse[linestyle=^^a7HLe^^b5dotted^^b6](2,1)
  \end{PSideBySideExample}
\end{Verbatim}

{\fvset{frame=single,xrightmargin=5cm}
\begin{PSideBySideExample}(-2,-1)(2,1)
  \psellipse[linestyle=^^a7HLCBWe^^b5dashed^^b6](2,1)
\end{PSideBySideExample}
\begin{PSideBySideExample}[numbers=right](-2,-1)(2,1)
  \psellipse[linestyle=^^a7HLe^^b5dotted^^b6](2,1)
\end{PSideBySideExample}

\else                           % If PSTricks is not available
\begin{quote}
  \section{\texttt{PCenterExample} and \texttt{PSideBySideExample}
environments}

  \textbf{\large Warning!} These two environments are not demonstrated here,
because PSTricks was not found on this platform.
\end{quote}
\fi

\end{document}
\endinput
%%
%% End of file `t-fvrbex.tex'.