For this problem, I am using the following .tex file:

\documentclass[fontsize=16pt, paper=letter]{scrartcl}



\title{A test \LaTeX to HTML page}

\section{Section One}

Hello world. Here is some mathematics:
        x + y = 3


I ran the following command (note periods/full-stops in the directory):

make4ht "A:\test_tex_sources\test_article.tex" 

But then I get the following error:

> make4ht "A:\test_tex_sources\test_article.tex"
Output dir:
Compiler:       latex
Latex options:   -jobname=A:\test_tex_sources\test_article
tex4ht.sty :    xhtml,
build_file      A:\test_tex_sources\test_article.mk4
setting param correct_exit
setting param correct_exit
setting param correct_exit
setting param ext
Adding:         ext     dvi
LaTeX call: latex  -jobname=A:\test_tex_sources\test_article  \makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode xhtml,.a.b.c.\input A:\test_tex_sources\test_article
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/W32TeX) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2015/10/01> patch level 2
Babel <3.9m> and hyphenation patterns for 79 languages loaded.
! Undefined control sequence.
<*> ...keatother\HCode xhtml,.a.b.c.\input A:\test

However, if I switch into the directory containing the .tex file, and then run:

make4ht test_article.tex

everything works okay.

What's the issue with using the absolute file path?

  • 1
    Changing backslashes in path onto slashes should solve the problem. – Kola B. Jan 11 '16 at 2:56

In your case switching

make4ht "A:\test_tex_sources\test_article.tex"


make4ht "A:/test_tex_sources/test_article.tex"

should solve the problem. Even if in an operating systems there are backslashes in a path, we change them into slashes for TeX tools.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.