# Make4HT with Subscript and ensuremath issues

When I am using Make4ht with subscript it's showing a compile error, but LaTeX is not showing any issues. In the \epp also output html is wrong (subscript is missing). How to solve this?

My MWE is:

    \documentclass[9pt]{elife}
\newcommand\eqannotate[1]{#1}
\usepackage[utf8]{inputenc}
\usepackage[version=4]{mhchem}
\usepackage{siunitx}
\usepackage{hyperref}
\usepackage{amsmath,amssymb}
\usepackage{xspace}

\title{Crowding-induced phase separation of nuclear transport receptors in FG nucleoporin assemblies}

\author[1]{Davis K. Luke}
\author[2]{Ford J. Ian}
\affil[1]{Department of Physics and Astronomy, University College London, London, United Kingdom}
\affil[2]{Institute for the Physics of Living Systems, University College London, London, United Kingdom}
\corr{luke.davis@uni.lu}{LKD}

\newcommand{\epp}{\ensuremath{\epsilon_{\textrm{FG-FG}}}\xspace}
\newcommand{\epc}{\ensuremath{\epsilon_{\textrm{FG-NTF2}}}\xspace}
\newcommand{\epcc}{\ensuremath{\epsilon_{\textrm{FG-Imp}\beta}}\xspace}
\newcommand{\kT}{\ensuremath{k_{\textrm{B}}T}\xspace}

\begin{document}

\maketitle

\begin{abstract}
The rapid ($< 1$~ms) transport of biological material to and from the cell nucleus is regulated by the nuclear pore complex (NPC). At the core of the NPC is a permeability barrier consisting of intrinsically disordered Phe-Gly (FG) nucleoporins (FG Nups). Various types of nuclear transport receptors (NTRs) facilitate transport by partitioning in the \epp FG Nup assembly, overcoming the barrier by their affinity to the FG Nups, and comprise a significant fraction of proteins in the NPC $\left( \frac{\rho^{(i)}(z)}{\rho^{(i)}_\textrm{bulk}} \right)$ barrier. In previous work, we revealed {a universal physical behaviour in the experimentally observed binding of two well-characterized NTRs, NTF2 and the larger Importin-$\beta$, to different planar assemblies of FG Nups, with the binding behaviour defined by negative cooperativity. This} was further validated by a minimal physical model that treated the FG Nups as flexible homopolymers \epc and \epcc the NTRs as uniformly cohesive spheres.
\end{abstract}
\end{document}


I have used make4ht --shell-escape -uc elife.cfg -a debug MainTeX.tex

• _\textrm{bulk}should be _{\textrm{bulk}} it more or less accidentally doesn't give an error in latex but will in any system expecting a standard braced syntax Mar 19, 2022 at 11:59

TeX4ht doesn't support _ and ^ in the document preamble. You can use the early_ option to require support for subscripts in the preamble:

make4ht --shell-escape -uc elife.cfg -a debug MainTeX.tex "early_"


But in general, it is better to use \sb and \sp commands instead:

\documentclass{article}
\usepackage{xspace}
\newcommand{\epp}{\ensuremath{{\epsilon}\sb{\textrm{FG-FG}}}\xspace}
\newcommand{\epc}{\ensuremath{{\epsilon}\sb{\textrm{FG-NTF2}}}\xspace}
\newcommand{\epcc}{\ensuremath{{\epsilon}\sb{\textrm{FG-Imp}\beta}}\xspace}
\newcommand{\kT}{\ensuremath{{k}\sb{\textrm{B}}T}\xspace}

\begin{document}

\begin{abstract}
The rapid ($< 1$~ms) transport of biological material to and from the cell nucleus is regulated by the nuclear pore complex (NPC). At the core of the NPC is a permeability barrier consisting of intrinsically disordered Phe-Gly (FG) nucleoporins (FG Nups). Various types of nuclear transport receptors (NTRs) facilitate transport by partitioning in the \epp FG Nup assembly, overcoming the barrier by their affinity to the FG Nups, and comprise a significant fraction of proteins in the NPC $\left( \frac{\rho^{(i)}(z)}{\rho^{(i)}_\textrm{bulk}} \right)$ barrier. In previous work, we revealed {a universal physical behaviour in the experimentally observed binding of two well-characterized NTRs, NTF2 and the larger Importin-$\beta$, to different planar assemblies of FG Nups, with the binding behaviour defined by negative cooperativity. This} was further validated by a minimal physical model that treated the FG Nups as flexible homopolymers \epc and \epcc the NTRs as uniformly cohesive spheres.
\end{abstract}
\end{document}
\end{document}


This is the result: