4

I have a problem using the tooltip option of the acro-package and the command \today.

In my document i load \usepackage[tooltip = true]{acro}, where the option tooltip=true loads the package pdfcomment which loads the package datetime.

The package datetime changes the behaviour of the command \today (it prints now with the DayOfWeek). I used datetime2 in my document since it is the newer version of datetime. The problem is: datetime2 and it's formating options are totally ignored! It does not matter if i load it before or after the acro package.

I want: 15th June, 2016

I get: Wednesday 15th June, 2016

Because of the problems above I tried \usepackage[nodayofweek]{datetime} instead of datetime2. But the package option nodayofweek creats another error with the package \usepackage{catoptions}:

 LaTeX Error: Option clash for package datetime.

I use catoptions to define a command \Autoref* (which does the same as \autoref* but with a big beginning letter instead of a small letter (e.g. 'Section' instead of 'section').

I have no idea what i should do since so many packages are involved ...

Minimalexample

\documentclass{scrbook}

% \usepackage[nodayofweek]{datetime}
\usepackage[tooltip=true]{acro}
\usepackage{catoptions}

\begin{document}

\today

\end{document}
  • Just to be clear: this is not really a problem with acro, right? The MWE will produce the same problem if you replace \usepackage[tooltip=true]{acro}with \usepackage{pdfcomment}, won't it, or even if you leave it away completely and just load datetime with options and catoptions? – clemens Jun 15 '16 at 10:39
  • very strange ... With just \usepackage{pdfcomment} instead of \usepackage[tooltip=true]{acro} the error message with catoptionsdisappears! So it is an error produced from the combinaton of this three packages and packageoptions! – Kugelfisch15 Jun 15 '16 at 10:44
  • acro loads pdfcomment just before begin document and indeed if I place it there and remove acro I can reproduce the issue. Explicitly loading pdfcomment earlier seems to avoid the problem. – clemens Jun 15 '16 at 11:03
  • Loading pdfcomment before catoptions seems to 'solve' the problem. The error disappears and I can load datetime with the [nodayofweek] option. I do not understand why but it seems to work. – Kugelfisch15 Jun 15 '16 at 11:12
2

You can use \PassOptionsToPackage to indicate options for packages that are loaded internally by other packages. For example:

\documentclass{scrbook}

\PassOptionsToPackage{nodayofweek}{datetime}
\usepackage[tooltip=true]{acro}
\usepackage{catoptions}

\begin{document}

\today

\end{document}

If you want to use datetime2, you'll need to ensure that \today is set to \DTMtoday at the beginning of the document to prevent other packages overriding it:

\documentclass{scrbook}

\usepackage[tooltip=true]{acro}
\usepackage{catoptions}
\usepackage[en-GB]{datetime2}
\AtBeginDocument{\let\today\DTMtoday}

\begin{document}

\today

\end{document}

Edit: \DTMtoday requires at least v1.4 of datetime2.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.