summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/vrsion/vrsion.dtx
blob: 77757838063fdac381c09cd7d14098f75fee4e3a (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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
%   
%  \iffalse  
% 
%    The first part is a comment to the reader(s) of `vrsion.dtx'.
%
%  vrsion.dtx    version 1.5.a, June 5, 1998
%  (c) 1994-1998 by Mats Dahlgren  (matsd@sssk.se)
%
%  Please see the information in file `vrsion.ins' on how you 
%  may use and (re-)distribute this file.  Run LaTeX on the file 
%  `vrsion.ins' to get a .sty-file and on vrsion.dtx to obtain the 
%  instructions.
%
%  This file may NOT be distributed if not accompanied by 'vrsion.ins'.
%
%<*driver>
\documentclass[a4paper]{ltxdoc}
\textwidth=150mm
\textheight=210mm
\topmargin=0mm
\oddsidemargin=5mm
\evensidemargin=5mm
\RecordChanges
%\begin{document}
  \DocInput{vrsion.dtx} 
%  \PrintChanges
\end{document}
%</driver>
%  \fi
%
%  \CheckSum{804}
%  
%  \def\filename{vrsion.dtx}
%  \def\fileversion{1.5}
%  \def\filedate{1997/07/16}\def\docdate{1998/06/05}
%  \date{\docdate}
%  \changes{1.0}{1994/12/28}{First version of `version' package.}
%  \changes{1.1}{1995/05/15}{Fixed extra spaces and warning in 
%  the documentation that \texttt{\textbackslash version} is a fragile 
%  command.  Also changed the name of the package.}
%  \changes{1.2}{1995/05/31}{Fixed \textsf{babel} 
%  incompatibility and made \texttt{\textbackslash version} robust.}
%  \changes{1.3}{1996/02/08}{Cosmetics in the installation 
%  routine, adjustments to changes in \textsf{babel}, making use 
%  of \textsf{xspace} if loaded, and a working solution to 
%  problems with \texttt{\textbackslash maketitle} command.}
%  \changes{1.4}{1996/06/25}{Fixed incompatibility with the 
%  \textsf{koma-script} package.}
%  \changes{1.41}{1997/02/22}{Upgraded documentation.}
%  \changes{1.5}{1997/07/16}{Adjusted \textsf{babel} compatibility 
%  to work with \textsf{babel} v.3.6h}
%  \MakeShortVerb{\|}
%  \title{\textsf{vrsion}\\ -- a \LaTeX{} Macro for version Numbering of 
%  Files\thanks{This document describes \textsf{vrsion} version 
%  \fileversion , and was last revised on \docdate.}}
%  \author{Mats Dahlgren\footnote{Email:\ \texttt{matsd@sssk.se}\ \ \ 
%  Web:\ \texttt{http://www.homenet.se/matsd/}}}  
%  \begin{document}
%  \maketitle  
%  \begin{abstract}
%  The \textsf{vrsion} package provides a user-friendly way to
%  introduce file version numbers in \LaTeX{} documents. 
%  It remembers the previous version number, also when
%  the |.aux|-file is corrupted (due to errors in the
%  \LaTeX{} run).\\ \small This file and the package:\
%  Copyright \copyright\ 1994-98 by Mats Dahlgren.  All rights
%  reserved. 
%  \end{abstract}
%    
%  \section{Introduction}
%  \DescribeMacro\version
%  This package provides one command, |\version|, which
%  puts a version number where it appears.  The version
%  number is increased each time \LaTeX{} is run,
%  \textit{i.e.}\ it numbers the |.dvi|-file.  If the
%  package is loaded but the command |\version| is not
%  issued, the present version number is preserved. 
%  Numbering can be incremented at three different levels: 
%  units, tenths, and hundreds.  A change between two of these 
%  is obtained by changing the package option.  After a change
%  of steplength, the previous version number is
%  incremented with the new steplength.  The version number
%  can be held constant by using the command
%  \DescribeMacro\keepversion
%  |\keepversion|; this enables the version number to be
%  printed without being increased.  (|\keepversion| can be
%  \DescribeMacro\stepversion
%  overridden by the command |\stepversion|.) 
%  
%  This userguide is also available in \texttt{.pdf}-format 
%  on the internet.  It is found from my \LaTeX\ web page: 
%  \texttt{http://www.homenet.se/matsd/latex/}
%   
%  \section{Userguide}
%  \subsection{Requirements}     
%  The file |vrsion.sty| must be available in the user's
%  |TEXINPUTS| directories. It requires \LaTeXe{} of
%  1996/12/01 (or newer). 
%  
%  \subsection{Usage}
%  The package is included by stating \\
%  |  \usepackage[|\textit{option}|]{vrsion}|\\
%  \DescribeMacro{one} \DescribeMacro{ten}
%  \DescribeMacro{hundred} \DescribeMacro{xspace}
%  in the document preamble.  It can take one of the 
%  options |one|, |ten|, and |hundred|, and in addition |xspace|. 
%  To produce a 
%  version number anywhere in your document you issue the 
%  \DescribeMacro\version
%  command |\version| at the desired place in your \LaTeX{}
%  input file.\footnote{Notice that the text ``version''
%  is \textit{not} produced by the
%  \texttt{\textbackslash version} command.}  The 
%  version number will then be incremented  each time you
%  run \LaTeX{} on the file.  The command |\version| is 
%  robust.\footnote{Thanks to Timothy Robertson 
%  (\texttt{timothyr@cmbr.phys.cmu.edu}) for bringing my 
%  attention to the problem of \texttt{\textbackslash version} 
%  being fragile.}  Depending on the  option
%  used, the version number will be an integer (no  option
%  or option |one|), a number with one decimal  (option
%  |ten|), or a two-decimal number (option  |hundred|). 
%  If the option |xspace| is specified, the \textsf{xspace} 
%  package is loaded and its features are benefited from.  (If 
%  the \textsf{xspace} package is loaded by a separate 
%  |\usepackage| statement or by another package, its features 
%  are used by \textsf{vrsion}.)  
%  
%  When changing from one option (of |one|, |ten|, or |hundred|) 
%  to another,  the previous
%  format of the version number will be  changed according
%  to the new option.  If a smaller  increment is
%  specified, the next increment will simply  append one
%  digit |1| to the old version number; \textit{e.g.}\  a
%  change from option |ten| to |hundred| after version  3.2
%  will result in version 3.21.  If a larger  increment is
%  specified, the old version number will be truncated
%  before the increment; \textit{e.g.}\  a change from     
%  option |hundred| to |ten| after version 3.25
%  will  result in version 3.3.  You should (normally) not
%  use the  command |\version| more once in a document. 
%  The version number is stored in a file with  extension
%  `|vrs|' in the default directory.  (The  full name of this
%  file is |\jobname.vrs|.) 
%  
%  If you want your document to contain a version 
%  number without having it incremented each time
%  you run \LaTeX{}, you should issue the command 
%  \DescribeMacro\keepversion
%  |\keepversion| in the document (preamble).  This 
%  switches off the incrementation mechanism and prevents
%  the package from writing an updated |.vrs|-file.  
%  The |\keepversion| command can be cancelled at 
%  any later place in the document by issuing the 
%  \DescribeMacro\stepversion
%  command |\stepversion|.  The action taken by the 
%  |\version| command is determined by which of these
%  two was last issued.
%  
%  Typically, you would load the \textsf{vrsion} package 
%  with the desired option and use the command 
%  |\version| where you want your document to state 
%  its version number.  Normally, you would have the
%  |\keepversion| command in the preamble, but 
%  comment it out on the first \LaTeX{} run when you 
%  prepare to print a new version and then have the 
%  |\keepversion| in action during the \LaTeX{} runs 
%  needed to resolve the references.
%  
%  When it is desired to repeat the version number
%  several times in a document, issue a 
%  |\keepversion| directly after the first use of 
%  |\version|.  This will then produce the same 
%  version number at all occurrences; and the version
%  number will be incremented according to the use of 
%  |\keepversion| in the preamble.  
%  
%  If the increase of the version number is to occur 
%  at any stage later than the fist occurrence of 
%  |\version|, the occurrence of |\version| 
%  which is to increase the version number should be
%  preceeded by a |\stepversion| command (and 
%  followed by |\keepversion| to prevent further
%  increments).  The author can not think of any 
%  reason why this should be desired, but it can be 
%  achieved anyway$\ldots$
%  
%  \subsection{Known Problems}
%  \begin{itemize}
%  \item At the present (\filedate), \textsf{vrsion} does not 
%  work properly with neither the \textsf{letter} nor the 
%  \textsf{scrlettr} document classes.  
%  \item The |\vrsion| package is not working properly with the
%  |\include{|\textit{file}|}| command; use |\input{|\textit{file}|}| 
%  instead.
%  \item If the command |\version| is issued more than once
%  in a document,   the version number will be incremented
%  at each occurrence and produce   different version
%  numbers at the different occurrences (unless  
%  |\keepversion| is in effect).  This may typically be a 
%  problem if you use |\version| in the page header or footer. 
%  This is avoided if |\keepversion| is issued somewhere on the 
%  second page.
%  \end{itemize} 
%  
%  \section{History}
%  The first version of the package was released in late 
%  December of 1994.  The package
%  was created with useful help and ideas from Johan
%  Fr\"oberg (\texttt{emgion@physchem.kth.se}). \par
%  The \textsf{vrsion} package version \fileversion{} has 
%  been tested with \LaTeXe{} of 1997/06/01
%  using MiK\TeX\ 1.07 running
%  \TeX{} 3.14159 under Win95. Please send bug reports
%  (see below), corrections, additions, suggestions,
%  \textit{etc.}\ to me at \texttt{matsd@sssk.se}. 
%  
%  \subsection{Changes from previous versions}
%  
%  In \textsf{vrsion} (|version|) version 1.0 the macro 
%  |\@skrivner| caused extra 
%  space to be inserted in front of the version number.  With 
%  \textsf{vrsion} version 1.1 and later this is avoided.  
%  
%  In version 1.1 the \textsf{vrsion} package had incompatibility 
%  problems with the \textsf{babel} package.\footnote{Thanks to Peter 
%  Ryder (\texttt{ryder@theo.physik.uni-bremen.de}) for 
%  bringing my attention to this problem.}  With \textsf{vrsion} 
%  version 1.2 this problem is eliminated.  Also, the command 
%  |\version| has been made robust.  
%  
%  In version 1.3, some adjustments to changes in the \textsf{babel} 
%  package have been made,\footnote{Thanks to Cornelius C.\ Noack 
%  (\texttt{noack@physik.uni-bremen.de}) for bringing my attention to 
%  the re-appearance of the \textsf{babel} incompatibility.}   
%  if the \textsf{xspace} package is 
%  loaded, its features are made use of.  Also, some problems with 
%  |\maketitle| issuing extra blank page(s) have been 
%  eliminated,\footnote{Thanks to Ludek Matyska (\texttt{ludek@muni.cz})
%  for pointing out this problem.}   it 
%  seems (at least for the \textsf{article}, \textsf{report}, and 
%  \textsf{book} classes).  Furthermore, some cosmetics 
%  in the installation routine have been added.
%  
%  Version 1.4 eliminated an incompatibility with 
%  the \textsf{koma-script} package. The incompatibility was that 
%  some features of \textsf{koma-script}'s version of the 
%  |\maketitle| command were lost when \textsf{vrsion} was 
%  loaded.\footnote{Thanks to Christofer P.\ Baron 
%  (\texttt{baron@iml.fgh.de}) for bringing my attention to this 
%  problem.}  Furthermore, some |\typeout| statements have been 
%  removed and the processing order of some of the macro 
%  definitions has been changed.
%  
%  With \textsf{babel} version 3.6 the incompatibility between
%  the \textsf{vrsion} and \textsf{babel} packages was apperaring
%  again.\footnote{Due to an internal change of the \textsf{babel}
%  code}  In \textsf{vrsion} version 1.5 this is adjusted.  
%  
%  \section{Sending a Bug Report}
%  \textsf{vrsion} is most likely to contain bugs.
%  Reports of bugs in the package are most welcome.  
%  When filing a bug report,
%  please take the following actions:
%  \begin{enumerate}
%  \item Ensure your problem is not due to your inputfile;
%  \item Ensure your problem is not due to 
%     your own package(s) or class(es);
%  \item Ensure your problem is not covered in the section 
%     ''Known Problems'' above;
%  \item  Try to locate the problem by writing a minimal 
%     \LaTeX{} input file which reproduces the problem.  
%     Include the command\\ 
%     |  \setcounter{errorcontextlines}{999}|\\ 
%     in your input;
%  \item Run your file through \LaTeX ;
%  \item Send a description of your problem, the input file 
%     and the log file via e-mail to:\\  \hspace*{5mm}
%     \texttt{matsd@sssk.se}.
%  \end{enumerate}
%  
%  
%  {\itshape Enjoy your \LaTeX!\raisebox{-\baselineskip}{mats d.}}
%  \StopEventually{\par\vfill\hfill{\scriptsize Copyright
%    \copyright{} 1996-98 by Mats Dahlgren.}}
%  
%  
%  \section{The Code} 
%  For the interested reader(s), here is a short description 
%  of the code.
%
%  First, the package should identify itself:
% \iffalse
%<*paketkod>
% \fi
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesPackage{vrsion}%
  [1997/07/16 version numbering of LaTeX files (v.1.5).]
%    \end{macrocode}
%  \par Some counters and booleans used 
%  are to be defined first.  Also the user commands 
%  |\keepversion| and |\stepversion|, which only (re-)set 
%  the |Keepversion| boolean, are defined.
%    \begin{macrocode}
\newcounter{versionnr}
\newcounter{versionnrten}[versionnr]
\newcounter{versionnrhundred}[versionnrten]
\@addtoreset{versionnrhundred}{versionnr}
\newif\ifKeepversion \Keepversionfalse
\newif\ifxspc \xspcfalse
\newcommand{\keepversion}{\global\Keepversiontrue}
\newcommand{\stepversion}{\global\Keepversionfalse}
%    \end{macrocode}
%  \par Next, the options are declared.  The declaration of
%  option |one| is the default version of the |\version| 
%  macro.  If the boolean 
%  |Keepversion| (set by the command |\keepversion|) is 
%  true, no increase of the version number is preformed, 
%  nor is anything written to the |.vrs|-file.  The command 
%  |\@skrivner| is responsible for writing the |.vrs|-file  
%  (``skriv ner'' is Swedish for ``write down'').
%    \begin{macrocode}
\DeclareOption{one}{%
\DeclareRobustCommand{\version}{%
  \ifKeepversion \else 
    \stepcounter{versionnr}% 
    \@skrivner
  \fi
  \theversionnr%
  \@ifundefined{xspace}{}{\xspace}%
}
}
%    \end{macrocode}
%  The |ten| option modifies the |\version| command to 
%  produce a decimal number and steps the integer version 
%  number if the decimal part reaches 10.  
%    \begin{macrocode}
\DeclareOption{ten}{%
  \DeclareRobustCommand{\version}{%
    \ifKeepversion \else
      \stepcounter{versionnrten}%
      \ifnum\theversionnrten=10\stepcounter{versionnr} \fi
      \@skrivner
    \fi
    \theversionnr .\theversionnrten%
    \@ifundefined{xspace}{}{\xspace}%
  }
}
%    \end{macrocode}
%  The option |hundred| does the same as |ten|, but with 
%  a two-decimal number.
%    \begin{macrocode}
\DeclareOption{hundred}{%
  \DeclareRobustCommand{\version}{%
    \ifKeepversion \else 
      \stepcounter{versionnrhundred}%
      \ifnum\theversionnrhundred=10\stepcounter{versionnrten} \fi
      \ifnum\theversionnrten=10\stepcounter{versionnr} \fi
      \@skrivner
    \fi
    \theversionnr .\theversionnrten\theversionnrhundred%
    \@ifundefined{xspace}{}{\xspace}%
  }
}
%    \end{macrocode}
%  The |xspace| option, which only forces the \textsf{xspace} package 
%  to be loaded, is quite short in the code:
%    \begin{macrocode}
\DeclareOption{xspace}{\global\xspctrue}
%    \end{macrocode}
%  All other options which may be specified are to be 
%  ignored:
%    \begin{macrocode}
\DeclareOption*{\OptionNotUsed}
%    \end{macrocode}
%  \par Now we can process the options, and -- if requested --  load 
%  the \textsf{xspace} package.
%    \begin{macrocode}
\ExecuteOptions{one}
\ProcessOptions
\ifxspc\RequirePackage{xspace}\fi
%    \end{macrocode}
%  \par Now the task is to define the internals.  The macro 
%  |\vrsFile| simply holds the name of the |.vrs|-file to 
%  use.  The macro |\@skrivner| writes the version number 
%  counters to a file
%  in a format which is easy to deal with in 
%  \LaTeX{}, a name-wise change\footnote{This was nessecary 
%  to make \texttt{vrsion} compatible with \textsf{babel}.} 
%  of the the ordinary |\label| format.  The internal 
%  macro |\@vrs| is used to avoid problems with label 
%  change warnings and to avoid trouble with missing 
%  version number information in the |.aux|-file when 
%  |\keepversion| is used.  As an aid, the dummy-counter 
%  |VrsNr| is used.
%    \begin{macrocode}
\def\vrsFile{\jobname.vrs}
\newwrite\@vrs
\newcounter{VrsNr}
\def\@skrivner{%
  \setcounter{VrsNr}{\@partaux}%
  \addtocounter{VrsNr}{1}%
  \let\@vrs=\theVrsNr%
  \immediate\openout\@vrs\vrsFile%
  \immediate\write\@vrs{\relax}%
  \immediate\write\@vrs{%
    \string\vrslabel{versionsnummer}{{\theversionnr}{\thepage}}}%
  \immediate\write\@vrs{%
    \string\vrslabel{versionsnummertio}{{\theversionnrten}{\thepage}}}%
  \immediate\write\@vrs{%
    \string\vrslabel{versionsnummerhundra}{{\theversionnrhundred}{\thepage}}
}%
  \immediate\closeout\@vrs{}%
}
%    \end{macrocode}
%  \par\textsf{babel} compatibility 
%  is obtained by defining special |\label| and |\ref| commands.
%    \begin{macrocode}
\@ifundefined{org@ref}{\let\vrsref=\ref}{\let\vrsref=\org@ref}
\@ifundefined{org@newlabel}{\let\vrslabel=\newlabel}%
{\let\vrslabel=\org@newlabel}
%    \end{macrocode}
%  \par If it exists, the file |\jobname.vrs| should 
%  be read, and the counters set accordingly.  If this file
%  is missing, the counters should be zero.
%    \begin{macrocode}
\IfFileExists{\vrsFile}{\@@input\vrsFile%
    \setcounter{versionnr}{\vrsref{versionsnummer}}%
    \setcounter{versionnrten}{\vrsref{versionsnummertio}}%
    \setcounter{versionnrhundred}{\vrsref{versionsnummerhundra}}%
  }{%
    \typeout{No file \vrsFile.}%
    \setcounter{versionnr}{\z@}%
    \setcounter{versionnrten}{\z@}%
    \setcounter{versionnrhundred}{\z@}%
}
%    \end{macrocode}
%  \par To prevent |\maketitle| from creating extra blank pages, 
%  some commands from the \LaTeXe{} kernel have to be slightly 
%  modified.  To make sure we use the desired definitions, the 
%  changes are issued in an |\AtBeginDocument| command.  (The 
%  changes are that a few |\newpage| commands have been removed and 
%  that a |\cleardoublepage| has been removed for the \textsf{book} 
%  class.)  To cope with the incompatibility of the 
%  \textsf{koma-script} package, different modified definitions are 
%  used.  Which is to be used is tested in an |\@ifundefined| 
%  statement.
%    \begin{macrocode}
\AtBeginDocument{%
\@ifundefined{subject}{%
\if@titlepage
  \renewcommand\maketitle{\begin{titlepage}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \null\vfil
  \vskip 60\p@
  \begin{center}%
    {\LARGE \@title \par}%
    \vskip 3em%
    {\large
     \lineskip .75em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
      \vskip 1.5em%
    {\large \@date \par}%       
  \end{center}\par
  \@thanks
  \vfil\null
  \end{titlepage}%
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
\else
\renewcommand\maketitle{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
    \if@twocolumn
      \ifnum \col@number=\@ne
        \@maketitle
      \else
        \twocolumn[\@maketitle]%
      \fi
    \else
      \global\@topnum\z@   
      \@maketitle
    \fi
    \thispagestyle{plain}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
\def\@maketitle{%
  \null
  \vskip 2em%
  \begin{center}%
  \let \footnote \thanks
    {\LARGE \@title \par}%
    \vskip 1.5em%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    \vskip 1em%
    {\large \@date}%
  \end{center}%
  \par
  \vskip 1.5em}
\fi%
\renewenvironment{titlepage}{%
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse  
      \fi
      \thispagestyle{empty}%
      \setcounter{page}\@ne
    }%
    {\if@restonecol\twocolumn \else \newpage \fi
     \if@twoside\else
        \setcounter{page}\@ne
     \fi
    }
}{%   
%    \end{macrocode}
%  So much for the ordinary \LaTeXe{} kernel code.  Next follows 
%  the code borrowed from the \textsf{koma-script} bundle by Markus
%  Kohm,\footnote{Special thanks to Markus Kohm 
%  (\texttt{Markus\underline{\space}Kohm@ka2.maus.de}) 
%  for letting me incorporate this 
%  code.} also with some modifications.  
%    \begin{macrocode}
\if@titlepage
    \newcommand*\maketitle[1][1]{\begin{titlepage}%
    \setcounter{page}{#1}
    \let\footnotesize\small
    \let\footnoterule\relax
    \let\footnote\thanks
    \ifx\@extratitle\@empty \else
        \noindent\@extratitle\next@tpage\thispagestyle{empty}
    \fi
    \ifx\@titlehead\@empty \else
        \noindent\begin{minipage}[t]{\textwidth}
        \@titlehead
        \end{minipage}\par
    \fi
    \null\vfill
    \begin{center}
    \ifx\@subject\@empty \else
        {\Large \@subject \par}
        \vskip 3em
    \fi
    {\huge {\sectfont \@title \par}}
    \vskip 3em
    {\Large \lineskip 0.75em
    \begin{tabular}[t]{c}
        \@author
    \end{tabular}\par}
    \vskip 1.5em
    {\Large \@date \par}
    \vskip \z@ \@plus3fill
    {\Large \@publishers \par}
    \vskip 3em
    \end{center}\par
    \@thanks
    \vfill\null
    \if@twoside\next@tpage
        \noindent\begin{minipage}[t]{\textwidth}
        \@uppertitleback
        \end{minipage}\par
        \vfill
        \noindent\begin{minipage}[b]{\textwidth}
        \@lowertitleback
        \end{minipage}
    \fi
    \ifx\@dedication\@empty \else
        \next@tpage\null\vfill
        {\centering \Large \@dedication \par}
        \vskip \z@ \@plus3fill
        \if@twoside \next@tpage \fi
    \fi
    \end{titlepage}
    \setcounter{footnote}{0}%
    \global\let\thanks\relax
    \global\let\maketitle\relax
    \global\let\@thanks\@empty
    \global\let\@author\@empty
    \global\let\@date\@empty
    \global\let\@title\@empty
    \global\let\@extratitle\@empty
    \global\let\@titlehead\@empty
    \global\let\@subject\@empty
    \global\let\@publishers\@empty
    \global\let\@uppertitleback\@empty
    \global\let\@lowertitleback\@empty
    \global\let\@dedication\@empty
    \global\let\author\relax
    \global\let\title\relax
    \global\let\extratitle\relax
    \global\let\titlehead\relax
    \global\let\subject\relax
    \global\let\publishers\relax
    \global\let\uppertitleback\relax
    \global\let\lowertitleback\relax
    \global\let\dedication\relax
    \global\let\date\relax
    \global\let\and\relax}
\else
     \newcommand*\maketitle[1][1]{\par
       \begingroup
         \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
         \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
         \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
         \if@twocolumn
           \ifnum \col@number=\@ne
             \@maketitle
           \else
             \twocolumn[\@maketitle]%
           \fi
         \else
           \global\@topnum\z@   
           \@maketitle
         \fi
         \thispagestyle{plain}\@thanks
       \endgroup
       \setcounter{footnote}{0}%
       \let\thanks\relax
       \let\maketitle\relax
       \let\@maketitle\relax
       \global\let\@thanks\@empty
       \global\let\@author\@empty
       \global\let\@date\@empty
       \global\let\@title\@empty
       \global\let\@extratitle\@empty
       \global\let\@titlehead\@empty
       \global\let\@subject\@empty
       \global\let\@publishers\@empty
       \global\let\@uppertitleback\@empty
       \global\let\@lowertitleback\@empty
       \global\let\@dedication\@empty
       \global\let\author\relax
       \global\let\title\relax
       \global\let\extratitle\relax
       \global\let\titlehead\relax
       \global\let\subject\relax
       \global\let\publishers\relax
       \global\let\uppertitleback\relax
       \global\let\lowertitleback\relax
       \global\let\dedication\relax
       \global\let\date\relax
       \global\let\and\relax}
\fi
\def\@maketitle{%
    \let\footnote\thanks
    \ifx\@extratitle\@empty \else
        \noindent\@extratitle \next@tpage \if@twoside \null\next@tpage \fi
    \fi
    \ifx\@titlehead\@empty \else
        \noindent\begin{minipage}[t]{\textwidth}
        \@titlehead
        \end{minipage}\par
    \fi
    \null
    \vskip 2em%
    \begin{center}%
    \ifx\@subject\@empty \else
        {\Large \@subject \par}
        \vskip 1.5em
    \fi
    {\huge \@title \par}%
    \vskip 1.5em%
    {\Large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    \vskip 1em%
    {\Large \@date \par}%
    \vskip \z@ \@plus 1em
    {\Large \@publishers \par}
    \ifx\@dedication\@empty \else
        \vskip 2em
        {\Large \@dedication \par}
    \fi
  \end{center}%
  \par
  \vskip 2em}%
\renewenvironment{titlepage}{%
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse
      \fi
      \thispagestyle{empty}%
      \if@compatibility
        \setcounter{page}{0}
      \fi}%
    {\if@restonecol\twocolumn \else \newpage \fi}%
}%
}
%    \end{macrocode}
%  \par This brings us to the end of \textsf{vrsion}.  Hope you'll 
%  enjoy it!
% \iffalse
%</paketkod>
% \fi
%
% \Finale
%
\endinput