[tex4ht] Possible bug in tex4ht

Michal Hoftich michal.h21 at gmail.com
Sun Jan 31 10:56:07 CET 2021


Hello Trent,

>Apologies if this is not the best place to submit a bug report -- I am
>trying out this mailing group thing for the first time -- but I think I am
>running into a bug with tex4ht. I am also fairly new with LaTex in general,
>so please bear with me if I am missing something obvious. I am trying to
>use TikZ in Emacs Org Mode via a LaTeX source block. For testing purposes,
>I am trying to compile the following block:

It is a good place, of course. 

>
>Trying to compile this with pdfTex fails; the shell outputs the following
>message:
>
>---
>! Undefined control sequence.
>l.140 \AtBeginEnvironment
>
> [tex4ht]{abstract}{\ConfigureEnv{center}{\a:abstrac...
>
>?
>! Emergency stop.
>l.140 \AtBeginEnvironment
>
> [tex4ht]{abstract}{\ConfigureEnv{center}{\a:abstrac...
>
>No pages of output.
>---

Do you execute TeX4ht explicitly (using `htlatex` or `make4ht` 
commands)? You shouldn't get this error just with `pdflatex`, as it 
shouldn't execute TeX4ht configuration files unless TeX4ht is explicitly 
loaded.

Could you please provide a TeX file that is generated by Org mode, 
command you use for compilation and maybe the .log file?

>I tried to track down where AtBeginEnivronment is from, with me being new
>to debugging LaTeX, a quick search suggests it is from the etoolbox
>package. Looking up the AtBeginEnvironment in the manual here:
>http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/etoolbox/etoolbox.pdf,
>it looks like the definition is missing the `[tex4ht]`, so my best guess is
>that the control sequence is being invoked improperly in 
>tex4ht-4ht.tex:

The \AtBeginEnvironment command is defined by current LaTeX kernel, see

https://ctan.math.illinois.edu/macros/latex-dev/base/lthooks-doc.pdf

It is really strange that you run into this error, because I've added 
the \AtBeginEnvironment command just week ago. This means that you have 
fairly up-to date TeX distribution and this command should be available 
for you. 

Which TeX distribution do you use? If you use MikTeX, try to update 
LaTeX core and all packages.

Best regards,
Michal


More information about the tex4ht mailing list.