1.8.1 Shared

THe following protects section titles from side effects, and also is introduced for protecting writeups to tables of contents.

<..configure ooffice latex..>+
 \Configure{NoSection}
   {\let\sv:index\index \let\sv:label\label
    \let\sv:newline\newline \def\newline{ }%
    \let\sv:setfontsize\@setfontsize  \let\@setfontsize\:gobbleIII
    \let\index\@gobble  \let\label\@gobble
    \let\sva:rEfLiNK\a:rEfLiNK
    \let\svb:rEfLiNK\b:rEfLiNK
    \let\svc:rEfLiNK\c:rEfLiNK
    \expandafter\let\expandafter\svC:rEfLiNK\c:rEfLiNK
    \Configure{ref}{}{}{}%  \let\sv:ref\ref  \let\ref\@gobble
   }
   {\let\index\sv:index \let\label\sv:label
    \let\a:rEfLiNK\sva:rEfLiNK
    \let\b:rEfLiNK\svb:rEfLiNK
    \let\c:rEfLiNK\svc:rEfLiNK
    \expandafter\let\c:rEfLiNK\svC:rEfLiNK  %  \let\ref\sv:ref
    \let\newline\sv:newline    \let\@setfontsize\sv:setfontsize
   }
 
-_-_-

<..configure ooffice latex..>+
 \Configure{InsertTitle}{\let\label\lb:l
    \let\ref\o:ref \Configure{ref}{}{}{}}
 \Configure{AfterTitle}{\let\index\:index
        \let\ref\:ref  \let\label\lb:l }
-_-_-

The labels are needed for labels nested within titles.

<..basic ooffice sections..>
 \ifx \part\:UnDef\else
   \Configure{part}
      {\IgnorePar\EndP \HCode{<!--start part-->}}
      {\IgnorePar\EndP \HCode{<!--end part-->}}
      {\HCode{<text:p text:style-name="part"  >
              <text:span text:style-name="part">}\TitleMark\space
       \HCode{</text:span>}%
       \HCode{<text:line-break/>}}
      {\HCode{</text:p>\Hnewline}\par\ShowPar\IgnoreIndent}
   \ConfigureMark{part}{\partname\space\thepart}
   \NewConfigureOO{part}
   \ConfigureOO{part}{\Hnewline
   <style:style style:name="part"
                     style:family="paragraph"
                     style:parent-style-name="Heading<.cond rtl class.>"
                     style:next-style-name="Text-body"
                     style:list-style-name="part">\Hnewline
   <style:paragraph-properties  fo:margin-top="0.52cm"
                     fo:margin-bottom="0.21cm"
                     fo:font-size="18pt"/>\Hnewline
   </style:style>\Hnewline
   }
 \fi
-_-_-

<..od definitions..>
 \def\list:text:level{text:level}
 \def\text:outlinelevel{text:outline-level}
 \def\style:tableproperties{style:table-properties }
 \def\style:sectionproperties{style:section-properties }
 \def\text:orderedlist{text:list }
 \def\text:unorderedlist{text:list }
-_-_-

<..ooffice chapters..>
 \Configure{chapter}
    {\IgnorePar\EndP \HCode{<!--start of chapter--><.new page.>}}
    {\IgnorePar\EndP \HCode{<!--end of chapter-->}}
    {\HCode{<text:h
            text:style-name="\csname a:Heading-1<.cond rtl class.>\endcsname"
         \text:outlinelevel="1"  ><text:span
         text:style-name="chapter"  >}\TitleMark\space
     \HCode{</text:span>}%
     \HCode{<text:line-break/>}\IgnoreIndent}
    {\HCode{</text:h>\Hnewline}\par\ShowPar}
 \Configure{likechapter}
    {\IgnorePar\EndP \HCode{<!--start of chapter*--><.new page.>}}
    {\IgnorePar\EndP \HCode{<!--end of chapter*-->}}
    {\HCode{<text:h
            text:style-name="\csname a:Heading-1<.cond rtl class.>\endcsname"
         \text:outlinelevel="1"  >}\IgnoreIndent}
    {\HCode{</text:h>\Hnewline}\par\ShowPar}
-_-_-

<..report chapters..>
 \ConfigureMark{chapter}
    {\chaptername \ \thechapter}
-_-_-

<..book chapters..>
 \ConfigureMark{chapter}
    {\if@mainmatter \chaptername \ \thechapter\fi}
-_-_-

<..book chapters..>+
 \ConfigureMark{appendix}
    {\if@mainmatter \appendixname \ \thechapter\fi}
 \Configure{appendix}
    {\IgnorePar\EndP \HCode{<!--start of appendix--><.new page.>}}
    {\IgnorePar\EndP \HCode{<!--end of appendix-->}}
    {\HCode{<text:h text:style-name="\csname a:Heading-1<.cond rtl class.>\endcsname"
         \text:outlinelevel="1"  ><text:span
         text:style-name="chapter"  >}\TitleMark\space
     \HCode{</text:span>}%
     \HCode{<text:line-break/>}\IgnoreIndent}
    {\HCode{</text:h>\Hnewline}\par\ShowPar}
