-
Notifications
You must be signed in to change notification settings - Fork 0
/
copyright.sty
62 lines (53 loc) · 1.95 KB
/
copyright.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
% This file is part of eclecTeX, a multi-purpose LaTeX library.
%
% © 2009-2013 Sebastián González Montesinos.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License version 1.3 or later.
%
% This work has the LPPL maintenance status `maintained'.
% The Current Maintainer of this work is Sebastián González.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{eclectex/copyright}
[2013/07/11 v0.0 Copyright utilities.]
\ProcessOptions\relax
% ---[ Packages ]---
\RequirePackage{pgfkeys}
% ---[ Commands ]---
\pgfkeys
{eclectex/copyright/.cd,
holder/.store in=\copyright@holder,
holder/.value required,
years/.store in=\copyright@years,
years/.value required,
license/.store in=\copyright@license,
license/.value required,
logo/.store in=\copyright@logo,
logo/.value required}
\renewcommand{\copyright}[2][]
{\pgfkeys{eclectex/copyright/.cd,
years=\ifdefvoid{\svndate}{\the\year}{\svnyear},
license=All rights reserved.,
holder=#2,
#1}}
\newcommand{\makecopyright}
{\par\bigskip\bigskip\noindent%
\newlength{\copyright@notice@width}%
\setlength{\copyright@notice@width}{\textwidth-1em}
\ifdefvoid{\copyright@logo}{}
{\pgfdeclareimage[height=2.5em]{copyrightlogo}{\copyright@logo}%
\newlength{\copyright@logo@width}%
\settowidth{\copyright@logo@width}{\pgfuseimage{copyrightlogo}}%
\addtolength{\copyright@notice@width}{-\copyright@logo@width-1ex}%
\begin{minipage}{\copyright@logo@width}
\tikz[inner sep=0pt, opacity=.7]
\node{\pgfuseimage{copyrightlogo}};
\end{minipage}\hfill}%
\begin{minipage}{\copyright@notice@width}
\sffamily\footnotesize\color{black!70}
\ifdefvoid{\copyright@holder}{}
{\textbf{\textcopyright\,\copyright@years~\copyright@holder%
\ifdefvoid{\copyright@license}{}{. }}}%
\ifdefvoid{\copyright@license}{}
{\copyright@license}%
\end{minipage}}