Closed hanetzer closed 1 year ago
Try to save the following code as babel-sty-hooks.4ht
:
% babel-sty-hooks.4ht, generated from tex4ht-4ht.tex
% Copyright 2022 TeX Users Group
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
% of LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work
% is the TeX4ht Project <http://tug.org/tex4ht>.
%
% If you modify this program, changing the
% version identification would be appreciated.
\immediate\write-1{version 2022-08-17-14:10}
\NewDocumentCommand\:babelfont{o m o m}{}
\:AtEndOfPackage{%
\let\babelfont\:babelfont
}
\ifdefined\recall:sup
\recall:sup
\:AtEndOfPackage{
\early:sup
}
\fi
It suppress the \babelfont
command, because it causes this fatal error.
same result; do I need to pass some extra flags or something to make it 'take'?
Which TeX distribution do you use? It should work in up to date TeX Live.
I have two distributions. My daily driver is gentoo, and unfortunately they're behind, so I spun up a debian chroot to deal with it. The latter reports:
This is LuaHBTeX, Version 1.14.0 (TeX Live 2022/dev/Debian)
Execute 'luahbtex --credits' for credits and version details.
There is NO warranty. Redistribution of this software is covered by
the terms of the GNU General Public License, version 2 or (at your option)
any later version. For more information about these matters, see the file
named COPYING and the LuaTeX source.
LuaTeX is Copyright 2021 Taco Hoekwater and the LuaTeX Team
erm, ubuntu chroot*
It seems a bit old. You will probably need also this file, usepackage.4ht
:
% usepackage.4ht (2022-11-21-13:19), generated from tex4ht-4ht.tex
% Copyright 2003-2009 Eitan M. Gurari
% Copyright 2009-2022 TeX Users Group
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.3c of this license or (at your option) any
% later version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions
% of LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work
% is the TeX4ht Project <http://tug.org/tex4ht>.
%
% If you modify this program, changing the
% version identification would be appreciated.
\immediate\write-1{version 2022-11-21-13:19}
\def\:temp{tex4ht}\ifx \:temp\@currname
\:warning{\string\usepackage{tex4ht} again?}
\def\:temp#1htex4ht.def,tex4ht.sty#2!*?: {\def\:temp{#2}}
\expandafter\:temp \@filelist htex4ht.def,tex4ht.sty!*?: %
\ifx \:temp\empty \else
\:warning{if
\string\RequirePackage[tex4ht]{hyperref} or
\string\usepackage[tex4ht]{hyperref} was
used try instead, repectively,
\string\RequirePackage{hyperref} or
\string\usepackage{hyperref}}
\fi
\fi
\gdef\a:usepackage{\use:package ,!*?: }
\gdef\use:package#1,{%
\if :#1:\def\:temp##1!*?: {}\else
\def\:temp{#1}\ifx \@currname\:temp
\def\:temp##1!*?: {\input usepackage.4ht }%
\else \let\:temp=\use:package \fi
\fi \:temp}
\Configure{PackageHooks}{titlesec.sty}{titlesec-hooks.4ht}
\Configure{PackageHooks}{biblatex-chicago.sty}{biblatex-chicago-hooks.4ht}
\Configure{PackageHooks}{cleveref.sty}{cleveref-hooks.4ht}
\Configure{PackageHooks}{xr.sty}{xr-hooks.4ht}
\Configure{PackageHooks}{xr-hyper.sty}{xrhyper-hooks.4ht}
\Configure{PackageHooks}{eso-pic.sty}{esopic-hooks.4ht}
\Configure{PackageHooks}{showframe.sty}{showframe-hooks.4ht}
\Configure{PackageHooks}{expl3.sty}{expl3-hooks.4ht}
\Configure{PackageHooks}{savetrees.sty}{savetrees-hooks.4ht}
\Configure{PackageHooks}{newcomputermodern.sty}{newcomputermodern-hooks.4ht}
\Configure{PackageHooks}{newcomputermodern.sty}{newcomputermodern-hooks.4ht}
\Configure{PackageHooks}{fontawesome5-utex-helper.sty}%
{fontawesome5-utex-helper-hooks.4ht}
\Configure{PackageHooks}{fontawesome5.sty}{fontawesome5-hooks.4ht}
\Configure{PackageHooks}{biblatex.sty}{biblatex-hooks.4ht}
\Configure{PackageHooks}{xeCJK.sty}{xecjk-hooks.4ht}
\Configure{PackageHooks}{unicode-math.sty}{unicode-math-hooks.4ht}
\Configure{PackageHooks}{ctex.sty}{ctex-hooks.4ht}
\AddToHook{class/ctexart/before}{\input{ctexart-hooks.4ht}}
\Configure{PackageHooks}{luatexja.sty}{luatexja-hooks.4ht}
\Configure{PackageHooks}{luatexja-fontspec.sty}{luatexja-hooks.4ht}
\Configure{PackageHooks}{polyglossia.sty}{polyglossia-hooks.4ht}
\Configure{PackageHooks}{fontspec.sty}{fontspec-hooks.4ht}
\Configure{PackageHooks}{tikz.sty}{tikz-hooks.4ht}
\Configure{PackageHooks}{pdfbase.sty}{pdfbase-hooks.4ht}
\Configure{PackageHooks}{pdfx.sty}{pdfx-hooks.4ht}
\Configure{PackageHooks}{lua-widow-control.sty}{lua-widow-control-hooks.4ht}
\Configure{PackageHooks}{tagpdf.sty}{tagpdf-hooks.4ht}
\Configure{PackageHooks}{breakurl.sty}{breakurl-hooks.4ht}
\Configure{PackageHooks}{hyperref.sty}{hyperref-hooks.4ht}
\Configure{PackageHooks}{bookmark.sty}{bookmark-hooks.4ht}
\Configure{PackageHooks}{caption.sty}{caption-hooks.4ht}
\Configure{PackageHooks}{footnotebackref.sty}{footnotebackref-hooks.4ht}
\AddToHook{package/doc/before}{\SUPOff}
\AddToHook{package/doc/after}{\SUPOn}
\AddToHook{package/hypdoc/before}{\SUPOff}
\AddToHook{package/hypdoc/after}{\SUPOn}
\Configure{PackageHooks}{babel.sty}{babel-sty-hooks.4ht}
\Configure{PackageHooks}{minted.sty}{minted-sty-hooks.4ht}
\Configure{PackageHooks}{graphics.sty}{graphics-hooks.4ht}
\Configure{PackageHooks}{graphbox.sty}{graphbox-hooks.4ht}
\Configure{PackageHooks}{xcolor.sty}{xcolor-hooks.4ht}
\Configure{PackageHooks}{imakeidx.sty}{imakeidx-hooks.4ht}
\Configure{PackageHooks}{fancyhdr.sty}{fancyhdr-hooks.4ht}
\Configure{PackageHooks}{exerquiz.sty}{exerquiz-hooks.4ht}
\Configure{PackageHooks}{hyperxmp.sty}{hyperxmp-hooks.4ht}
\Configure{PackageHooks}{datetime2.sty}{datetime2-hooks.4ht}
\endinput
What distro/version are you using? As the above barfs on bookmark-hooks.4ht
I am using vanilla TeX Live updated to the latest version.
The \Configure{PackageHooks}{package name}{config file}
command in usepackage.4ht
tries to load the config file when you load the package name
in your document. Some of these config files may be missing on your system, as you have an older TL version. In this case, you can remove the line with the missing config file.
I am using vanilla TeX Live updated to the latest version.
I mean linux distro/or windows/mac, whatever. Trying to find where I can 'get' this version easily enough without a manual compile/install. Nixing the package hook line for bookmarks gets me further on the mwe but unfortunately the full doc barfs out here:
Package biblatex Warning: Patching footnotes failed.
(biblatex) Footnote detection will not work.
(./fulldoc.aux) (/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd
) (/usr/share/texmf-dist/tex/generic/hyph-utf8/loadhyph/loadhyph-en-us.tex
ASCII Hyphenation patterns for American English
(/usr/share/texmf-dist/tex/generic/hyph-utf8/patterns/tex/hyph-en-us.tex))
(/usr/share/texmf-dist/tex/latex/biblatex/lbx/english.lbx)
No file fulldoc.bbl.
(/usr/share/texmf-dist/tex/latex/ragged2e/ragged2e.sty)
(/usr/share/texmf-dist/tex/generic/soulutf8/soulutf8.sty
(/usr/share/texmf-dist/tex/generic/soul/soul.styUnsupported font ectt1000
))
(/usr/share/texmf-dist/tex/latex/pdflscape/pdflscape.sty
(/usr/share/texmf-dist/tex/latex/graphics/lscape.sty
(/usr/share/texmf-dist/tex/generic/tex4ht/graphics-hooks.4ht)))
! TeX capacity exceeded, sorry [input stack size=5000].
\old:outputpage ->\old:outputpage
{}
l.134
3079 words of node memory still in use:
9 hlist, 2 vlist, 1 rule, 2 local_par, 1 dir, 15 glue, 3 kern, 3 penalty, 4
glyph, 248 attribute, 224 glue_spec, 216 attribute_list, 1 temp, 4 if_stack, 1
open, 5 write, 218 special nodes
avail lists: 1:5,2:6,4:2,5:4,8:1
! ==> Fatal error occurred, bad output DVI file produced!
No pages of output.
Transcript written on fulldoc.log.
[FATAL] make4ht-lib: Fatal error. Command htlatex returned exit code 1
I am no Fedora. The error from your last post seems to be related to the pdfbase
package, but I still think that it must be a version mismatch, because I cannot really reproduce it.
You can also try to disable the problematic packages from loading directly in your TeX file, like this:
% vim: spell spelllang=en ft=tex
\documentclass[14pt,a4paper,english]{memoir}
\usepackage[bidi=basic, english]{babel}
\usepackage{pdflscape}
\usepackage{bookmark}
\ifdefined\HCode\else
\babelprovide[onchar=fonts ids]{ancientgreek}
\babelprovide[onchar=fonts ids]{hebrew}
\babelfont{rm}{Linux Libertine O}
\babelfont[*greek]{rm}{SBL BibLit}
\babelfont[*hebrew]{rm}{SBL BibLit}
\fi
\begin{document}
A Hebrew text is בְּרֵאשִׁית בָּרָא אֱלֹהִים אֵת הַשָּׁמַיִם וְאֵת
הָאָרֶץ, and a Greek one is Ἐν ἀρχῇ ἐποίησεν ὁ Θεὸς τὸν οὐρανὸν καὶ τὴν
γῆν.
\end{document}
In this way, you don't need usepackage.4ht
, so you shouldn't experience these clashes between different versions of files.
Ok so I ended up just biting the bullet and installing the netinst version to my home folder and purged out the distro packages. This solves my mwe issue wrt all of the above, without any *.4ht files. (install-tl-unx.tar.gz which unpacked to install-tl-20221124).
I've managed to pare it down to work 'more' but I'm still getting unrelated issues, so I'll close this, as the subject matter issue was solved by either updating or using your 4ht files/\ifdefined\HCode bits.
Finally pared this down to a mwe. Given the example at stackexchange, I've produced this mwe:
This compiles fine with lualatex alone, resulting in:
Running it through tex4ebook results in:
Not sure where to go from here.