[tex4ht] [bug #486] Strange error with minted

2020-10-08 Thread Michal Hoftich
Update of bug #486 (project tex4ht):

 Open/Closed:Open => Closed 

___

Follow-up Comment #1:

I've found that the issue was caused by the Catchfile package. It added quoted
file to the list of used files. I've added fix for that.

In the process, I've added a new mechanism for early package redefinitions.
Instead of usepackage.4ht, it is possible to create file
-sty-hooks.4ht. It looks like this for the Catchfile package:

% catchfile-sty-hook.4ht, generated from tex4ht-4ht.tex
% ... more copyright lines

\AddToHook{package/after/catchfile}{
  \def\CatchFile@CheckFileExists#1{%
\IfFileExists{#1}{%
  \expandafter\CatchFile@DefFile\@filef@und\@nil
  \begingroup\expandafter\expandafter\expandafter\endgroup
  \expandafter\ifx\csname @addtofilelist\endcsname\relax
  \else
  \@addtofilelist{#1}
  \fi
}{%
  \let\CatchFile@File\relax
}%
  }%
}

It uses the new LaTeX hook mechanism to insert code after the package is
processed.

___

Reply to this item at:

  

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/



Re: [tex4ht] [bug #486] Strange error with minted

2020-10-08 Thread Ulrike Fischer


> I've found that the issue was caused by the Catchfile package. It added quoted
> file to the list of used files. I've added fix for that.

Is there a problem in the catchfile package itself?
At a first glance I didn't see a place where it would add quotes.



-- 
Mit freundlichen Grüßen
Ulrike Fischer




Re: [tex4ht] [bug #486] Strange error with minted

2020-10-08 Thread Michal Hoftich



I've found that the issue was caused by the Catchfile package. It added quoted
file to the list of used files. I've added fix for that.


Is there a problem in the catchfile package itself?
At a first glance I didn't see a place where it would add quotes.



It uses the following macro:

\def\CatchFile@CheckFileExists#1{%
  \IfFileExists{#1}{%
\expandafter\CatchFile@DefFile\@filef@und\@nil
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname @addtofilelist\endcsname\relax
\else
  \@addtofilelist\CatchFile@File
\fi
  }{%
\let\CatchFile@File\relax
  }%
}%

The quotes are added in \filef@und, which is set by \IfFileExists.

Best regards,
Michal