# Does the oolatex part of tex4ht support the titling package?

I've been using the oolatex part of tex4ht in order to convert a LaTeX documet to an Open Office document (with the goal of eventually converting this to Microsoft Word), running it through the mk4ht command.

The command I use, on Windows, is: mk4ht oolatex TexFileName

I noticed you can only have one title page by default with the title environment and /maketitle, so I tried using the package "titling" to allow more than one.

Seeing this did not work, I tried the example under the first answer given at: Two 'maketitle's in article

I found the first title was used while the second was still ignored. I checked in miktex, and I have the titling package.

Does the oolatex part of tex4ht support packages such as titling? If it does not, is my only open to put manual line break and page break commands and then use regular formatting for manually created title pages?

There was no support for the titling package, but it is not hard to add a basic support.

The reason why the second \maketitle command doesn't work is that the \maketitle is patched by tex4ht and it is explicitly disabled after the first use, so the second call doesn't produce any text. The following file, titling.4ht tries to fix that:

\let\titling:maketitle\maketitle
\def\new:titling:maketitle{\titling:maketitle\let\maketitle\new:titling:maketitle}
\def\maketitle{\new:titling:maketitle}
\Hinput{titling}

It seems to work with the following test file:

% https://tex.stackexchange.com/q/497988/2891
\documentclass[a4paper,11pt]{article}
\usepackage{titling}
\pretitle{\begin{center}\huge}
\posttitle{\par\end{center}\vspace{\baselineskip}}
\preauthor{\normalfont\normalsize\begin{center}\begin{tabular}[t]{c}}
\postauthor{\end{tabular}\end{center}\vspace{\baselineskip}}

\title{Title 1}
\author{Author\\Supervisors: Prof. X}
\date{}

\begin{document}

\part{Heisenberg Picture}

\maketitle

\section{Section 1}

\clearpage

\part{Schroedinger Picture}
\title{Title 2}
\author{Author\\Supervisors: Prof Y}
\maketitle

\section{Section 1}

\end{document}

Result in LibreOffice: