By default, TeX4ht breaks long lines of text in the input into shorter lines in the output HTML file. Is there any way to suppress these extra line breaks? (Note that I am trying to avoid extra line breaks in the source itself, not in the document that is ultimately displayed by the web browser.)
For example, suppose I start with the TeX source
\documentclass{article}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ante odio, condimentum ut nunc vel, rutrum rhoncus arcu. Praesent id justo tellus. Donec ut eros sagittis, bibendum augue id, luctus nulla. Aenean commodo ultrices turpis eget cursus. Pellentesque laoreet turpis leo, gravida laoreet libero sagittis sit amet. Fusce ut suscipit purus. Donec euismod dolor sit amet risus lacinia, ut pellentesque orci posuere. Morbi rutrum, sem ut elementum elementum, urna purus faucibus felis, vel rutrum mauris risus non erat. Proin commodo felis id mi feugiat rutrum. Cras et tempor massa. Donec tempor ante sed nibh varius, quis rutrum ipsum rutrum. Integer consectetur justo fermentum libero ultrices, eu fermentum nisl tempor.
\end{document}
If I then run htlatex
, I get the following HTML as output:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
<!-- html -->
<meta name="src" content="test.tex">
<meta name="date" content="2013-10-02 14:03:00">
<link rel="stylesheet" type="text/css" href="test.css">
</head><body
>
<!--l. 3--><p class="noindent" >Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ante odio,
condimentum ut nunc vel, rutrum rhoncus arcu. Praesent id justo tellus. Donec ut
eros sagittis, bibendum augue id, luctus nulla. Aenean commodo ultrices turpis eget
cursus. Pellentesque laoreet turpis leo, gravida laoreet libero sagittis sit amet. Fusce
ut suscipit purus. Donec euismod dolor sit amet risus lacinia, ut pellentesque orci
posuere. Morbi rutrum, sem ut elementum elementum, urna purus faucibus felis, vel
rutrum mauris risus non erat. Proin commodo felis id mi feugiat rutrum. Cras et
tempor massa. Donec tempor ante sed nibh varius, quis rutrum ipsum rutrum.
Integer consectetur justo fermentum libero ultrices, eu fermentum nisl tempor.
</body></html>
Notice that the single long line in the input has been broken into many short lines in the output. I would like it to instead appear as just a single line, as before.
(By the way, why do I care? Some content management systems (e.g., certain instances of WordPress) will automatically interpret newline characters in HTML as actual line breaks. Hence, the final rendered appearance of the document is wrong. One might argue that the real problem is with the CSS used in the content management system, but for a variety of reasons (permissions, backwards compatibility, etc.) modifying the CSS is often not a viable option.)