#StackBounty: #footnotes #tex4ht #arabic #parnotes producing ODT Arabic edition with apparatus in parnotes via tex4ht: customizing parn…

Bounty: 50

I would like to convert my edition of Arabic text into ODT format. The edition uses notes that are supposed appear in a smaller font in a paragraph below the text (not at the bottom of each page). I would like the footnote hooks to be in Arabic-style numerals ١٢٣٤٥٦٧٨٩٠ rather than Roman-style numerals 1234567890. Ideally I would like to be able to select the font (Amiri) to which it will output (current default is Tahoma for the Arabic text).

What I haven’t been able to figure out is

  1. how to make the footnote hooks Arabic-style
  2. how to make the notes paragraph a much smaller font size
  3. how to remove a spurious space that comes after the footnote marker in the notes paragraph.

How can I do this?

MWE

myfile.tex:

documentclass[12pt,letterpaper,oldfontcommands]{memoir}

usepackage{fontspec}
usepackage{xunicode}
usepackage[T1]{fontenc}

newcommand{%
خ%
    }[2]{%
    ar{#1}footnoteA{ar{#1%
    :
    #2}}%
    }

newfontfamilyarabicfont[Script=Arabic,Mapping=arabicdigits]{Amiri}

%Arabic
newcommand{ar}[1]{#1}
newenvironment{arab}{}{}

% APPARATUS FOR VARIANTS IN ARABIC TEXT
usepackage[para]{manyfoot}
SetFootnoteHook{setRL}
DeclareNewFootnote[para]{A}[alph]

%%%%%%%%%%%%%%%%%%%%%%%%%%
% Placing Arabic apparatus at the end of each paragraph
% (WARNING !!! :  currently only works if VARIANT commands only come within `arab` environments)
usepackage[restart]{parnotes} % package
renewcommand{parnotefmt}[1]{tinynoindent #1}
renewcommand{footnoteA}[1]{parnote{#1}} % mk app fns parnotes
% renewcommand*{parnotecusmarkfmt}[1]{arabicfontaddfontfeature{Mapping=arabicdigits}textsuperscript{#1}}
renewcommand*{parnotecusmarkfmt}[1]{arabicfontaddfontfeature{Mapping=arabicdigits}textsuperscript{#1}}

letorigArabarab
renewenvironment{arab}{begin{origArab}}{parnotes{}end{origArab}} % make arab environment print parnotes at the end
%%%%%%%%%%%%%%%%%%%%%%%%%%

begin{document}
begin{arab}
خ{لكن لما}{ڤ؛ إنني كلما: ي}
end{arab}
end{document}

Compiled with

make4ht -uxm draft -f odt -c myconfig.cfg

where myconfig.cfg is:

Preamble{xhtml}
ConfigureOO{Footnote}{
<style:style
    style:name="Footnote"
    style:family="paragraph"
    style:parent-style-name="Standard"
    style:class="extra">Hnewline
  <style:paragraph-properties
             fo:margin-left="0in"
             fo:margin-right="0in"
             fo:text-indent="0.1in"
              style:auto-text-indent="false"/>
  <style:text-properties fo:font-size="83.3333333333333333333333%"
      style:font-size-asian="83.3333333333333333333333%"
      style:font-size-complex="83.3333333333333333333333%" />
</style:style>Hnewline
<text:notes-configuration text:note-class="footnote"
    text:citation-style-name="Footnote_20_Symbol"
    text:citation-body-style-name="Footnote_20_anchor"
    style:num-format="1" text:start-value="0"
    text:footnotes-position="page"
    text:start-numbering-at="document" />Hnewline
<style:style style:name="Footnote_20_Symbol"
style:display-name="Footnote Symbol" style:family="text" >Hnewline
  <style:text-properties style:text-position="super 58%" />Hnewline
</style:style>
<style:style style:name="Footnote_20_anchor"
style:display-name="Footnote anchor" style:family="text">
  <style:text-properties style:text-position="super 58%" />Hnewline
</style:style>Hnewline
}

ConfigureOO{verse}{Hnewline
<style:style style:name="verse"
             style:family="paragraph"
             style:parent-style-name="Text-body"
             style:next-style-name="Text-body">
<style:paragraph-properties  fo:margin-left="1.499cm"
             fo:margin-right="1cm"
             fo:margin-top="0cm"
             fo:margin-bottom="0cm"
             fo:text-indent="-0.499cm"
             style:auto-text-indent="false">
   <style:tab-stops/>
</style:paragraph-properties >
</style:style>
Hnewline}

xeuniuseblock{Greek}
xeuniuseblock{Arabic}
makeatletter
ConfigureEnv{arab}{@rltrue}{@rlfalse}{}{}
Configure{ref}{Link}{EndLink}{}
makeatother
begin{document}
EndPreamble

current output

enter image description here

desired output

enter image description here


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.