%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% A style for topics for the NTCIR-11 Math2 task (see http://ntcir-math.nii.ac.jp/)
%% Copyright 2014 by Michael Kohlhase (http://kwarc.info/kohlhase), released under the LPPL
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\if@private\@privatefalse
\DeclareOption{private}{\@privatetrue}
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{omdoc}}
\ProcessOptions
\RequirePackage{amsfonts}
\RequirePackage{amstext}
\RequirePackage{color}
%\RequirePackage{mws}

\if@private\else\RequirePackage{comment}\fi

\RequirePackage{xcolor}
\RequirePackage{url}

\def\ntcir@prefix{NTCIR11-Math2-}

\def\qvar{\textcolor{red}}
\newcounter{topic}
\newenvironment{topic}[2][]
{\stepcounter{topic}\subsection*{\ntcir@prefix-\arabic{topic}: #2}}
{}

\def\qvar#1{\fbox{\textsf{\textcolor{red}{#1}}}}
%% copied from http://www.tex.ac.uk/cgi-bin/texfaq2html?label=activechars
\begingroup\lccode`~=`?\lowercase{\endgroup\def~{\qvar}}
\mathcode`?="8000 

\newenvironment{fquery}{\par\noindent\textbf{Formula Query}: }{}
%{\paragraph{Query}\begin{math}\catcode`\?=\active\def?{\qvar}}
%{\paragraph{Query}\begin{math}}
%{\end{math}}

\newenvironment{relevance}{\par\noindent\textbf{Relevance}: }{}
%\newenvironment{narrative}{\par\noindent\textbf{Narrative}}{}
\newenvironment{note}{\par\noindent\textbf{Note}: }{}
\newenvironment{keyword}{\par\noindent\textbf{Keyword}: }{}

\newcommand\examplehit[1]{\par\noindent\textbf{Example Hit}: \url{#1}}
\newcommand\contributor[1]{\par\noindent\textbf{Contributor}: #1}
\if@private
\newenvironment{private}
{\subsubsection*{Private Information (only for Judges and Admins)}}
{}
\else\excludecomment{private}\fi
%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "../topics"
%%% End: 
