1

I want to print CC text and logo in bottom of first page of my latex cls template but it returns error for version 2.0. (https://creativecommons.org/licenses/by-nd/2.0/) or (https://creativecommons.org/licenses/by/2.0/)

\documentclass{article}
\usepackage{hyperref}
\usepackage[
type={CC},
modifier={by-nd},
version={2.0},
]{doclicense}
\usepackage{lipsum}
\begin{document}
    \footnotetext{\doclicenseThis}
    \lipsum[1-10]
\end{document}

Error: Package doclicense Error: License long name not defined. \doclicense@set

Update: part of package that is related to the above error: (I have provided all required stuffs type, modifier and version (I don't know what versionUsed is!))

\ifcsdef{doclicense@lang@lic@\doclicense@type%
      @\doclicense@modifier @\doclicense@versionUsed}{}{%

      \PackageError{doclicense}{License long name not defined}{%
        Please check the manual of doclicense
        to see what you can do about it.%
      }%
    }
1
  • 1
    there is no provision for version 2.0 in the code, with version={3.0} or 4.0 it compiles. Jan 22, 2023 at 20:07

1 Answer 1

2

As mentioned in comments the 2.0 version of the license is not included in the package. You can add it youself by copying a \namedef line from one of the .ldf files provided with the package. Note that this definition should be added before loading the package. Note also that this of course does not add the full text, so commands like \doclicenseFullText will not work. However, the text of the link and the link itself printed by \doclicenseThis will work properly.

MWE:

\documentclass{article}
\usepackage{hyperref}
\makeatletter
\@namedef{doclicense@lang@lic@CC@[email protected]}{Attribution-NoDerivs 2.0 Generic}%
\makeatother
\usepackage[
type={CC},
modifier={by-nd},
version={2.0},
]{doclicense}
\usepackage{lipsum}
\begin{document}
    \footnotetext{\doclicenseThis}
    \lipsum[1-10]
\end{document}

Result, with a tooltip showing the link target:

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .