TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I'm getting into a bit of trouble, trying to convert a Latex article to OpenOffice. First of all, I'm using Ubuntu 11.04, with a texlive 2011 installation (installed via tlmgr).

EDIT1: There is now a MWE based on the test case given (which is a shell script) - see at end of post

Here is the test case I'm working with:

mkdir tmp && cd tmp
wget http://www.inderscience.com/www/download/latex_singlecolumn_2010.zip
unzip latex_singlecolumn_2010.zip
cd Single-column/Single-column/
ln -s ../../singlecol-new.cls . # symlink class file in top dir

# make a copy to a test latex file:
cp IJDMB-4\(4\)07-MullahandEguchi.tex mytemp.tex
# hack temp latex file; end of its preamble at "\spaceskip=3.5pt..." line
sed -ri 's_^\\spaceskip(.*)_\
\\hypersetup{colorlinks=, linkcolor=, citecolor=, filecolor=, urlcolor=}\
% hack for math in sections:\
_' mytemp.tex

# do a test run
pdflatex mytemp.tex
# OK: Output written on mytemp.pdf (12 pages, 249090 bytes).

Good enough for now - but I'd like to use oolatex now on this doc; and since there's no oolatex in texlive, I try this:

mk4ht oolatex mytemp.tex

... and the process fails at:

Package hyperref Message: Driver: htex4ht.
! Undefined control sequence.
<argument> \headerps@out
                         {/burl@stx null def /BU.S { /burl@stx null def } de...
l.306 }

Now, I found somewhere the line \def\headerps@out#1{\special{! #1}}%, and if I add it to my preamble here:

\spaceskip=3.5pt plus1.47pt minus0.77pt \makeatother

\def\headerps@out#1{\special{! #1}}%


then it seems to get registered - and if I try to build again, the process fails with another error:

$ mk4ht oolatex mytemp.tex
! Undefined control sequence.
<argument> ...\a:mathml columnlines="\columnlines
                                                  " \a:mathml equalcolumns="...
l.203 G
       _2\\[1pt] G_1\\

Anyone have an idea how could I get the above example to build as OpenOffice document?

Many thanks in advance for any answers,

EDIT1: Here is a MWE file that reveals the exact same problem:



\def\bmD{\mbox{\boldmath $D$}}          %99.10.1
\def\bmE{\mbox{\boldmath $E$}}        %99.6.29
\def\bmG{\mbox{\boldmath $G$}}


% \makeatletter
% \def\headerps@out#1{\special{! #1}}%
% \makeatother

\hypersetup{colorlinks=, linkcolor=, citecolor=, filecolor=, urlcolor=}
% hack for math in sections:
% see http://tex.stackexchange.com/a/50854/2595
\newcommand{\mysectionStar}[1]{  % no two arguments here?
\typeout{AAAA}% debug
\newcommand{\mysectionNoStar}[1]{ %
\typeout{BBBB}% debug
\oldsection[TOC-ENTRY:\thesection]{#1} }


\title{Robust QTL analysis by minimum ${\bm\beta}$-divergence method}
% \title{Robust method}



The basic methodology for mapping QTLs involves arranging a
cross between two inbred strains differing substantially in a
quantitative trait: segregating progeny are scored both for the
trait and for a number of genetic markers. A cross between two
parental inbred lines $P_1$ and $P_2$ is performed to produce
an $F_1$ population. .... \cite{Zeng94} named this
combination as~CIM.

\section{Genetic model}\label{modelMLE}

Let us consider a QTL in the backcross population in which the
frequencies of genotypes $QQ$ and $Qq$ are $1/2$ and $1/2$,
respectively. The genetic model for a QTL is as follows:
\bmG =
G_2\\[1pt] G_1\\
1\\[1pt] 1\\
\mu +
1/2\\[2pt] -1/2\\
[a] ={\bf 1}_{2\times 1}\mu+\bmD\bmE.

\section{Robust QTL analysis by CIM model based on minimum\\
 ${\bm\beta}$-divergence estimators}\label{BetaDivergence}

The $\beta$-divergence between two probability density
functions $p(u)$ and $q(u)$ is defined~as
D_{\beta}{(p, q)}
for $\beta>0$.


This paper discusses a new robust QTL mapping algorithm based
on CIM model in an experimental organisms by minimising
$\beta$-divergence using the EM like algorithm.
... However, $R_\beta$ should satisfy $0\leq{R_\beta}\leq 1$


\bibitem[\protect\citeauthoryear{Basu et~al.}{1998}]{Basu98}
Basu, A., Harris, I.R., Hjort, N.L. and Jones, M.C. (1998)
`Robust and efficient estimation by minimising a density power
divergence', {\it Biometrika}, Vol.~85, pp.549--559.

Zeng, Z.B. (1994) `Precision mapping of quantitative trait
loci', {\it Genetics}, Vol.~136, \h{pp.1457--1468}.


share|improve this question

marked as duplicate by krlmlr, Peter Jansson, Guido, Jesse, Martin Schröder Feb 18 '14 at 11:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 3 down vote accepted

Ah darn it - I should have looked better ;)

Well, if we look at the second error more closely:

! Undefined control sequence.
<argument> ...\a:mathml columnlines="\columnlines
                                                  " \a:mathml equalcolumns="...

... it is quite noticeable, due to the linebreak, that \columnlines is the problem; so I searched a bit more on that - and it turns out it's a know bug from 2009: [tex4ht] Bug Report: oolatex broken:

That was due to the uninialized macro, \columnlines. A quick and dirty trick will be to insert the following line at the top of your document:


The bug will be fixed in the next release of TeX4ht which is not far off.

So, as noted in the post, just add \let\columnlines\empty right after the \def\headerps@out part - and finally, mk4ht oolatex ... passes without a problem :) (I'm noting however, that math is rendered as images in the .odt, and pagination is not preserved - as page margins (and apparently font sizes) are not preserved...).

Well, hope this helps others too,

EDIT: Darn it - and it turns out, the \columnlines thing is essentially a duplicate here: mathmode - Latex to ODF/DOC using mk4ht oolatex failing on equation arrays - TeX - LaTeX - Stack Exchange ... ah, nevermind :)

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.