Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more flexible with CC licenses #101

Merged
merged 1 commit into from
May 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lni-author-template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
\booktitle{Name-der-Konferenz} % Name of book title
\yearofpublication{2017}
%%%\lnidoi{18.18420/provided-by-editor-02} % if known
%%%\setcctype{by-sa} % can be: zero, by, by-sa, by-nc, by-nd, by-nc-sa, by-nc-nd
\maketitle

\begin{abstract}
Expand Down
1 change: 1 addition & 0 deletions lni-paper-example-de.tex
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
\booktitle{Name-der-Konferenz} % Name des Tagungsband; optional Kurztitel
\yearofpublication{2017}
%%%\lnidoi{18.18420/provided-by-editor-02} % Falls bekannt
%%%\setcctype{by-sa} % Möglichkeiten: zero, by, by-sa, by-nc, by-nd, by-nc-sa, by-nc-nd
\maketitle

\begin{abstract}
Expand Down
27 changes: 22 additions & 5 deletions lni.cls
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,24 @@
\end{center}%
\AddToShipoutPictureBG*{\AtPageLowerLeft{%
\put(\LenToUnit{\the\doihoffset},\LenToUnit{\the\doivoffset}){%
\ifusehyperref
\href{https://creativecommons.org/licenses/by-sa/4.0/}{\ccbysa}
\else
\ccbysa
\fi
\ifdefempty{\@lni@cc@type}{}{
\IfEq{\@lni@cc@type}{zero}{%
\def\@lni@CC@Url{https://creativecommons.org/publicdomain/zero/1.0/}\def\@lni@CC@Icon{\cczero}}{%
\edef\@lni@CC@Url{https://creativecommons.org/licenses/\@lni@cc@type/\@lni@cc@version/}%
\IfEq{\@lni@cc@type}{by}{\def\@lni@CC@Icon{\ccby}}{%
\IfEq{\@lni@cc@type}{by-sa}{\def\@lni@CC@Icon{\ccbysa}}{%
\IfEq{\@lni@cc@type}{by-nc-sa}{\def\@lni@CC@Icon{\ccbyncsa}}{%
\IfEq{\@lni@cc@type}{by-nc}{\def\@lni@CC@Icon{\ccbync}}{%
\IfEq{\@lni@cc@type}{by-nd}{\def\@lni@CC@Icon{\ccbynd}}{%
\IfEq{\@lni@cc@type}{by-nc-nd}{\def\@lni@CC@Icon{\ccbyncnd}}{%
\message{Invalid value for setcctype}%
}}}}}}}%
\ifusehyperref
\href{\@lni@CC@Url}{\@lni@CC@Icon}
\else
\@lni@CC@Icon
\fi
}
\ifdefempty{\@lnidoi}{}{
\footnotesize
\ifusehyperref
Expand Down Expand Up @@ -615,6 +628,10 @@
\newcommand*{\BPMN}{\lni@initialism{bpmn}}
\newcommand*{\BPEL}{\lni@initialism{bpel}}
\newcommand*{\UML}{\lni@initialism{uml}}
\newcommand\setcctype[2][4.0]{%
\def\@lni@cc@version{#1}%
\def\@lni@cc@type{#2}}
\setcctype{}
\renewenvironment{thebibliography}[1]
{\iflnienglish\selectlanguage{english}\else\selectlanguage{ngerman}\fi
\section*{\refname}%
Expand Down
9 changes: 9 additions & 0 deletions lni.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,15 @@ This work consists of the file lni.dtx
% \lnidoi{18.18420/se2016_01}
% \end{examplecode}
%
% \DescribeMacro{\setcctype\space(new in v1.X)}%
% In order to include a information about the CC licentse on the title page,
% the license and the version can be specified using the \cs{setcctype} macro.
% The version is optional and defaults to 4.0. Possible values are:
% zero, by, by-sa, by-nc, by-nd, by-nc-sa, by-nc-nd.
% \begin{examplecode}[label={lst:setcctype}]
% \setcctype[version]{by-sa}
% \end{examplecode}
%
% Finally \cs{maketitle} will output the formatted title page.
%
% \subsection{Abstract and keywords}
Expand Down