[luatex] Very recent breakage luatex85.sty and cmap.sty

Marcel Fabian Krüger tex at 2krueger.de
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 ...ng 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
it?

Thanks,
Marcel

> 
> Thanks
> 
> Norbert
> 
> --
> PREINING Norbert                              https://www.preining.info
> 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 latex-project.org
> https://lists.dante.de/mailman/listinfo/latex-team
-------------- next part --------------
% Copyright (c) 2003-2021 Vladimir Volovich <vvv at vsu.ru>
% 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]

\DeclareOption{resetfonts}{%
  \@for\reserved at a:=%
    OT1/cmr/m/n/5,OT1/cmr/m/n/7,OT1/cmr/m/n/10,%
    OML/cmm/m/it/5,OML/cmm/m/it/7,OML/cmm/m/it/10,%
    OMS/cmsy/m/n/5,OMS/cmsy/m/n/7,OMS/cmsy/m/n/10,%
    OMX/cmex/m/n/10%
  \do{%
    \expandafter\let\csname\reserved at a\endcsname\relax
  }%
}
\ProcessOptions

\@ifundefined{pdffontattr}{%
% The cmap package can be used only with pdflatex,
% but not with ordinary latex
  \PackageWarningNoLine{cmap}{pdftex not detected - exiting}%
  \endinput
}\relax
\ifnum\pdfoutput<1
  \PackageWarningNoLine{cmap}{pdftex in DVI mode - exiting}
  \expandafter\endinput
\fi

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

\ifx\pdfnobuiltintounicode\@undefined
  \ifx\pdfgentounicode\@undefined\else
    \pdfgentounicode=0
  \fi
  \def\cmap at nobuiltintounicode{%
    \expandafter\@gobble\the
  }
\else
  \let\cmap at nobuiltintounicode\pdfnobuiltintounicode
\fi

\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
  \relax
}
\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@
      \begingroup
        \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
        \fi
      \endgroup
    \fi
  \fi
}
\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
}

\endinput


More information about the luatex mailing list.