ypid / latex-packages

My LaTeX Packages.
https://ctan.org/author/schneider-r
25 stars 22 forks source link

doclicense: No language definition for nilfound #81

Closed thbde closed 3 years ago

thbde commented 3 years ago

I follow the documentation (as described in #80, not repeated here):

\documentclass[a4paper]{report}
\usepackage{
    babel,
}
\usepackage[
type={CC},
modifier={by-sa},
version={4.0},
]{doclicense}
\begin{document}
Thanks for your great work with doclicense!
\end{document}

and I get the warning: No language definition for nilfound. Please add one and submit a patch. Using English as fallback.

In this case, it is for experienced users quite clear that we have to specify a language:

\documentclass[a4paper]{report}
% the following line is changed
\usepackage[english]{babel}
\usepackage[
type={CC},
modifier={by-sa},
version={4.0},
]{doclicense}
\begin{document}
Thanks for your great work with doclicense!
\end{document}

and the warning is gone.

However, it would be helpful for beginners if they do not get a warning from the example in the documentation.

Some ideas:

  1. Change documentation to include a language
  2. Handle nil?
  3. Maybe change the warning to clarify the action that is expected from the user? (which is maybe the same as the previous option) The user should add the language to babel.

(nitpick: send a patch to whom or where? It was not immediately clear to me whether babel or doclicense complains. Maybe a clearer sentence could be "doclicense does not support language xyz for license abc, ...")

ypid commented 3 years ago

Lets do all of the above :) I propose #82. Works for you?

thbde commented 3 years ago

Looks good. The minimal working example works for me, I also like the extended actionable message. I only get the warning

Token not allowed in a PDF string (Unicode):(hyperref) removing `\enquote'

from issue #80, which should be fixed with 053baeacce81e9d6032dfbb464674f3d2938c62a, but I could not (yet) checkout the full source to test locally.

ypid commented 3 years ago

Sounds good. Merged.