/[volute]/trunk/projects/ivoapub/ivoatex/ivoa.cls
ViewVC logotype

Contents of /trunk/projects/ivoapub/ivoatex/ivoa.cls

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5699 - (show annotations)
Mon Dec 2 10:34:45 2019 UTC (8 months, 1 week ago) by msdemlei
File size: 11328 byte(s)
ivoatex: Requiring tocbibind package to have a References ToC entry even
though we're based on article.


1 \ProvidesClass{ivoa}
2 \LoadClassWithOptions{article}
3
4 \NeedsTeXFormat{LaTeX2e}
5
6 \RequirePackage{calc}
7 \RequirePackage{graphicx}
8 \RequirePackage{xcolor}
9 \RequirePackage{ifthen}
10 \RequirePackage{doc}
11 \RequirePackage{listings}
12 \RequirePackage{paralist}
13 \RequirePackage{url}
14 \RequirePackage[nottoc]{tocbibind}
15 \RequirePackage[labelfont=it]{caption}
16 \RequirePackage[T1]{fontenc}
17 \RequirePackage[utf8]{inputenc}
18
19 \definecolor{ivoacolor}{rgb}{0.0,0.318,0.612}
20 \definecolor{linkcolor}{rgb}{0.318,0,0.318}
21
22 \RequirePackage[colorlinks,
23 linkcolor=linkcolor,
24 anchorcolor=linkcolor,
25 citecolor=linkcolor,
26 urlcolor=linkcolor,
27 breaklinks=true]{hyperref}
28
29 \RequirePackage{natbib}
30 \bibliographystyle{ivoatex/ivoa}
31
32 \renewcommand{\topfraction}{0.9}
33 \renewcommand{\bottomfraction}{0.7}
34 \renewcommand{\textfraction}{0.1}
35 \renewcommand{\floatpagefraction}{0.8}
36
37 \setlength{\parskip}{1pt plus 2pt}
38
39 \makeatletter
40
41 %%%%%%%%%%%%%%%%%%% Metadata definition macros
42
43 \newcommand{\ivoagroup}[1]{\def\ivo@group{#1}}
44
45 % these are accumulators for sequences
46 \def\previ@usversions{}
47 \def\@uthors{}
48 \def\@ditors{}
49
50 \renewcommand{\author}[2][0]{%
51 \ifthenelse{\equal{\@uthors}{}}{}
52 {\g@addto@macro\@uthors{, }}
53 \ifthenelse{\equal{#1}{0}}
54 {\g@addto@macro\@uthors{#2}}
55 {\g@addto@macro\@uthors{\href{#1}{#2}}}}
56 \newcommand{\editor}[2][0]{%
57 \ifthenelse{\equal{\@ditors}{}}{}
58 {\g@addto@macro\@ditors{, }}
59 \ifthenelse{\equal{#1}{0}}
60 {\g@addto@macro\@ditors{#2}}
61 {\g@addto@macro\@ditors{\href{#1}{#2}}}}
62 \newcommand{\previousversion}[2][0]{
63 \ifthenelse{\equal{#1}{0}}
64 {\g@addto@macro\previ@usversions{\item #2}}
65 {\g@addto@macro\previ@usversions{\item \href{#1}{#2}}}}
66
67 \def\vcsR@vision{unknown}
68 \def\vcsD@te{unknown}
69 \def\vcs@RL{unknown}
70 \newcommand{\vcsrevision}[1]{\gdef\vcsR@vision{#1}}
71 \newcommand{\vcsdate}[1]{\gdef\vcsD@te{#1}}
72 \newcommand{\vcsurl}[1]{\gdef\vcs@RL{#1}}
73
74 \def\SVN$#1: #2 ${%
75 \ifthenelse{\equal{#1}{Date}}
76 {\vcsdate{#2}}{%
77 \ifthenelse{\equal{#1}{Rev}}
78 {\vcsrevision{#2}}{%
79 \ifthenelse{\equal{#1}{URL}}
80 {\vcsurl{#2}}{%
81 \message{Invalid SVN key /#1/}}
82 }}}
83
84 %%%%%%%%%%%%%%%%%% Tools for formatting the titlepage
85
86 \newcommand*\bigdescriptionlabel[1]{%
87 \parbox[b]{\labelwidth}{\makebox[0pt][l]{\color{ivoacolor}#1}\\\mbox{}}}
88 \newenvironment{bigdescription}%
89 {\begin{list}{}{%
90 \setlength{\leftmargin}{4em}
91 \setlength{\labelwidth}{4em}
92 \setlength{\labelsep}{0pt}
93 \setlength{\listparindent}{0pt}
94 \setlength{\itemsep}{0pt}
95 \let\makelabel\bigdescriptionlabel}
96 \let\term\item
97 }{%
98 \end{list}}
99
100 \newcommand*\longtermslabel[1]{%
101 \parbox[b]{\labelwidth}{\makebox[0pt][l]{#1}\\\mbox{}}}
102 \newenvironment{longtermsdescription}%
103 {\begin{list}{}{%
104 \setlength{\leftmargin}{4em}
105 \setlength{\labelwidth}{4em}
106 \setlength{\labelsep}{0pt}
107 \setlength{\listparindent}{0pt}
108 \setlength{\itemsep}{3pt}
109 \let\makelabel\longtermslabel}
110 \let\term\item
111 }{%
112 \end{list}}
113
114 \newcommand\titlehe@d[1]{\bigbreak{\noindent
115 \Large\color{ivoacolor}\sffamily\bfseries #1}\nobreak\par\nobreak}
116
117 \renewcommand\maketitle{
118 \let\footnotesize\small
119 \let\footnoterule\relax
120 \let \footnote \thanks
121 \mbox{}
122 \vskip -2cm
123 \noindent\mbox{%
124 \includegraphics[width=6cm]{ivoatex/IVOA.jpg}%
125 \raisebox{1.5cm}{\parbox{5cm}{
126 \Large\color{ivoacolor}\textsl{\textsf{\textbf{I}nternational}} \\
127 \Large\color{ivoacolor}\quad\textsl{\textsf{\textbf{V}irtual}} \\
128 \Large\color{ivoacolor}\quad\textsl{\textsf{\textbf{O}bservatory}} \\
129 \Large\color{ivoacolor}\textsl{\textsf{\textbf{A}lliance}}}}\hfil}
130
131 \vskip 1.4cm
132 \begin{sloppypar}\raggedright
133 \LARGE\color{ivoacolor}\sffamily\bfseries \@title\par
134 \end{sloppypar}
135
136 \bigskip
137 \noindent{\LARGE\color{ivoacolor}\sffamily\bfseries
138 Version \ivoaDocversion}
139 \medskip
140 \titlehe@d{\expandedDoctype{\ivoaDoctype} \ivoaDocdate}%
141
142
143 \begin{bigdescription}
144 \item[Working group]
145 \ivo@group
146
147 \item[This version]
148 \currentDocURL
149
150 \item[Latest version]
151 \latestDocURL
152
153 \item[Previous versions]
154 \begin{compactitem}[]
155 \previ@usversions
156 \end{compactitem}
157
158 \item[Author(s)]
159 \begin{compactitem}[]
160 \@uthors
161 \end{compactitem}
162
163 \item[Editor(s)]
164 \begin{compactitem}[]
165 \@ditors
166 \end{compactitem}
167
168 \ifthenelse{\equal{\vcsR@vision}{unknown}}{\relax}{
169 \item[Version Control]
170 Revision \vcsR@vision
171 \ifthenelse{\equal{\vcsD@te}{unknown}}{\relax}{,
172 \vcsD@te}
173 \ifthenelse{\equal{\vcs@RL}{unknown}}{\relax}
174 {\\\strut\tiny\url{\vcs@RL}}}
175
176 \end{bigdescription}
177 \@thanks
178 \vfill\null
179 \setcounter{footnote}{0}%
180 }
181
182
183
184 \renewenvironment{abstract}{%
185 \thispagestyle{empty}
186 \maketitle
187 \@beginparpenalty\@lowpenalty
188 \titlehe@d{\abstractname}
189 \medskip
190 \@endparpenalty\@M}
191 {\par
192 \bigskip
193 \titlehe@d{Status of this document}
194
195 \medskip
196 \docstatusDeclaration{\ivoaDoctype}
197 \tableofcontents}
198
199 \newenvironment{generated}{%
200 \list{}{\rightmargin 0mm\leftmargin 5mm}\item[]}
201 {\endlist}
202
203 \newcommand\expandedDoctype[1] % "Proposed Recommendation" for PR and such
204 {\ifthenelse{\equal{#1}{NOTE}}
205 {IVOA Note}
206 {\ifthenelse{\equal{#1}{WD}}
207 {IVOA Working Draft}
208 {\ifthenelse{\equal{#1}{PR}}
209 {IVOA Proposed Recommendation}
210 {\ifthenelse{\equal{#1}{REC}}
211 {IVOA Recommendation}
212 {\ifthenelse{\equal{#1}{PEN}}
213 {Proposed Endorsed Note}
214 {\ifthenelse{\equal{#1}{EN}}
215 {Endorsed Note}
216 {UNKNOWN DOCUMENT (fix DOCTYPE)}}}}}}}
217
218 \newcommand\docstatusDeclaration[1]
219 {\ifthenelse{\equal{#1}{NOTE}}
220 {This is an IVOA Note expressing suggestions from and
221 opinions of the authors. It is intended to share best
222 practices, possible approaches, or other perspectives on
223 interoperability with the Virtual Observatory. It should
224 not be referenced or otherwise interpreted as a standard
225 specification.}
226 {\ifthenelse{\equal{#1}{WD}}
227 {This is an IVOA Working Draft for review by IVOA members
228 and other interested parties. It is a draft document and
229 may be updated, replaced, or obsoleted by other documents
230 at any time. It is inappropriate to use IVOA Working Drafts
231 as reference materials or to cite them as other than ``work
232 in progress''.}
233 {\ifthenelse{\equal{#1}{PR}}
234 {This is an IVOA Proposed Recommendation made available for
235 public review. It is appropriate to reference this document
236 only as a recommended standard that is under review and
237 which may be changed before it is accepted as a full
238 Recommendation.}
239 {\ifthenelse{\equal{#1}{PEN}}
240 {This is an IVOA Proposed Endorsed Note for review by IVOA
241 members and other interested parties. It is appropriate to
242 reference this document only as a Proposed Endorsed Note that
243 is under review and may change before it is endorsed or may
244 not be endorsed.
245 }
246 {\ifthenelse{\equal{#1}{EN}}
247 {This document is an IVOA Endorsed Note. It has been reviewed and endorsed
248 by the IVOA Technical Coordination Group as a stable, citable document
249 which constitutes valuable information for the IVOA community and
250 beyond.
251 }
252 {\ifthenelse{\equal{#1}{REC}}
253 {This document has been reviewed by IVOA Members and other
254 interested parties, and has been endorsed by the IVOA
255 Executive Committee as an IVOA Recommendation. It is a
256 stable document and may be used as reference material or
257 cited as a normative reference from another document.
258 IVOA's role in making the Recommendation is to draw
259 attention to the specification and to promote its
260 widespread deployment. This enhances the functionality and
261 interoperability inside the Astronomical Community.}
262 {UNKNOWN DOCUMENT (fix DOCTYPE)}}}}}}\par
263 A list of current IVOA Recommendations and other technical documents
264 can be found at \href{http://www.ivoa.net/documents/
265 }{http://www.ivoa.net/documents/}.}
266
267
268 \newcommand\currentBaseURL %
269 {http://www.ivoa.net/documents/\ivoaDocname/\ivoaDocdatecode}
270 \newcommand\currentDocURL % URL of this document's landing page
271 {\href{\currentBaseURL}{\currentBaseURL}}
272 \newcommand\latestDocURL
273 % URL of a potential successor to the document's landing page
274 {\href{http://www.ivoa.net/documents/\ivoaDocname}
275 {http://www.ivoa.net/documents/\ivoaDocname}}
276
277
278 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Styling various item
279
280 \renewcommand\section{\@startsection {section}{1}{\z@}%
281 {-3.5ex \@plus -1ex \@minus -.2ex}%
282 {2.3ex \@plus.2ex}%
283 {\raggedright\normalfont\Large
284 \color{ivoacolor}\bfseries\sffamily}}
285 \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
286 {-3.25ex\@plus -1ex \@minus -.2ex}%
287 {1.5ex \@plus .2ex}%
288 {\raggedright\normalfont\large
289 \color{ivoacolor}\bfseries\sffamily}}
290 \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
291 {-3.25ex\@plus -1ex \@minus -.2ex}%
292 {1.5ex \@plus .2ex}%
293 {\normalfont\normalsize
294 \color{ivoacolor}\bfseries\sffamily}}
295 \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
296 {3.25ex \@plus1ex \@minus.2ex}%
297 {-1em}%
298 {\normalfont\normalsize
299 \color{ivoacolor}\bfseries\sffamily}}
300 \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
301 {3.25ex \@plus1ex \@minus .2ex}%
302 {-1em}%
303 {\normalfont\normalsize\bfseries}}
304
305
306 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Various utilities for writing IVOA docs
307
308 \newenvironment{admonition}[1]{ % a simple admonition box
309 \begin{table} %% TBD: use a different sort of insertion env?
310 \hskip -0.75cm
311 \begin{minipage}[r]{0.75\columnwidth}%
312 {\color{lightgray}\hrule}
313 \medskip
314 \hfil
315 \begin{minipage}[c]{0.9\columnwidth}
316 \small
317 \makebox[\columnwidth][l]{\sffamily\bfseries\color{ivoacolor}#1}%
318 \par\smallskip
319 \noindent\raggedright\ignorespaces
320 }%
321 {%
322 \end{minipage}
323 \hfil
324 \medskip
325 {\color{lightgray}\hrule}
326 \end{minipage}%
327 \end{table}
328 }%
329
330
331 \newenvironment{inlinetable}{\vskip 1.5ex plus 0.5ex minus 0.5ex
332 \vfil\penalty8000\vfilneg%
333 \hbox to\hsize\bgroup\hss}
334 {\hss\egroup\vspace{8pt}}
335
336 % customcss only relevant for tth output, not LaTeX
337 \newcommand{\customcss}[1]{\relax}
338
339 \newcommand{\xmlel}[1]{{\ttfamily\itshape #1}}
340 \newcommand{\vorent}[1]{\textsc{#1}}
341
342 \newcommand{\sptablerule}{\noalign{\vspace{2pt}}\hline\noalign{\vspace{2pt}}}
343
344 \newcommand{\ivoatex}{\mbox{\textsc{Ivoa}\TeX}}
345
346 \newcommand{\auxiliaryurl}[1]{\href{\currentBaseURL/#1}{\currentBaseURL/#1}}
347
348 \chardef\dquote'042
349
350 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Changing LaTeX/package defaults
351
352 \renewcommand*\descriptionlabel[1]
353 {\hspace{\labelsep}\itshape #1}
354
355 \lst@CCPutMacro
356 \lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-}}
357 \@empty\z@\@empty
358
359 \makeatother
360
361 \input ivoatexmeta.tex

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26