summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-01-12 22:40:10 +0000
committerKarl Berry <karl@freefriends.org>2023-01-12 22:40:10 +0000
commite72757fe2be6de55d81c066e10e46e5ef837c1bc (patch)
tree3297a0a96c31b056e00ff4d90b499a15d7dcf5e8 /Master/texmf-dist/source/generic
parent3ae03fa84b4c5f2d6c824681ff415633aa9a6090 (diff)
embedfile support, tex4ht r1285; avoid embedfile error, tex4ht r1286
git-svn-id: svn://tug.org/texlive/trunk@65529 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/generic')
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/ChangeLog10
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex3
-rw-r--r--Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex61
3 files changed, 71 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/generic/tex4ht/ChangeLog b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
index d1cb7c2edcb..46df45ccfe0 100644
--- a/Master/texmf-dist/source/generic/tex4ht/ChangeLog
+++ b/Master/texmf-dist/source/generic/tex4ht/ChangeLog
@@ -1,3 +1,13 @@
+2023-01-12 Michal Hoftich <michal.h21@gmail.com>
+
+ * tex4ht-4ht.tex (embedfile-hooks.4ht, usepackage.4ht): declared
+ error printing command, to prevent actual error message.
+ https://github.com/ho-tex/embedfile/pull/7
+
+ * tex4ht-4ht.tex (embedfile.4ht): added support for the embedfile
+ package.
+ https://github.com/michal-h21/tex4ebook/issues/99
+
2023-01-10 Michal Hoftich <michal.h21@gmail.com>
* tex4ht-html5.tex (html5.4ht): added default CSS style for sections
diff --git a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
index 3143a5b33dd..66173731138 100644
--- a/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/mktex4ht-cnf.tex
@@ -1,4 +1,4 @@
-% $Id: mktex4ht-cnf.tex 1282 2023-01-08 15:27:15Z karl $
+% $Id: mktex4ht-cnf.tex 1285 2023-01-12 13:43:41Z michal_h21 $
% Manually-maintained file, listing *.4ht files created by tex4ht-4ht.tex.
% Read by tex4ht-cond4ht.
%
@@ -386,6 +386,7 @@
\AddFile{9}{animate}
\AddFile{9}{sectionbreak}
\AddFile{9}{subfiles}
+\AddFile{9}{embedfile}
\AddFile{9}{fontawesome5}
\AddFile{9}{mhchem}
% \AddFile{9}{mktex4ht}
diff --git a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
index 8a63480c63c..b26c68c2cf7 100644
--- a/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
+++ b/Master/texmf-dist/source/generic/tex4ht/tex4ht-4ht.tex
@@ -1,7 +1,7 @@
-% $Id: tex4ht-4ht.tex 1280 2022-12-30 23:31:42Z michal_h21 $
+% $Id: tex4ht-4ht.tex 1286 2023-01-12 21:20:42Z michal_h21 $
% tex tex4ht-4ht or ht tex tex4ht-4ht
%
-% Copyright 2009-2022 TeX Users Group
+% Copyright 2009-2023 TeX Users Group
% Copyright 1996-2009 Eitan M. Gurari
% Released under LPPL 1.3c+.
% See tex4ht-cpright.tex for license text.
@@ -5045,6 +5045,63 @@ which will prevent the stop of the processing.
>>>
+%%%%%%%%%%%%%%%%%%%%%%%
+\Section{embedfile.sty}
+%%%%%%%%%%%%%%%%%%%%%%%
+
+\<embedfile.4ht\><<<
+% embedfile.4ht (|version), generated from |jobname.tex
+% Copyright 2023 TeX Users Group
+|<TeX4ht license text|>
+|<embedfile file|>
+|<embedfile dummy commands|>
+\Hinput{embedfile}
+\endinput
+
+>>> \AddFile{9}{embedfile}
+
+The embedfile command included a file to PDF. We cannot do that in the
+HTML output, but we can at least register the file, so it will be for
+example copied to the output directory.
+
+\<embedfile file\><<<
+\NewConfigure{embedfile}{1}
+\Configure{embedfile}{{\Configure{Needs}{File: \embed:file}\Needs{}}}
+\newcommand\embedfile[2][]{
+ \edef\embed:file{#2}%
+ \a:embedfile%
+}
+>>>
+
+These commands are defined just that we don't get error messages that
+they don't exist. We don't try to emulate them.
+
+\<embedfile dummy commands\><<<
+% dummy commands that can be used in the document
+\newcommand\embedfilefinish{}
+\newcommand\embedfilesetup[1]{}
+\newcommand\embedfilesort[1]{}
+\newcommand\embedfilefield[2]{}
+\newcommand\embedfileifobjectexists[4]{}
+\newcommand\embedfilegetobject[2]{}
+>>>
+
+The embedfile stops it's loading once it finds that we use engine that
+doesn't output PDF. We need to declare a command that prints an error
+message before the package quits.
+
+\<add to usepackage\><<<
+\Configure{PackageHooks}{embedfile.sty}{embedfile-hooks.4ht}
+>>>
+
+\<embedfile-hooks.4ht\><<<
+% embedfile-hooks.4ht (|version), generated from |jobname.tex
+% Copyright 2023 TeX Users Group
+|<TeX4ht license text|>
+\def\EmFi@Error#1#2{}
+>>> \AddFile{9}{embedfile-hooks}
+
+
\Section{url.sty}
%%%%%%%%%%%%%%%%%%