se2p / se2thesis

A Thesis Class for the Chair of Software Engineering II at the University of Passau, Germany
https://ctan.org/pkg/se2thesis
LaTeX Project Public License v1.3c
8 stars 2 forks source link

Compiler Warnings in combination with `doclicence` package #17

Open BaumiCoder opened 2 days ago

BaumiCoder commented 2 days ago

Using the doclicense package with se2thesis create some warnings. With scrbook, the base of se2thesis, there are no warnings.

I don't know if the warnings trigger any problems. I does not encounter any problems with the doclicense, which only occurs with se2thesis.

Example

\documentclass{se2thesis}

\usepackage{hyperref}
\usepackage[type={CC},modifier={by},version={4.0},lang={english}]{doclicense}

\begin{document}
  Hello
\end{document}

Warnings

Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref)                removing `\group_begin:' on input line 7.

Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref)                removing `\hyphenpenalty' on input line 7.

Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref)                removing `\group_end:' on input line 7.

Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref)                removing `\group_begin:' on input line 7.

Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref)                removing `\hyphenpenalty' on input line 7.

Package hyperref Warning: Token not allowed in a PDF string (Unicode):
(hyperref)                removing `\group_end:' on input line 7.

Enviroment

BaumiCoder commented 2 days ago

A similar issue at doclicense was related with a wrong package loading order between csquote and hyperref. The first one is loaded by se2thesis. I don't know when such automatic loads from the class are performed or how to control the position for this in the loading order.

stephanlukasczyk commented 1 hour ago

Package load order is sometimes painful, to be honest. First, se2thesis does not load csquotes; however, se2packages loads csquotes by default (and you're probably using that package). This can be prevented by \usepackage[csquotes=false]{se2packages}.

I am, however, not sure whether this really solves your issue. I've looked into the code of doclicense, which loads csquotes automatically at the end of the preamble, if it has not been loaded (see).

To be honest, I do not have a good suggestion here; especially hyperref is a package that causes interaction troubles, because it does heavy lifting and patching of large parts of the LaTeX internals. That's the reason why it is usually recommended to load hyperref last with very few exceptions (cleveref is one of the exceptions).

The most important question to me is: even though you get warnings in the log, does everything work as expected, i.e., is the generated PDF looking the way you expected it?