Latest news 2019-12-05: new blog post "RSS Feeds and Other Notifications."

Bug Tracker

ID109
StatusClosed (Fixed)
Categorydatetime2
Version1.4
Summaryincompatible with luatex85.sty

Report

Previously loaded package "luatex85" leads to the following error:
! File ended while scanning use of \@dtm@parsepdfdatetime.
Because of many changes in luaTeX 0.95 the packages "luatex85" is sometimes importend.

Rolf Niepraschk

MWE

\listfiles
\setcounter{errorcontextlines}{100}
\documentclass{article}
\usepackage{luatex85}
\usepackage[showzone=false]{datetime2}
\begin{document}
  BlaBla
\end{document}

Comment from Josef Kleber
Date: 2016-05-29 09:30:36 CDT

As a follow-up to Rolf's report, I also got a bug report about pdfcomment.sty. So I added luatex85 and upgraded from obsolete datetime to datetime2 with its pdf style.

But there's still the problem Rolf has reported! This can be "solved" with a workaround described here:

https://tex.stackexchange.com/questions/307136/luatex85-new-definition-of-pdfcreationdate-is-problematic

MWE:

\documentclass[11pt,a4paper]{scrartcl}
\usepackage{polyglossia}
\setdefaultlanguage{german}
\setkeys{german}{babelshorthands}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\usepackage[colorlinks, citecolor=red ,linkcolor=black]{hyperref}
% https://tex.stackexchange.com/questions/307136/luatex85-new-definition-of-pdfcreationdate-is-problematic
\edef\pdfcreationdate{\pdfcreationdate}%
% https://bitbucket.org/kleberj/pdfcomment/raw/c97d10cb62c77f7f04fde7193e31113bb27617a9/dev/tex/latex/pdfcomment/pdfcomment.sty
\usepackage{pdfcomment} 
\newcommand{\weg}[1]{\pdftooltip{\textcolor{red}{\bfseries{}W}}{#1}}
\begin{document}
This \pdftooltip{is}{believe it or not} text.

This is my example here comes the tooltip: \weg{This is the tooltip text.}
\end{document}

\edef\pdfcreationdate{\pdfcreationdate}
does solve the problem (double expansion instead of single) but might have undesired side effects.

egreg offers a better solution inside datetime2!

Best wishes and hoping for a soon update ;-) ,

Josef

Evaluation

I'm unable to reproduce the problem as my version of luatex is only beta-0.80.0, which still provides the original \pdfcreationdate as a primitive. However, this problem should now be fixed in datetime2 v1.5. (I've only just uploaded it to CTAN so allow a day or so for the new version to make it into the TeX distributions.) I decided that the best solution is to define
\edef\dtm@pdfcreationdate{\pdfcreationdate}
and use \dtm@pdfcreationdate where \pdfcreationdate was previously used. This has two advantages over the suggested solutions: it leaves \pdfcreationdate unchanged and it allows for any future definitions of \pdfcreationdate that may require deeper levels of expansion.

Comment from Josef Kleber
Date: 2016-06-05 03:28:06 CDT

Thank you,

I can confirm that the new version does solve the problem with:

$ lualatex -v
This is LuaTeX, Version 0.95.0 (TeX Live 2016/W32TeX)

Josef

Comment from Josef Kleber
Date: 2016-06-05 04:17:03 CDT

I just realized that you don't load luatex85 in datetime2.sty!

That means that you don't get the expected output for luatex v0.85+. Consider the following MWE:

\listfiles
\documentclass{article}
%\usepackage{luatex85}
\usepackage{datetime2}
\DTMsetstyle{pdf}%
\DTMsetup{showisoZ=false}%
\begin{document}
\DTMnow
\end{document}

without luatex85: D:20160605101000+00'00'

with luatex85: D:20160605094738+01'00'

Without loading luatex85,

\pdfcreationdate
is *not* defined for luatex v0.85+ and therefore datetime2.sty branches into the XeTeX fallback and gets the time only without seconds and time zone.

You can savely load luatex85, as it just defines the macros for luatex v0.85+. There's a test in it!

Josef

Comment from Nicola Talbot
Date: 2016-06-05 12:15:00 BST

Thank you for your feedback. I'd rather not load packages that some users may not require, but what I can do is add a check for \pdffeedback if \pdfcreationdate hasn't been defined, so where it's currently:

\ifdef\pdfcreationdate
{%
  \edef\dtm@pdfcreationdate{\pdfcreationdate}%
}%
{}
I can change to:
\ifdef\pdfcreationdate
{%
  \edef\dtm@pdfcreationdate{\pdfcreationdate}%
}%
{%
  \ifdef\pdffeedback
  {%
     \edef\dtm@pdfcreationdate{\pdffeedback creationdate}%
  }%
  {}%
}
I think that's the simplest solution.

Comment from Josef Kleber
Date: 2016-06-05 06:39:28 CDT

D:20160605122751+01'00'

Case closed! ;-)

Although the time is off by one hour. Should be ...132751...
A problem with daylight-saving time?

Josef

Comment from Nicola Talbot
Date: 2016-06-05 13:32:00 BST

Works fine for me with British Daylight Saving and TL 2015. (LuaTeX version beta-0.80.0)

I've uploaded datetime2 v1.5.1 to CTAN. Thanks.

Add comment.

Watch This Report

If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes" button. (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional.)
E mail:
Confirm E mail:
Confirm Bug ID:

To unsubscribe from all notifications use the notifications page.

Comment

You can append a comment to the report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional. If provided, it will be shown with the comment.)
Confirm Bug ID:

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace text[/tt]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

Click on the Preview button to preview the message.

Return to list.

© 2019 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs