%%
%% This is file `metasamp.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% metastr.dtx  (with options: `sample')
%% 
%% Copyright (C) 2020 Niklas Beisert
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesFile{metasamp.tex}[2020/02/06 v1.0 sample for metastr]
\documentclass[12pt]{article}

\usepackage{geometry}
\geometry{layout=a4paper}
\geometry{paper=a4paper}
\geometry{margin=2.5cm}
\parindent0pt
\parskip1ex

\PassOptionsToPackage{bookmarks=true}{hyperref}
\usepackage{hyperref}

\PassOptionsToPackage{draft}{metastr}
\PassOptionsToPackage{loadlang=en|de|fr|es}{metastr}
%%\PassOptionsToPackage{loadlang=en|fr|es}{metastr}
%%\PassOptionsToPackage{loadlang=de|en}{metastr}
\PassOptionsToPackage{cclogocurr=euro}{metastr}

\usepackage{metastr}
\usepackage{graphicx}
\usepackage{babel}
\IfFileExists{ccicons.sty}{\usepackage{ccicons}}{}

\metasetterm[en]{Zurich}{Zurich}
\metasetterm[de]{Zurich}{Z\"rich}
\metasetterm[fr]{Zurich}{Zurich}
\metasetterm[es]{Zurich}{Z\'urich}
\metasetterm[it]{Zurich}{Zurigo}
\metasetterm[pt]{Zurich}{Zurique}

\metaset{subject}{\metacompose[#1]{location}{location: }
   {\metacompose[#1]{date}{, date: }{}{}}
   {\metacompose[#1]{date}{date: }{}{}}}

\metaset[skip]{subtitle}{\vspace{1ex}}
\metaset[skip]{author}{\vspace{2ex}}
\metaset[skip]{location}{\vspace{1ex}}
\metaset[skip]{date}{\vspace{1ex}}
\metaset[style]{title}{\LARGE\bfseries}
\metaset[style]{author}{\large\scshape}
\metaset[sep]{draft}{ -- }
%%\metaunset[sep]{date}

\metaset[altlang]{title}{en,de}
\metaset[altlang]{rightstext}{en,es}
\metaset[rights]{writepdf}{}

\metasetlang{en}
%%\metasetlang{de}
%%\metasetlang{de-CH}
%%\metasetlang{fr}

\metaset[en]{title}{A metastr Sample}
\metaset[de]{title}{Ein metastr Beispiel}
\metaset[print]{title}{A \textsf{metastr} Sample}
\metaset{subtitle}{Illustration of some features}
\metaset{author}{Niklas Beisert}
\metaset{keywords}{composition of title, application of licenses, translations}
\metaset{location}{\metatranslate[#1]{Zurich}}
\metaset{date}{2020/02/06}
\metaset{partof}{The metastr Package}
\metaset[print]{partof}{The \textsf{metastr} Package}

\metaset{copyrightowner}{\metapick[#1]{author}}
\metaset{copyrightdate}{2020}
\metacopyright{doc}
%%\metacopyright{reserved}

%%\metaset{licenseversion}{1.2}
%%\metalicense{lppl}

%%\metaset{licenseversion}{3.0}
\metalicensecc{by-sa}
%%\metalicensecc{by-nc-sa}
%%\metalicensecc{zero}
%%\metalicensecc{pd}

\metaset[cmd]{licenselogo}{\includegraphics[scale=0.75]{#1}}

\begin{document}

\pdfbookmark[1]{\metaterm{title}}{title}
\begin{center}
\metapick[print]{titletext}
\end{center}

\vspace{1ex}\hrule\par\vspace{1ex}
\begingroup\footnotesize
\pdfbookmark[1]{\metaterm{copyright}}{copyright}
\metapick[print]{rightstext}
\endgroup
\vspace{1ex}\hrule\par\vspace{1ex}

\section{Metadata Inspection}

The metadata stored in this example PDF can be inspected with
the tool \texttt{pdfinfo}:

\begin{tabular}{l}
\verb+pdfinfo metasamp.pdf+\\
\verb+pdfinfo -meta metasamp.pdf | less+
\end{tabular}

\section{Translations}

\begin{tabular}{ll}
document language:&\metaterm{Zurich}\\
Spanish:&\metatranslate[es]{Zurich}
\end{tabular}

\metaif[]{cc@type}{ % only if a CC license is in use
\section{Creative Commons}
some representations of the selected license:
\begin{itemize}
\item license identifier:
  \metapick[]{licensecc}
\item \texttt{short} identifier:
  \metapick[short]{licensecc}
\item full form:
  \metapick[]{licenseccfull}
\item \texttt{ident} form:
  \metapick[ident]{licensecc}
\item \texttt{short} form:
  \metapick[short]{licenseccfull}
\IfFileExists{ccicons.sty}
  {\item \texttt{icon} forms:
   -- \metapick[icon]{licensecc}
   -- \metapick[icon]{licenseccfull} --}{}
\item \texttt{url} form:
  \metapick[url]{licenseccfull}
\end{itemize}
}{}

\end{document}
\endinput
%%
%% End of file `metasamp.tex'.
