1

Pushing the following through latex2html:

\documentclass{article}
\begin{document}
Why doesn't latex2html beautify ``quotes?''
\end{document}

for me produces html that includes

Why doesn't latex2html beautify ``quotes?''

It is fundamental to LaTeX to recognize single and double quotes and replace them with typographically pleasing versions -- this does happen of course with pdflatex acting on this input, why does latex2html drop the ball?

I checked the man page, is there a switch I'm missing?

1
  • 2
    I thought latex2html was kind of old and not particularly good (but I don't have it installed any more). tex4ht, is usually a better choice. And then there's always pandoc. Both of these convert the quotation marks to 'smart quotes' in your example.
    – jon
    Jan 24, 2014 at 2:56

1 Answer 1

3

If you want to stick with latex2html you can add the following to your .latex2html-init file:

sub do_cmd_textquotedblleft{ '“' . $_[0]; }

sub do_cmd_textquotedblright{ '”' . $_[0]; }

sub do_cmd_textquoteleft{ '‘' . $_[0]; }

sub do_cmd_textquoteright{ '’' . $_[0]; }

Then in your document you can do something like:

\newcommand*{\dq}[1]{\textquotedblleft #1\textquotedblright}

and just do \dq{quoted stuff}.


Aside: I use either tex4ht or latex2html, depending on what I want to achieve. If I want the HTML version to be significantly different in appearance and I want to use Perl code to do stuff that's not required for the PDF versions, then I use latex2html otherwise I use tex4ht.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .