When a LaTeX document containing 2 footnotes — footnote #1 is plain ASCII, but footnote #2 has diacritics or other extended characters — is converted to odt (OpenDocument Format), the number in footnote #1 is smaller than the number in footnote #2.

  • Do you get the same output?
  • How can I make the numbers be of the same size?

For example:

First sentence.\footnote{First footnote.}
Second sentence.\footnote{S{\' e}cond footnote.}

This is the output from pdftex:


And this is the output from $ mk4ht oolatex


TeX Live (2012), mk4ht (v1.1), OpenOffice.org (3.4.1)


It seems like openoffice bug to me. If you unzip the odt file and open content.xml file, you can see:

<text:note text:note-class="footnote" text:id="fn1x0"><text:note-citation>1</text:note-citation><text:note-body> <text:p text:style-name="Footnote"><text:span text:style-name="ecrm-0800">First footnote.</text:span></text:p></text:note-body></text:note>
<text:note text:note-class="footnote" text:id="fn2x0"><text:note-citation>2</text:note-citation><text:note-body> <text:p text:style-name="Footnote"><text:span text:style-name="ecrm-0800">S</text:span><text:span text:style-name="ecrm-0800">&#xE9;</text:span><text:span text:style-name="ecrm-0800">cond footnote.</text:span></text:p></text:note-body></text:note>

Only difference between the two footnotes is that there are some extra <text:span ...> elements in the second footnote. This is caused by how tex4ht handles accented letters. It seems that openoffice chooses footnote mark size according do biggest element in footnote text, but in this case all elements are the same size, so there should be no reason why the footnote mark is bigger.

To get rid of these <text:span> elements, we must redefine footnote handling in oolatex. Create dummy package myfootnote.sty and use this package in your preamble. This file can be empty, it's purpose is only to call file myfootnote.4ht when running with tex4ht. Now contents of myfootnote.4ht:

   {\csname a:footnote-style\endcsname}
<style:style style:name="Footnote-text" style:family="text">
<style:text-properties fo:font-size="10.0pt" />
   {\Tag{fn\FNnum x\minipageNum
    \ifTag{fn\FNnum x\minipageNum
   {\expandafter\ifx\csname (fn\FNnum x\minipageNum
       \:warning{Multiple footnote texts for mark \FNnum}%
   } {}%
    \SaveEndP \NoFonts  \let\@textsuperscript\hbox
             text:id="}fn\FNnum x\minipageNum
    \IgnorePar \special{t4ht@(}%
   {\EndNoFonts \RecallEndP
    <text:p\Hnewline text:style-name="Footnote"><text:span text:style-name="Footnote-text">}\NoFonts%
    \SaveHtmlPar \Configure{HtmlPar}
   {\EndP \HCode{<text:p text:style-name="Footnote"><text:span text:style-name="Footnote-text">}}
   {\EndP \HCode{<text:p text:style-name="Footnote"><text:span text:style-name="Footnote-text">}}
\ShowPar \special{t4ht@)}%
   {\RecallHtmlPar \EndNoFonts\HCode{</text:span></text:p></\text:footnote-body></\text:footnote>}%
   \let\csname (fn\FNnum x\minipageNum

with \:CheckOption{ooffice} we ensure that this code is included only if document is running with oolatex, not with htlatex. Then we create openoffice style Footnote-text, which is included with \Configure{automatic-styles} into main document. Then there is \Configure{footnotetext}. We must include it in \AtBeginDocument, otherwise it is replaced with default values. Contents are copied from the file ooffice.4ht, we only added some tags and \NoFonts and \EndNoFonts macros, which suppresses creation of <text:span> elements for characters with diacritics.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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