-_-_-

<..basic ooffice sections..>+
 \ConfigureMark{section}
    {\ifnum \c:secnumdepth>\c@secnumdepth \expandafter\:gobble
     \else  \@seccntformat{section}\fi }
 \Configure{section}
    {\IgnorePar\EndP \HCode{<!--start of section-->}}
    {\IgnorePar\EndP \HCode{<!--end of section-->}}
    {\HCode{<text:h
             text:style-name="\csname a:Heading-2<.cond rtl class.>\endcsname"
                    \text:outlinelevel="2" ><text:span
                    text:style-name="section" >}\TitleMark\space
     \HCode{</text:span>}\IgnoreIndent}
    {\HCode{</text:h>\Hnewline}\par\ShowPar}
-_-_-

<..basic ooffice sections..>+
 \ConfigureMark{subsection}
    {\ifnum \c:secnumdepth>\c@secnumdepth  \expandafter\:gobble
     \else \@seccntformat{subsection}\fi }
 \Configure{subsection}
    {\IgnorePar\EndP \HCode{<!--start of subsection-->}}
    {\IgnorePar\EndP \HCode{<!--end of subsection-->}}
    {\HCode{<text:h
            text:style-name="\csname a:Heading-3<.cond rtl class.>\endcsname"
                    \text:outlinelevel="3"   ><text:span
                    text:style-name="subsection"  >}\TitleMark\space
     \HCode{</text:span>}\IgnoreIndent}
    {\HCode{</text:h>\Hnewline}\par\ShowPar}
-_-_-

<..basic ooffice sections..>+
 \ConfigureMark{subsubsection}
    {\ifnum \c:secnumdepth>\c@secnumdepth  \expandafter\:gobble
     \else \@seccntformat{subsubsection}\fi }
 \Configure{subsubsection}
    {\IgnorePar\EndP \HCode{<!--start of subsubsection-->}}
    {\IgnorePar\EndP \HCode{<!--end of subsubsection-->}}
    {\HCode{<text:h
            text:style-name="\csname a:Heading-4<.cond rtl class.>\endcsname"
                    \text:outlinelevel="4"   ><text:span
                    text:style-name="subsubsection"  >}\TitleMark\space
     \HCode{</text:span>}\IgnoreIndent}
    {\HCode{</text:h>\Hnewline}\par\ShowPar}
-_-_-

<..basic ooffice sections..>+
 \Configure{likesection}
    {\IgnorePar\EndP \HCode{<!--start of section*-->}}
    {\IgnorePar\EndP \HCode{<!--end of section*-->}}
    {\HCode{<text:h
            text:style-name="\csname a:Heading-2<.cond rtl class.>\endcsname"
                    \text:outlinelevel="2"  >}\IgnoreIndent}
    {\HCode{</text:h>\Hnewline}\par\ShowPar}
 \Configure{likesubsection}
    {\IgnorePar\EndP \HCode{<!--start of subsection*-->}}
    {\IgnorePar\EndP \HCode{<!--end of subsection*-->}}
    {\HCode{<text:h
            text:style-name="\csname a:Heading-3<.cond rtl class.>\endcsname"
                    \text:outlinelevel="3"  >}\IgnoreIndent}
    {\HCode{</text:h>\Hnewline}\par\ShowPar}
-_-_-

<..basic ooffice sections..>+
 \Configure{paragraph}
    {\par\ShowPar \noindent\HCode{<!--start of paragraph-->}}
    {\HCode{<!--end of paragraph-->}\par\ShowPar}
    {\HCode{<text:span text:style-name="paragraph-h" >}}
    {\HCode{</text:span><text:s/><text:s/>\Hnewline}\IgnorePar}
 \Configure{subparagraph}
    {\par\ShowPar \noindent\HCode{<!--start of subparagraph-->}}
    {\HCode{<!--end of subparagraph-->}\par\ShowPar}
    {\HCode{<text:span text:style-name="subparagraph-h" >}}
    {\HCode{</text:span><text:s/><text:s/>\Hnewline}\IgnorePar}
-_-_-

<..basic ooffice sections..>+
 \NewConfigureOO{paragraph-h}
 \ConfigureOO{paragraph-h}{
    <style:style style:name="paragraph-h" style:family="text">\Hnewline
       <style:text-properties fo:font-style="normal"
                         fo:font-weight="bold"/>\Hnewline
    </style:style>\Hnewline
 }
-_-_-

