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

How can I learn how to edit 4ht files? What should I read?

I want to fix a number of issues in ooffice.4ht (inconsistent footnote size, style names which mismatch names used by LibreOffice, dangling space at the end of sentences, etc.)

I've read the chapter on tex4ht in the LaTeX Web Companion, but I'm still unable to read, let alone modify, it.

share|improve this question
up vote 3 down vote accepted

Open document format is big and ugly, so ooffice.4ht is also big and ugly. If you want to better understand, what is going on, you must understand some basics, which are described in resources posted in your post.

ooffice.4ht also add some custom macros, useful for dealing with styles. There are two types of styles used here. One are defined in file with text content, an they are configured like in the answer about inconsistent footnotes:

   {\csname a:footnote-style\endcsname}
<style:style style:name="Footnote-text" style:family="text">
<style:text-properties fo:font-size="10.0pt" />

With \NewConfigure{footnote-style}{1} you are declaring new configuration footnote-style, with one parameter. With \Configure{footnote-style} you declare the style and \Configure{automatic-styles} is inserting call to the declared configuration footnote-style. You must use internal name a:footnote-style, this is created automaticaly by NewConfigure.

Other style macros are \NewConfigureOO and \ConfigureOO:

\ConfigureOO{textul}{<style:style style:name="textul" style:family="text">
    <style:text-properties style:text-underline-style="solid"

These configurations go to the settings.xml file. I don't know what is the key about what styles belongs to styles.xml and which to the content.xml, you must find that in odf documentation.

Other parts of that file deals with command redefinitions for inserting configurable hooks and providing xml configurations with these hooks.

share|improve this answer


  1. documentation in source repository.

  2. more on configuration at tug.org

  3. Michel Goossens, Sebastian Rahtz et al. The LaTeX Web Companion. Addison Wesley, 1999, pp. 169-194,404-415.


  1. Maarten Wisse (2002) “Hacking TeX4ht for XML Output: The Road toward a TeX to Word Convertor”, MAPS 28, 2002, pp. 28-35.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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