2

To display grave accents correctly in DVI and PDF I use \textasciigrave. But htlatex changes this to ‘ (Left Single Quotation Mark). Is this a bug? (I use texlive 2015.)

For example

\documentclass{book}
\usepackage{textcomp}
\begin{document}
\textasciigrave
\end{document}

processed with latex or pdflatex yields a correct grave accent glyph but process with htlatex gives ‘.

2 Answers 2

2

This looks like a bug in tex4ht support for textcomp. Try to save following file as tcrm.htf:

tcrm 0 246
''  ''  Grave
''  ''  Acute
''  ''  Circumflex
''  ''  Tilde
''  ''  Dieresis
''  ''  Hungarumlaut
''  ''  Ring
''  ''  Caron
''  ''  Breve
''  ''  Macron
''  ''  Dotaccent
'¸'  ''  cedilla
'˛'  ''  ogonek
''  ''  quotesinglbase.ts1
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  quotedblbase.ts1
''  ''  none
''  ''  none
'�'  ''  twelveudash
''  ''  threequartersemdash
''  ''  afii61664.cap
'←'  ''  arrowleft
'→'  ''  arrowright
''  ''  tieaccentlowercase
''  ''  tieaccentcapital
''  ''  tieaccentlowercase.new
''  ''  tieaccentcapital.new
''  ''  none
''  ''  afii61664.asc
'␢'  ''  uni2422
''  ''  none
''  ''  none
''  ''  none
'$'  ''  dollar
''  ''  none
''  ''  none
'''  ''  quotesingle
''  ''  none
''  ''  none
'∗'  ''  asteriskmath
''  ''  none
','  ''  comma
''  ''  hyphendbl
'.'  ''  period
'⁄'  ''  fraction
''  ''  zerooldstyle
''  ''  oneoldstyle
''  ''  twooldstyle
''  ''  threeoldstyle
''  ''  fouroldstyle
''  ''  fiveoldstyle
''  ''  sixoldstyle
''  ''  sevenoldstyle
''  ''  eightoldstyle
''  ''  nineoldstyle
''  ''  none
''  ''  none
'〈'  ''  angleleft
'−'  ''  minus
'〉'  ''  angleright
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
'℧'  ''  uni2127
''  ''  none
'○'  ''  circle
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
'Ω'  ''  Omega
''  ''  none
''  ''  none
''  ''  none
'〚'  ''  uni301A
''  ''  none
'〛'  ''  uni301B
'↑'  ''  arrowup
'↓'  ''  arrowdown
'`'  ''  grave.ts1
''  ''  none
''  ''  born
'⚮'  ''  divorced
''  ''  died
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  leaf
'⚭'  ''  married
'♪'  ''  musicalnote
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  tildelow
''  ''  hyphendbl.alt
''  ''  breve.ts1
''  ''  caron.ts1
''  ''  hungarumlaut.ts1
''  ''  dblgrave.ts1
'†'  ''  dagger
'‡'  ''  daggerdbl
'‖'  ''  uni2016
'‰'  ''  perthousand
'•'  ''  bullet
'℃'  ''  uni2103
''  ''  dollaroldstyle
''  ''  centoldstyle
'ƒ'  ''  florin
'₡'  ''  colonmonetary
'₩'  ''  uni20A9
'₦'  ''  uni20A6
''  ''  guarani
'₱'  ''  peso
'₤'  ''  lira
'℞'  ''  recipe
'‽'  ''  uni203D
''  ''  gnaborretni
'₫'  ''  dong
'™'  ''  trademark
'‱'  ''  uni2031
''  ''  paragraph.alt
'฿'  ''  uni0E3F
'№'  ''  afii61352
'⁒'  ''  discount
'℮'  ''  estimated
'◦'  ''  openbullet
'℠'  ''  uni2120
'⁅'  ''  uni2045
'⁆'  ''  uni2046
'¢'  ''  cent
'£'  ''  sterling
'¤'  ''  currency
'¥'  ''  yen
'¦'  ''  brokenbar
'§'  ''  section
''  ''  dieresis.ts1
'©'  ''  copyright
'ª'  ''  ordfeminine
''  ''  copyleft
'¬'  ''  logicalnot
'℗'  ''  uni2117
'®'  ''  registered
''  ''  macron.ts1
'°'  ''  degree
'±'  ''  plusminus
'²'  ''  twosuperior
'³'  ''  threesuperior
''  ''  acute.ts1
'µ'  ''  mu
'¶'  ''  paragraph
'·'  ''  periodcentered
'※'  ''  uni203B
'¹'  ''  onesuperior
'º'  ''  ordmasculine
'√'  ''  radical
'¼'  ''  onequarter
'½'  ''  onehalf
'¾'  ''  threequarters
'€'  ''  Euro
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
'×'  ''  multiply
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
''  ''  none
'÷'  ''  divide
tcrm 0 246

(you need to add blank line at the end, Stackexchange eats it unfortunately).

From my quick test it provides correct unicode characters for textcomp glyphs, but further testing would be nice. I will post this as bug fix to tex4ht issue tracker if everything is OK.

enter image description here

2
  • This yields  which is an unknown unicode glyph? Oct 12, 2015 at 13:43
  • @user3224237 you are right, wrong unicode character was used, it should be fixed now
    – michal.h21
    Oct 12, 2015 at 16:45
0

Historically, the grave character (0x60) was rendered as a left single quote. In LaTeX, this still occurs in some situations. For example, \textasciigrave from the package textcomp is displayed as a quote using latex with Evince as viewer on my machine, however with xdvi it is displayed as grave and with pdflatex and Evince it is also a grave. The choice of htlatex to render a quote is therefore strictly speaking not a bug, but it is a bit of an odd choice given modern conventions.

A solution is to modify htlatex/tex4ht character mappings, but it is probably easier to use an alternative in your LaTeX source that renders as a grave accent in both dvi/pdf and htlatex output. On my system the literal backtick or glyph 18 work well. MWE:

\documentclass{article}
\usepackage{textcomp}
\usepackage{amssymb}
\begin{document}
\begin{enumerate}
\item textcomp grave: \textasciigrave
\item amssymb backprime: $\backprime$
\item escape literal backtick: \`{}
\item math mode backtick: $`$
\item glyph 18: \symbol{18}
\end{enumerate}
\end{document}

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.