# Tex4ht, LaTeX to Docbook: Quote-Environment not transformed to <blockquote>

I've been using Tex4ht to create a Word-File from LaTeX via ODT (oolatex). I've been wondering if the conversion process can be easier if we generate a Docbook XML from LaTeX. This could be the transformed to DOCX with pandoc.

Now, if I have a basic file like this:

\documentclass{article}
\begin{document}
Some Text

\begin{quote}
A quotation.
\end{quote}

Some more text.

\end{document}


The relevant part in the resulting Docbook XML looks like this:

 --><para>Some Text</para><!--l. 7
--><para>A quotation.</para><!--l. 10
--><para>Some more text.</para>


Why is the quote-environment not transformed into a blockquote element? Is this a bug? How can we get the supposed behavior?

• the Docbook support is nowhere as complete as HTML or ODT support in tex4ht. so configuration for quote is just missing. why do you think it will be easier to use Docbook instead of ODT? – michal.h21 Nov 11 '17 at 21:07
• Ok. I supposed that a rather basic construct like quote would be covered. – Denis Nov 12 '17 at 21:25
• Concerning Docbook being easier to use than ODT: First, I have the impression that Docbook is cleaner, better to read and better to parse than ODT, probably since it is a intended for composing documents, whereas ODT is a file format. Also, I find the documentation more accessible. – Denis Nov 12 '17 at 22:08
• I've added the configuration for quote to tex4ht sources, so this change should be included in TeX distributions soon, hopefully. Nobody is working on the Docbook support systematically, so I am sure many more things are missing. – michal.h21 Nov 12 '17 at 22:57

The configuration for quote environment is missing in tex4ht support for Docbook. You can try the following configuration file:

\Preamble{xhtml}
\ConfigureEnv{quote}{\ifvmode\IgnorePar\fi\EndP\HCode{<blockquote>}}{\ifvmode\IgnorePar\fi\EndP\HCode{</blockquote>}\par\ShowPar}{}{}
\begin{document}
\EndPreamble


It will insert <blockqoute> element around the quote environment contents. The \IgnorePar, \EndP and \ShowPar will fix possible issues with paragraphs.

This is the result:

<article