maranget / hevea

Hevea is a fast latex to html translator
http://hevea.inria.fr
Other
97 stars 12 forks source link

Fix environment name s/FlushLeftRight/FlushRight/. #53

Open cspiel opened 3 years ago

cspiel commented 3 years ago

Also add some missing end-of-environment macros, which caused warnings.

@maranget: In this context I'm not satisfied with Html.insert_block.

and insert_block s attr =
  if find_prev_par () then
    warning "Ignoring \\centering or \\ragged..."
  else
    insert_block (find_block s) attr

The "warning" is potentially misleading; it is not only triggred by the macros it mentions.

cspiel commented 3 years ago

In fact the problem of Html.insert_block is not just the warning. It inhibits the correct flayout in

\documentclass{article}
\begin{document}
\raggedleft Ragged-left text.

\raggedright Ragged-right text.

\centering Centered text.
\end{document}

In my experiments this example is translated faithfully if the conditional iside of the function is removed. Proceed with fingers crossed... :astonished: