%
% Useful macros for referring to IVOA standards and notes in a consistent style.
% $Rev: 4639 $
% $Date: 2017-12-28 21:06:03 +0000 (Thu, 28 Dec 2017) $
% $URL: https://volute.g-vo.org/svn/trunk/projects/dal/ADQL/ADQL.tex $
%
% Example:
% Use \VOTableSpec to refer to the VOTable standard in your document.
% The first time this occurs in your document it will be expanded into a full citation:
%   VOTable specification (Ochsenbein and Taylor et al. (2013))
% Any subsequent occurrences will be expanded into just the name of the standard:
%   VOTable specification
%

\usepackage{etoolbox}
\newcommand{\IvoaCite}[3]{\providebool{#1}\ifbool{#1}{#3}{#3\xspace(\citet{#2})\booltrue{#1}}\xspace}

\newcommand{\VOTableSpec} {\IvoaCite{votspec}     {2013ivoa.spec.0920O} {VOTable specification}}
\newcommand{\DALISpec}    {\IvoaCite{dalispec}    {2017ivoa.spec.0517D} {DALI specification}}
\newcommand{\VOSISpec}    {\IvoaCite{vosispec}    {2017ivoa.spec.0524G} {VOSI specification}}
\newcommand{\VOUnitSpec}  {\IvoaCite{unitspec}    {2014ivoa.spec.0523D} {VOUnits specification}}

\newcommand{\RegTAPSpec}  {\IvoaCite{regtapspec}  {2014ivoa.spec.1208D} {RegTAP specification}}

\newcommand{\TAPSpec}     {\IvoaCite{tapspec}     {2010ivoa.spec.0327D} {TAP specification}}
\newcommand{\TAPRegSpec}  {\IvoaCite{tapregspec}  {2012ivoa.spec.0827D} {TAPRegExt specification}}
\newcommand{\TAPImpNote}  {\IvoaCite{tapimpnote}  {note:TAPNotes}       {TAP implementation note}}

\newcommand{\STCSpec}     {\IvoaCite{stcspec}     {2007ivoa.spec.1030R} {STC specification}}
\newcommand{\STCSSpec}    {\IvoaCite{stcsspec}    {std:STCS}            {STC-S specification}}
\newcommand{\ObsCoreSpec} {\IvoaCite{obscorespec} {2017ivoa.spec.0509L} {ObsCore specification}}

%
% Useful macros for referring to figures, sections and appendices in a consistent style.
\newcommand{\FigureRef}[1]{Figure \ref{#1}\xspace}
\newcommand{\SectionRef}[1]{Section \ref{#1}\xspace}
\newcommand{\SectionSee}[1]{(see Section \ref{#1})\xspace}
\newcommand{\AppendixRef}[1]{Appendix \ref{#1}\xspace}



