Debian Codegraph @

texmf-dist/doc/latex/biblatex-gost/ltxdockit.cls

raw
1 % $Id: ltxdockit.cls,v 1.2d 2011/03/25 20:33:14 lehman stable $
2 %
3 % Copyright (c) 2008-2011 Philipp Lehman.
4 %
5 % Permission is granted to copy, distribute and/or modify this
6 % software under the terms of the LaTeX Project Public License
7 % (LPPL), version 1.3.
8 %
9 % The LPPL maintenance status of this software is
10 % 'author-maintained'.
11 %
12 % This software is provided 'as is', without warranty of any kind,
13 % either expressed or implied, including, but not limited to, the
14 % implied warranties of merchantability and fitness for a
15 % particular purpose.
16
17 \def\ltd@rcsid$#1: #2 #3 #4 #5${#4 v#3}
18
19 \NeedsTeXFormat{LaTeX2e}
20 \ProvidesClass{ltxdockit}
21 [\ltd@rcsid $Id: ltxdockit.cls,v 1.2d 2011/03/25 20:33:14 lehman stable $
22 LaTeX documentation kit]
23
24 \input{ltxdockit.def}
25
26 \RequirePackage{etoolbox}
27 \RequirePackage{multicol}
28 \RequirePackage{keyval}
29 \RequirePackage{ltxdockit}
30 \RequirePackage{hyperref}
31 \RequirePackage[all]{hypcap}
32
33 \newrobustcmd*{\fnurl}[1][]{\hyper@normalise\ltd@fnurl{#1}}
34 \def\ltd@fnurl#1#2{\footnote{#1\hyper@linkurl{\Hurl{#2}}{#2}}}
35
36 \newrobustcmd*{\email}{\hyper@normalise\ltd@email}
37 \def\ltd@email#1{\href{mailto:#1}{#1}}
38
39 \hypersetup{%
40 colorlinks=true,
41 linkcolor=spot,
42 urlcolor=spot,
43 bookmarks=true,
44 bookmarksopen=false,
45 bookmarksnumbered=false,
46 hyperfootnotes=false,
47 plainpages=false,
48 pdfpagelabels=true,
49 pdfpagemode=UseOutlines,
50 pdfview=FitH,
51 pdfstartview=FitH}
52
53 % title
54
55 \providecommand*{\titlepage}{}
56 \providecommand*{\titlefont}{}
57 \renewrobustcmd*{\titlepage}[1]{\setkeys{ltd@ttp}{#1}}
58 \renewcommand*{\titlefont}{\bfseries}
59 \define@key{ltd@ttp}{title}{\def\ltd@title@title{#1}}
60 \define@key{ltd@ttp}{subtitle}{\def\ltd@title@subtitle{#1}}
61 \define@key{ltd@ttp}{url}{\def\ltd@title@url{#1}}
62 \define@key{ltd@ttp}{author}{\def\ltd@title@author{#1}}
63 \define@key{ltd@ttp}{email}{\def\ltd@title@email{#1}}
64 \define@key{ltd@ttp}{revision}{\def\ltd@title@revision{#1}}
65 \define@key{ltd@ttp}{date}{\def\ltd@title@date{#1}}
66
67 \providecommand*{\printtitlepage}{}
68 \renewrobustcmd*{\printtitlepage}{%
69 \begingroup
70 \centering\titlefont
71 \begingroup\LARGE
72 \ifundef\ltd@title@url
73 {\ltd@title@title}
74 {\href{\ltd@title@url}{\ltd@title@title}}%
75 \par
76 \endgroup
77 \vspace{0.25\baselineskip}
78 \begingroup\large
79 \ltd@title@subtitle\par
80 \endgroup
81 \vspace{0.25\baselineskip}
82 \begin{multicols}{2}
83 \raggedleft
84 \ltd@title@author\par
85 \expandafter\email\expandafter{\ltd@title@email}\par
86 \raggedright
87 Version \ltd@title@revision\par\ltd@title@date
88 \end{multicols}
89 \endgroup}
90
91 % rcs tags
92
93 \providecommand*{\rcsfile}{[rcsfile]}
94 \providecommand*{\rcsrevision}{[revision]}
95 \providecommand*{\rcsdate}{[date]}
96 \providecommand*{\rcstime}{[time]}
97 \providecommand*{\rcsstate}{[state]}
98 \providecommand*{\rcsauthor}{[author]}
99 \providecommand*{\rcslocker}{[unlocked]}
100 \providecommand*{\rcstoday}{\today}
101
102 \providecommand*{\rcsid}[1]{%
103 \ifblank{#1}{}{\ltd@rcsid@i#1}}
104 \def\ltd@rcsid@i$Id#1${%
105 \ifblank{#1}{}{\ltd@rcsid@ii#1&}}
106 \def\ltd@rcsid@ii#1#2&{%
107 \ifblank{#1}{}{\ltd@rcsid@iii#2&}}
108 \def\ltd@rcsid@iii#1 #2 #3 #4&{%
109 \write\@auxout{%
110 \detokenize{\gdef\rcsfile{#2}}^^J%
111 \detokenize{\gdef\rcsrevision{#3}}}%
112 \ltd@rcsid@iv#4&}
113 \def\ltd@rcsid@iv#1/#2/#3 #4:#5:#6 #7&{%
114 \write\@auxout{%
115 \detokenize{\gdef\rcsdate{#1/#2/#3}}^^J%
116 \detokenize{\gdef\rcstime{#4:#5:#6}}^^J%
117 \detokenize{\ltd@setdate{#1}{#2}{#3}{#4}{#5}}}%
118 \ltd@rcsid@v#7&}
119 \def\ltd@rcsid@v#1 #2 #3&{%
120 \write\@auxout{%
121 \detokenize{\gdef\rcsauthor{#1}}^^J%
122 \detokenize{\gdef\rcsstate{#2}}}%
123 \ifblank{#3}{}{\ltd@rcsid@vi#3&}}
124 \def\ltd@rcsid@vi#1 &{%
125 \write\@auxout{%
126 \detokenize{\gdef\rcslocker{#1}}}}
127
128 \def\ltd@setdate#1#2#3#4#5{%
129 \global\year=#1
130 \global\month=#2
131 \global\day=#3
132 \global\time=#4
133 \global\multiply\time by 60
134 \global\advance\time by #5}
135
136 % config file
137
138 \InputIfFileExists{ltxdockit.cfg}{}{}
139
140 \endinput