Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

2 Answers 2

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:

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

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:

\NewConfigureOO{textul}
\ConfigureOO{textul}{<style:style style:name="textul" style:family="text">
    <style:text-properties style:text-underline-style="solid"
                           style:text-underline-width="auto"
                           style:text-underline-color="font-color"
    />
</style:style>
}

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

tex4ht:

  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.

ooffice.4ht:

  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

 
discard

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.