Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent tex4ht to load enumitem #312

Merged
merged 1 commit into from
Dec 17, 2023
Merged

Prevent tex4ht to load enumitem #312

merged 1 commit into from
Dec 17, 2023

Conversation

cedounet
Copy link
Collaborator

Apparently it breaks on kobo e-reader, see #306

Apparently it breaks on kobo e-reader.
@michal-h21
Copy link

I was able to create a MWE that causes compilation errors with the enumitem package and the options used in the document:

\documentclass{article}
\usepackage{enumitem}
\setlist[description]{style=nextline, leftmargin=0cm}
\begin{document}
Hello

\begin{description}
  \item[hello] world
  \item[second] item
\end{description}
\end{document}

This version of enumitem.4ht fixes the errors:

% enumitem.4ht (2022-05-01-08:25), generated from tex4ht-4ht.tex
% Copyright 2009-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-05-01-08:25}

\AddToHook{env/enumerate/end}{\ifx\enit@after\@empty\else%
  \let\enit:after\enit@after
  \let\enit@after\@empty
  \let\enumerate:executed\@empty
  \append:def\end:DL{\enit:after}
\fi}

\def\enit@postlabel{}
\Hinput{enumitem}
\endinput

I hope it fixes the error in the Sourdough Framework too.

@cedounet
Copy link
Collaborator Author

Thanks @michal-h21.

We "fixed" as per the commit by just not loading it. Thing is that the document compiled and opened fine on calibre/... but was not opening on the kobo reader.

Do you have a kobo reader to test?

@michal-h21
Copy link

@cedounet I thought that the issue for Kobo was caused by this crash with Enumitem, because it produced invalid HTML. Are there also other issues? Unfortunately, I don't have access to Kobo, so I cannot test it myself.

@cedounet cedounet merged commit f2c68a9 into main Dec 17, 2023
@cedounet
Copy link
Collaborator Author

I don’t know what crashed the kobo, but I know that only loading the Enumitem package crashed it. No need to use any of its feature to break the build.

same as you I do not have the device so can’t really tell you more.

@cedounet cedounet deleted the fix-kobo branch December 18, 2023 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants