Very recent breakage luatex85.sty and cmap.sty

Marcel Fabian Krüger tex at
Thu Feb 4 22:55:56 CET 2021

On Fri, Feb 05, 2021 at 06:21:29AM +0900, Norbert Preining wrote:
> Note that the luatex85, cmap, **and** the tabular is necessary.
> The error is
> 	(/home/norbert/tl/2020/texmf-dist/tex/latex/base/ts1cmr.fd)<<ot1.cmap>>
> 	! Undefined control sequence.
> 	reserved at a endcsname {pdfnobuiltintounicode 
> 	                                                  noexpand font at name noexpan...
> 	l.5   \begin{tabular}
> 	                   {c}
> 	? 
> I have seen the same with <<oms.cmap>> depending on font setup
> Is this intended, and if not, how can it be fixed?

Hi Norbert,

sorry about that. I didn't consider that anyone would use cmap with
LuaTeX (I missed that luatex85 allows it to be compatible...)

Could you please test the attached version of cmap.sty before I upload


> Thanks
> Norbert
> --
> PREINING Norbert                    
> Fujitsu Research Labs  +  IFMGA Guide + TU Wien + TeX Live + Debian Dev
> GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
> _______________________________________________
> Latex-team mailing list
> Latex-team at
-------------- next part --------------
% Copyright (c) 2003-2021 Vladimir Volovich <vvv at>
% cmap package -- download CMap files into PDF
%   to make "search" and "copy-and-paste" functions work properly
% You may distribute and/or modify this program under the terms of LPPL
% the program consists of cmap.sty and {t1,t2a,t2b,t2c,t5,ot1,ot1tt,lae,lfe}.cmap
% Usage: put \usepackage{cmap} immediately after the \documentclass line
% Thanks to:
%   Han The Thanh
%   Maxim I. Tishin
%   Petr Sojka
%   Werner Lemberg
%   Oleg Katsitadze

\ProvidesPackage{cmap}[2021/02/04 v1.0j CMap support: searchable PDF]

  \@for\reserved at a:=%
    \expandafter\let\csname\reserved at a\endcsname\relax

% The cmap package can be used only with pdflatex,
% but not with ordinary latex
  \PackageWarningNoLine{cmap}{pdftex not detected - exiting}%
  \PackageWarningNoLine{cmap}{pdftex in DVI mode - exiting}

\edef\reserved at a{\noexpand\in@{,fontenc.sty,}{\@filelist}}% enc.def
\reserved at a
\PackageWarningNoLine{cmap}{fontenc already loaded - some fonts may be unprocessed}
%\PackageWarningNoLine{cmap}{babel already loaded - some fonts may be unprocessed}%

  \def\cmap at nobuiltintounicode{%
  \let\cmap at nobuiltintounicode\pdfnobuiltintounicode

\def\extract at font{%
  \get at external@font
  \global\expandafter\font\font at name\external at font\relax
  \font at name\relax
  \cmap at hook
  \csname\f at encoding+\f at family\endcsname
  \csname\curr at fontshape\endcsname
\def\cmap at load{%
  \edef\reserved at f{\lowercase{\def\noexpand\reserved at f{\cmap at f@encoding.cmap}}}%
  \reserved at f
  \IfFileExists{\reserved at f}{%
    \immediate\pdfobj stream
      %attr {/Type /CIDFile}
      file {\reserved at f}%
    \expandafter\xdef\csname cmap at set@\cmap at f@encoding\endcsname{%
      \cmap at nobuiltintounicode\noexpand\font at name
      \noexpand\expandafter\pdffontattr\noexpand\font at name{/ToUnicode \the\pdflastobj\space 0 R}}%
    \global\expandafter\let\csname cmap at set@\cmap at f@encoding\endcsname\empty
\def\cmap at test@tt{%
  \ifdim\fontdimen3\font at name=\z@
    \ifdim\fontdimen4\font at name=\z@
        \ifdim\fontcharwd\font at name`\i=\fontcharwd\font at name`\w
          \edef\reserved at f{\lowercase{\def\noexpand\reserved at f{\cmap at f@encoding tt.cmap}}}%
          \reserved at f
          \IfFileExists{\reserved at f}{\xdef\cmap at f@encoding{\cmap at f@encoding tt}}\relax
\def\cmap at hook{%
  \@ifundefined{CJK at plane}{%
    \edef\cmap at f@encoding{\f at encoding}%
    \edef\cmap at f@encoding{\f at encoding\CJK at plane}%
  \cmap at test@tt
  \@ifundefined{cmap at set@\cmap at f@encoding}{\cmap at load}\relax
  \csname cmap at set@\cmap at f@encoding\endcsname


More information about the tex-live mailing list.