I help maintain a document which is built, among other ways, with make4ht --utf8 --lua document.tex for HTML output.

In order to typeset command line excerpts, the document sometimes uses \textquotedbl (i.e.: a plain ASCII double quote is needed in the output because it is likely to be copied to a terminal). Yes, I know about verbatim, fancyvrb and friends, but this is not the subject of the question.

My problem is that on current Debian unstable (texlive-extra-utils version 2020.20210202-3), \textquotedbl produces the following error when building with make4ht --utf8 --lua: LaTeX Error: Command \textquotedbl unavailable in encoding OT1.




ASCII double quote: \textquotedbl.


Am I doing something wrong here or is it a bug in make4ht (or TeX4ht)? Thanks.

P.S.: my current workaround is to put the following in a .cfg file passed to make4ht's --config option:

\RenewDocumentCommand { \textquotedbl } { }
  { \HCode { " } }


P.P.S.: I know that cmr10 has no straight double quote, which is probably part of the explanation of the error message. Still, I believe \textquotedbl ought to produce a straight double quote in the HTML output. :-)

1 Answer 1


You are right, this command seems to be unsupported. This is because it's definition in tuenc.def uses some special treatment and TeX4ht fails to recognize it. It seems that all other commands that are defined here works, except for \textquotedbl.

Your work around works, I will add something inspired by it to TeX4ht sources, so it should be fixed in TL soon.


It is best to use the updated latex.4ht file. It uses T1 font encoding instead of OT1 in LuaLaTeX and XeLaTeX. It should support more characters, like |.

  • 1
    Thank you very much. Great work on make4ht, this is very impressive!
    – frougon
    Jun 24, 2021 at 14:22
  • 2
    @frougon thank you for your support :) I've added it to TeX4ht sources, so it should be in TL soon.
    – michal.h21
    Jun 24, 2021 at 14:28
  • Another surprise I had that seems to be related: where the .tex source uses |, the HTML output has an U+2014 (EM DASH). Same pattern: the ASCII code for | is 0x7C, and the glyph in slot 0x7C of cmr10 is an em dash, as shown in Appendix A.1 of texdoc encguide...
    – frougon
    Jun 24, 2021 at 16:00
  • @frougon yes, this is the similar issue, the | character in PDFLaTeX produces dash too.
    – michal.h21
    Jun 24, 2021 at 18:36
  • In OT1 encoding, yes, but not in T1. :-)
    – frougon
    Jun 24, 2021 at 19:13

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.