<..basic ooffice sections..>+
 \NewConfigureOO{subparagraph-h}
 \ConfigureOO{subparagraph-h}{
    <style:style style:name="subparagraph-h" style:family="text">\Hnewline
       <style:text-properties fo:font-style="normal"
                         fo:font-weight="bold"/>\Hnewline
    </style:style>\Hnewline
 }
-_-_-

<..basic ooffice sectionsNO..>
 \Configure{paragraph}
    {\IgnorePar\EndP \HCode{<!--start of paragraph-->}}
    {\IgnorePar\EndP \HCode{<!--end of paragraph-->}}
    {\HCode{<text:h
            text:style-name="\csname a:Heading-5<.cond rtl class.>\endcsname"
                    \text:outlinelevel="5"  >}}
    {\HCode{</text:h>\Hnewline}\par\ShowPar}
 \Configure{subparagraph}
    {\IgnorePar\EndP \HCode{<!--start of subparagraph-->}}
    {\IgnorePar\EndP \HCode{<!--end of subparagraph-->}}
    {\HCode{<text:h
            text:style-name="\csname a:Heading-6<.cond rtl class.>\endcsname"
                    \text:outlinelevel="6"  >}}
    {\HCode{</text:h>\Hnewline}\par\ShowPar}
-_-_-

<..configure ooffice tex4ht..>+
 \Configure{TocAt}{}{}
 \Configure{TocAt*}{}{}
-_-_-

A configuration ‘\Configure{Heading-1}{Heading 1}’ will provide the default setting of OpenOffice. It might be a more desirable for translations into MS Word.

<..basic ooffice section styles..>
 \NewConfigure{Heading-1}{1}
 \Configure{Heading-1}{Heading-1}
 \NewConfigureOO{Heading-1}
 \ConfigureOO{Heading-1}{\Hnewline
 <style:style style:name="Heading-1"
                   style:family="paragraph"
                   style:parent-style-name="Heading"
                   style:next-style-name="Text-body"
                   style:class="text">\Hnewline
 <style:paragraph-properties  fo:font-size="17.2999992370605pt"
                   fo:font-weight="bold"
                   style:font-size-asian="115\%"
                   style:font-weight-asian="bold"
                   style:font-size-complex="115\%"
                   style:font-weight-complex="bold"
                   fo:margin-top="40pt"
                   fo:margin-bottom="25pt"
                 />
 </style:style>
 \Hnewline <.Heading 1 rtl.> }
-_-_-

<..basic ooffice section styles..>+
 \NewConfigure{Heading-2}{1}
 \Configure{Heading-2}{Heading-2}
 \NewConfigureOO{Heading-2}
 \ConfigureOO{Heading-2}{\Hnewline
 <style:style style:name="Heading-2"
                   style:family="paragraph"
                   style:parent-style-name="Heading"
                   style:next-style-name="Text-body"
                   style:class="text">\Hnewline
 <style:paragraph-properties  fo:font-size="14.3999996185303pt"
                   style:font-size-complex="14pt"
                   style:font-style-complex="italic"
                   style:font-weight-complex="bold"
                   fo:margin-top="12pt"
                   fo:margin-bottom="9pt"
                />
 </style:style>
 \Hnewline <.Heading 2 rtl.> }
-_-_-

<..basic ooffice section styles..>+
 \NewConfigure{Heading-3}{1}
 \Configure{Heading-3}{Heading-3}
 \NewConfigureOO{Heading-3}
 \ConfigureOO{Heading-3}{\Hnewline
 <style:style style:name="Heading-3"
                   style:family="paragraph"
                   style:parent-style-name="Heading"
                   style:next-style-name="Text-body"
                   style:class="text">\Hnewline
 <style:paragraph-properties  fo:font-size="12pt"
                   fo:font-weight="bold"
                   style:font-size-asian="14pt"
                   style:font-weight-asian="bold"
                   style:font-size-complex="14pt"
                   style:font-weight-complex="bold"/>
 </style:style>
 \Hnewline <.Heading 3 rtl.>}
-_-_-

<..basic ooffice section styles..>+
 \NewConfigure{Heading-4}{1}
 \Configure{Heading-4}{Heading-4}
 \NewConfigureOO{Heading-4}
 \ConfigureOO{Heading-4}{\Hnewline
 <style:style style:name="Heading-4"
                   style:family="paragraph"
                   style:parent-style-name="Heading"
                   style:next-style-name="Text-body"
                   style:class="text">\Hnewline
 <style:paragraph-properties  fo:font-size="12pt"
                   fo:font-weight="bold"
                   fo:margin-top="0.42cm"
                   fo:margin-bottom="0cm"
                   style:font-size-complex="85\%"
                   style:font-style-complex="italic"
                   style:font-weight-complex="bold"
 />
 </style:style>
 \Hnewline  <.Heading 4 rtl.>}
-_-_-

<..basic ooffice section styles..>+
 \NewConfigure{Heading-5}{1}
 \Configure{Heading-5}{Heading-5}
 \NewConfigureOO{Heading-5}
 \ConfigureOO{Heading-5}{\Hnewline
 <style:style style:name="Heading-5"
                   style:family="paragraph"
                   style:parent-style-name="Heading"
                   style:next-style-name="Text-body"
                   style:class="text">\Hnewline
 <style:paragraph-properties  fo:margin-left="0cm"
                   fo:margin-right="0cm"
                   fo:margin-top="0.42cm"
                   fo:margin-bottom="0cm"
                   fo:font-size="12pt"
                   fo:font-style="italic"
                   fo:font-weight="normal"
                   style:font-size-complex="85\%"
                   style:font-weight-complex="bold"
                   fo:text-indent="0cm"
                   style:auto-text-indent="false"/>
 </style:style>
 \Hnewline <.Heading 5 rtl.>}
-_-_-

<..basic ooffice section styles..>+
 \NewConfigure{Heading-6}{1}
 \Configure{Heading-6}{Heading-6}
 \NewConfigureOO{Heading-6}
 \ConfigureOO{Heading-6}{\Hnewline
 <style:style style:name="Heading-6"
                   style:family="paragraph"
                   style:parent-style-name="Heading"
                   style:next-style-name="Text-body"
                   style:class="text">\Hnewline
 <style:paragraph-properties  fo:font-size="75\%"
                   fo:font-weight="bold"
                   style:font-size-asian="75\%"
                   style:font-weight-asian="bold"
                   style:font-size-complex="75\%"
                   style:font-weight-complex="bold"/>
 </style:style>
 \Hnewline <.Heading 6 rtl.>}
-_-_-

<..basic ooffice section styles..>+
 \NewConfigure{Heading-7}{1}
 \Configure{Heading-7}{Heading-7}
 \NewConfigureOO{Heading-7}
 \ConfigureOO{Heading-7}{\Hnewline
 <style:style style:name="Heading-7"
                   style:family="paragraph"
                   style:parent-style-name="Heading"
                   style:next-style-name="Text-body"
                   style:class="text">\Hnewline
 <style:paragraph-properties  fo:font-size="75\%"
                   fo:font-weight="bold"
                   style:font-size-asian="75\%"
                   style:font-weight-asian="bold"
                   style:font-size-complex="75\%"
                   style:font-weight-complex="bold"/>
 </style:style>
 \Hnewline <.Heading 7 rtl.>}
-_-_-

<..basic ooffice section styles..>+
 \NewConfigure{Heading-8}{1}
 \Configure{Heading-8}{Heading-8}
 \NewConfigureOO{Heading-8}
 \ConfigureOO{Heading-8}{\Hnewline
 <style:style style:name="Heading-8"
                   style:family="paragraph"
                   style:parent-style-name="Heading"
                   style:next-style-name="Text-body"
                   style:class="text">\Hnewline
 <style:paragraph-properties  fo:font-size="75\%"
                   fo:font-weight="bold"
                   style:font-size-asian="75\%"
                   style:font-weight-asian="bold"
                   style:font-size-complex="75\%"
                   style:font-weight-complex="bold"/>
 </style:style>
 \Hnewline <.Heading 8 rtl.>}
-_-_-

<..basic ooffice section styles..>+
 \NewConfigure{Heading-9}{1}
 \Configure{Heading-9}{Heading-9}
 \NewConfigureOO{Heading-9}
 \ConfigureOO{Heading-9}{\Hnewline
 <style:style style:name="Heading-9"
                   style:family="paragraph"
                   style:parent-style-name="Heading"
                   style:next-style-name="Text-body"
                   style:class="text">\Hnewline
 <style:paragraph-properties  fo:font-size="75\%"
                   fo:font-weight="bold"
                   style:font-size-asian="75\%"
                   style:font-weight-asian="bold"
                   style:font-size-complex="75\%"
                   style:font-weight-complex="bold"/>
 </style:style>
 \Hnewline <.Heading 9 rtl.>}
-_-_-

<..basic ooffice section styles..>+
 \NewConfigure{Heading-10}{1}
 \Configure{Heading-10}{Heading-10}
 \NewConfigureOO{Heading-10}
 \ConfigureOO{Heading-10}{\Hnewline
 <style:style style:name="Heading-10"
                   style:family="paragraph"
                   style:parent-style-name="Heading"
                   style:next-style-name="Text-body"
                   style:class="text">\Hnewline
 <style:paragraph-properties  fo:font-size="75\%"
                   fo:font-weight="bold"
                   style:font-size-asian="75\%"
                   style:font-weight-asian="bold"
                   style:font-size-complex="75\%"
                   style:font-weight-complex="bold"/>
 </style:style>
 \Hnewline <.Heading 10 rtl.>}
-_-_-