]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Refactor abbreviation code; Add inline abbreviations; Fix abbreviations in ODF
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Sun, 5 Mar 2017 15:54:05 +0000 (10:54 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Sun, 5 Mar 2017 15:54:05 +0000 (10:54 -0500)
Sources/libMultiMarkdown/html.c
Sources/libMultiMarkdown/latex.c
Sources/libMultiMarkdown/odf.c
Sources/libMultiMarkdown/writer.c
Sources/libMultiMarkdown/writer.h
tests/MMD6Tests/Abbreviations.fodt [new file with mode: 0644]
tests/MMD6Tests/Abbreviations.html
tests/MMD6Tests/Abbreviations.htmlc
tests/MMD6Tests/Abbreviations.tex
tests/MMD6Tests/Abbreviations.text

index 2726c1ec7345d43ffffa1d03f25caaf6505fff10..a826b4d351bd9e3721ba02154dd389228ec7d6f9 100644 (file)
@@ -354,6 +354,7 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
 
        short   temp_short;
        short   temp_short2;
+       short   temp_short3;
        link *  temp_link       = NULL;
        char *  temp_char       = NULL;
        char *  temp_char2      = NULL;
@@ -1093,28 +1094,46 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
                        mmd_export_token_tree_html(out, source, t->child, scratch);
                        break;
                case PAIR_BRACKET_ABBREVIATION:
-                       if (scratch->extensions & EXT_COMPATIBILITY) {
-                               mmd_export_token_tree_html(out, source, t->child, scratch);
-                       } else {
+                       if (scratch->extensions & EXT_NOTES) {
+                               // Note-based syntax enabled
+
+                               // Classify this use
+                               temp_short2 = scratch->used_abbreviations->size;
+                               temp_short3 = scratch->inline_abbreviations_to_free->size;
                                abbreviation_from_bracket(source, scratch, t, &temp_short);
 
                                if (temp_short == -1) {
+                                       // This instance is not properly formed
                                        print_const("[>");
-                                       mmd_export_token_tree_html(out, source, t->child, scratch);
-                                       print_char(']');
+                                       mmd_export_token_tree_html(out, source, t->child->next, scratch);
+                                       print_const("]");
                                        break;
                                }
 
+                               // Get instance of the note used
                                temp_note = stack_peek_index(scratch->used_abbreviations, temp_short - 1);
 
                                t->child->type = TEXT_EMPTY;
                                t->child->mate->type = TEXT_EMPTY;
-                               
-                               print_const("<abbr title=\"");
-                               mmd_print_string_html(out, temp_note->clean_text, false);
-                               print_const("\">");
+
+                               if (temp_short3 == scratch->inline_abbreviations_to_free->size) {
+                                       // This is a reference definition
+                                       print_const("<abbr title=\"");
+                                       mmd_print_string_html(out, temp_note->clean_text, false);
+                                       print_const("\">");
+                                       mmd_export_token_tree_html(out, source, t->child, scratch);
+                                       print_const("</abbr>");
+                               } else {
+                                       // This is an inline definition
+                                       print_const("<abbr title=\"");
+                                       mmd_print_string_html(out, temp_note->clean_text, false);
+                                       print_const("\">");
+                                       mmd_print_string_html(out, temp_note->label_text, false);
+                                       print_const("</abbr>");
+                               }
+                       } else {
+                               // Note-based syntax disabled
                                mmd_export_token_tree_html(out, source, t->child, scratch);
-                               print_const("</abbr>");                         
                        }
                        break;
                case PAIR_BRACKET_CITATION:
index 01b9c66e8ea36ffb4b9ecd4cd6c42c030f9c522c..d6667f4ec7b1ab2d19d9082185545cab746e01a0 100644 (file)
@@ -1012,21 +1012,43 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat
                        mmd_export_token_tree_latex(out, source, t->child, scratch);
                        break;
                case PAIR_BRACKET_ABBREVIATION:
-                       if (scratch->extensions & EXT_COMPATIBILITY) {
-                               mmd_export_token_tree_latex(out, source, t->child, scratch);
-                       } else {
+                       if (scratch->extensions & EXT_NOTES) {
+                               // Note-based syntax enabled
+
+                               // Classify this use
+                               temp_short2 = scratch->used_abbreviations->size;
+                               temp_short3 = scratch->inline_abbreviations_to_free->size;
                                abbreviation_from_bracket(source, scratch, t, &temp_short);
 
                                if (temp_short == -1) {
+                                       // This instance is not properly formed
                                        print_const("[>");
-                                       mmd_export_token_tree_latex(out, source, t->child, scratch);
-                                       print_char(']');
+                                       mmd_export_token_tree_latex(out, source, t->child->next, scratch);
+                                       print_const("]");
                                        break;
                                }
 
+                               // Get instance of the note used
                                temp_note = stack_peek_index(scratch->used_abbreviations, temp_short - 1);
 
-                               printf("\\gls{%s}", temp_note->label_text);
+                               if (temp_short3 == scratch->inline_abbreviations_to_free->size) {
+                                       // This is a reference definition
+                                       printf("\\gls{%s}", temp_note->label_text);
+                               } else {
+                                       // This is an inline definition
+                                       print_const("\\newacronym{");
+                                       print(temp_note->label_text);
+                                       print_const("}{");
+                                       print(temp_note->label_text);
+                                       print_const("}{");
+                                       print(temp_note->clean_text);
+                                       print_const("}");
+
+                                       printf("\\gls{%s}", temp_note->label_text);
+                               }
+                       } else {
+                               // Note-based syntax disabled
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);
                        }
                        break;
                case PAIR_BRACKET_CITATION:
index 7d170bc049ac8136ff03b51df40b29be895010df..b45ee8350764457897d677554475638569861aa0 100644 (file)
@@ -1069,38 +1069,60 @@ void mmd_export_token_odf(DString * out, const char * source, token * t, scratch
                        break;
                case PAIR_BRACKET_ABBREVIATION:
                        if (scratch->extensions & EXT_NOTES) {
+                               // Note-based syntax enabled
+
+                               // Classify this use
+                               temp_short2 = scratch->used_abbreviations->size;
+                               temp_short3 = scratch->inline_abbreviations_to_free->size;
                                abbreviation_from_bracket(source, scratch, t, &temp_short);
 
                                if (temp_short == -1) {
+                                       // This instance is not properly formed
                                        print_const("[>");
-                                       mmd_export_token_tree_odf(out, source, t->child, scratch);
+                                       mmd_export_token_tree_odf(out, source, t->child->next, scratch);
                                        print_const("]");
                                        break;
                                }
 
-                               temp_short2 = scratch->odf_para_type;
-                               scratch->odf_para_type = PAIR_BRACKET_ABBREVIATION;
-
-                               if (temp_short < scratch->used_abbreviations->size) {
-                                       // Re-using previous footnote
-                                       print("\\footnote{reuse");
+                               // Get instance of the note used
+                               temp_note = stack_peek_index(scratch->used_abbreviations, temp_short - 1);
 
-                                       print("}");
-                               } else {
-                                       // This is a new abbreviation item
-                                       temp_note = stack_peek_index(scratch->used_abbreviations, temp_short - 1);
+                               t->child->type = TEXT_EMPTY;
+                               t->child->mate->type = TEXT_EMPTY;
 
-                                       mmd_print_string_odf(out, temp_note->label_text); 
+                               if (temp_short2 == scratch->used_abbreviations->size) {
+                                       // This is a re-use of a previously used note
 
-                                       printf("<text:note text:id=\"gn%d\" text:note-class=\"glossary\"><text:note-body>", temp_short);
+                                       if (temp_short3 == scratch->inline_abbreviations_to_free->size) {
+                                               // This is a reference definition
+                                               mmd_export_token_tree_odf(out, source, t->child, scratch);
+                                       } else {
+                                               // This is an inline definition
+                                               mmd_export_token_tree_odf(out, source, t->child, scratch);
+                                       }
+                               } else {
+                                       // This is the first time this note was used
+                                       temp_short2 = scratch->odf_para_type;
+                                       scratch->odf_para_type = PAIR_BRACKET_ABBREVIATION;
+
+                                       if (temp_short3 == scratch->inline_abbreviations_to_free->size) {
+                                               // This is a reference definition
+                                               mmd_print_string_odf(out, temp_note->label_text); 
+                                               printf("<text:note text:id=\"gn%d\" text:note-class=\"glossary\"><text:note-body>", temp_short);
+                                               mmd_export_token_tree_odf(out, source, temp_note->content, scratch);
+                                               print_const("</text:note-body></text:note>");
+                                       } else {
+                                               // This is an inline definition
+                                               mmd_print_string_odf(out, temp_note->label_text); 
+                                               printf("<text:note text:id=\"gn%d\" text:note-class=\"glossary\"><text:note-body>", temp_short);
+                                               mmd_export_token_tree_odf(out, source, temp_note->content, scratch);
+                                               print_const("</text:note-body></text:note>");
+                                       }
 
-                                       mmd_export_token_tree_odf(out, source, temp_note->content, scratch);
-                                       print_const("</text:note-body></text:note>");
+                                       scratch->odf_para_type = temp_short2;
                                }
-
-                               scratch->odf_para_type = temp_short2;
                        } else {
-                               // Footnotes disabled
+                               // Note-based syntax disabled
                                mmd_export_token_tree_odf(out, source, t->child, scratch);
                        }
                        break;
index e7ce8fcc0f0f34201db5e3c58b80806f228dc588..d658e2069ffd5170db486deb8cd2ac3a60e9aa52 100644 (file)
@@ -194,6 +194,7 @@ scratch_pad * scratch_pad_new(mmd_engine * e, short format) {
 
                // Store abbreviations in a hash for rapid retrieval when exporting
                p->used_abbreviations = stack_new(0);
+               p->inline_abbreviations_to_free = stack_new(0);
 
                p->abbreviation_hash = NULL;
 
@@ -287,6 +288,11 @@ void scratch_pad_free(scratch_pad * scratch) {
 
        stack_free(scratch->used_abbreviations);
 
+       while (scratch->inline_abbreviations_to_free->size) {
+               footnote_free(stack_pop(scratch->inline_abbreviations_to_free));
+       }
+       stack_free(scratch->inline_abbreviations_to_free);
+
        // Free metadata hash
        meta * m, * m_tmp;
        
@@ -2070,6 +2076,11 @@ void abbreviation_from_bracket(const char * source, scratch_pad * scratch, token
                if (label) {
                        footnote * temp = footnote_new(source, label, label->next, false);
 
+                       // Adjust the properties
+                       free(temp->label_text);
+                       temp->label_text = temp->clean_text;
+                       temp->clean_text = clean_string_from_range(source, temp->content->child->start, t->start + t->len - t->child->mate->len - temp->content->child->start, false);
+
                        // Store as used
                        stack_push(scratch->used_abbreviations, temp);
                        *num = scratch->used_abbreviations->size;
@@ -2077,7 +2088,7 @@ void abbreviation_from_bracket(const char * source, scratch_pad * scratch, token
 
                        // We need to free this one later since it doesn't exist
                        // in the engine's stack, on the scratch_pad stack
-                       //stack_push(scratch->inline_glossaries_to_free, temp);
+                       stack_push(scratch->inline_abbreviations_to_free, temp);
                } else {
                        // Improperly formatted glossary
                        *num = -1;
index 3ae4e4facc468e8d62e792abe56a82dfc1164116..3ff94411c9cda635564e77d0c8dd66a0e5499649 100644 (file)
@@ -99,6 +99,7 @@ typedef struct {
        short                           glossary_being_printed;
 
        stack *                         used_abbreviations;
+       stack *                         inline_abbreviations_to_free;
        struct fn_holder *      abbreviation_hash;
 
        short                           language;
diff --git a/tests/MMD6Tests/Abbreviations.fodt b/tests/MMD6Tests/Abbreviations.fodt
new file mode 100644 (file)
index 0000000..cb83998
--- /dev/null
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
+     xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
+     xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
+     xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
+     xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
+     xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
+     xmlns:xlink="http://www.w3.org/1999/xlink"
+     xmlns:dc="http://purl.org/dc/elements/1.1/"
+     xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
+     xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
+     xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
+     xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
+     xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
+     xmlns:math="http://www.w3.org/1998/Math/MathML"
+     xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
+     xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
+     xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
+     xmlns:ooo="http://openoffice.org/2004/office"
+     xmlns:ooow="http://openoffice.org/2004/writer"
+     xmlns:oooc="http://openoffice.org/2004/calc"
+     xmlns:dom="http://www.w3.org/2001/xml-events"
+     xmlns:xforms="http://www.w3.org/2002/xforms"
+     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+     xmlns:rpt="http://openoffice.org/2005/report"
+     xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"
+     xmlns:xhtml="http://www.w3.org/1999/xhtml"
+     xmlns:grddl="http://www.w3.org/2003/g/data-view#"
+     xmlns:tableooo="http://openoffice.org/2009/table"
+     xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0"
+     xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
+     xmlns:css3t="http://www.w3.org/TR/css3-text/"
+     office:version="1.2"
+     grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl"
+     office:mimetype="application/vnd.oasis.opendocument.text">
+<office:font-face-decls>
+   <style:font-face style:name="Courier New" svg:font-family="'Courier New'"
+                    style:font-adornments="Regular"
+                    style:font-family-generic="modern"
+                    style:font-pitch="fixed"/>
+</office:font-face-decls>
+<office:styles>
+<style:style style:name="Standard" style:family="paragraph" style:class="text">
+      <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.15in"     fo:text-align="justify" style:justify-single-word="false"/>
+   </style:style>
+<style:style style:name="Preformatted_20_Text" style:display-name="Preformatted Text"
+             style:family="paragraph"
+             style:parent-style-name="Standard"
+             style:class="html">
+   <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0in" fo:text-align="start"
+                               style:justify-single-word="false"/>
+   <style:text-properties style:font-name="Courier New" fo:font-size="11pt"
+                          style:font-name-asian="Courier New"
+                          style:font-size-asian="11pt"
+                          style:font-name-complex="Courier New"
+                          style:font-size-complex="11pt"/>
+</style:style>
+<style:style style:name="Source_20_Text" style:display-name="Source Text"
+             style:family="text">
+   <style:text-properties style:font-name="Courier New" style:font-name-asian="Courier New"
+                          style:font-name-complex="Courier New"
+                          fo:font-size="11pt"/>
+</style:style>
+<style:style style:name="List" style:family="paragraph"
+             style:parent-style-name="Standard"
+             style:class="list">
+   <style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
+   <style:text-properties style:font-size-asian="12pt"/>
+</style:style>
+<style:style style:name="Quotations" style:family="paragraph"
+             style:parent-style-name="Standard"
+             style:class="html">
+   <style:paragraph-properties fo:margin-left="0.3937in" fo:margin-right="0.3937in" fo:margin-top="0in"
+                               fo:margin-bottom="0.1965in"
+                               fo:text-align="justify"                               style:justify-single-word="false"                               fo:text-indent="0in"
+                               style:auto-text-indent="false"/>
+</style:style>
+<style:style style:name="Table_20_Heading" style:display-name="Table Heading"
+             style:family="paragraph"
+             style:parent-style-name="Table_20_Contents"
+             style:class="extra">
+   <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"
+                               text:number-lines="false"
+                               text:line-number="0"/>
+   <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold"
+                          style:font-weight-complex="bold"/>
+</style:style>
+<style:style style:name="Horizontal_20_Line" style:display-name="Horizontal Line"
+             style:family="paragraph"
+             style:parent-style-name="Standard"
+             style:class="html">
+   <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.1965in"
+                               style:border-line-width-bottom="0.0008in 0.0138in 0.0008in"
+                               fo:padding="0in"
+                               fo:border-left="none"
+                               fo:border-right="none"
+                               fo:border-top="none"
+                               fo:border-bottom="0.0154in double #808080"
+                               text:number-lines="false"
+                               text:line-number="0"
+                               style:join-border="false"/>
+   <style:text-properties fo:font-size="6pt" style:font-size-asian="6pt" style:font-size-complex="6pt"/>
+</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%"/> </style:style>
+  <text:notes-configuration text:note-class="footnote" text:default-style-name="Footnote" text:citation-style-name="Footnote_20_Symbol" text:citation-body-style-name="Footnote_20_anchor" text:master-page-name="Footnote" style:num-format="a" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/>
+  <text:notes-configuration text:note-class="endnote" text:default-style-name="Endnote" text:citation-style-name="Endnote_20_Symbol" text:citation-body-style-name="Endnote_20_anchor" text:master-page-name="Endnote" style:num-format="1" text:start-value="0"/>
+</office:styles>
+<office:automatic-styles>   <style:style style:name="MMD-Italic" style:family="text">
+      <style:text-properties fo:font-style="italic" style:font-style-asian="italic"
+                             style:font-style-complex="italic"/>
+   </style:style>
+   <style:style style:name="MMD-Bold" style:family="text">
+      <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold"
+                             style:font-weight-complex="bold"/>
+   </style:style>
+   <style:style style:name="MMD-Superscript" style:family="text">
+      <style:text-properties style:text-position="super 58%"/>
+   </style:style>
+   <style:style style:name="MMD-Subscript" style:family="text">
+      <style:text-properties style:text-position="sub 58%"/>
+   </style:style>
+   <style:style style:name="Strike" style:family="text">
+      <style:text-properties style:text-line-through-style="solid" />
+   </style:style>
+   <style:style style:name="Underline" style:family="text">
+      <style:text-properties style:text-underline-style="solid" style:text-underline-color="font-color"/>
+   </style:style>
+   <style:style style:name="Highlight" style:family="text">
+      <style:text-properties fo:background-color="#FFFF00" />
+   </style:style>
+   <style:style style:name="Comment" style:family="text">
+      <style:text-properties fo:color="#0000BB" />
+   </style:style>
+<style:style style:name="MMD-Table" style:family="paragraph" style:parent-style-name="Standard">
+   <style:paragraph-properties fo:margin-top="0in" fo:margin-bottom="0.05in"/>
+</style:style>
+<style:style style:name="MMD-Table-Center" style:family="paragraph" style:parent-style-name="MMD-Table">
+   <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+</style:style>
+<style:style style:name="MMD-Table-Right" style:family="paragraph" style:parent-style-name="MMD-Table">
+   <style:paragraph-properties fo:text-align="right" style:justify-single-word="false"/>
+</style:style>
+<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard"
+             style:list-style-name="L2">
+<style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
+</style:style>
+<style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+   <style:graphic-properties style:print-content="true" style:vertical-pos="top"
+                             style:vertical-rel="baseline"
+                             fo:padding="0in"
+                             fo:border="none"
+                             style:shadow="none"/>
+</style:style>
+<style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard"
+             style:list-style-name="L1"/>
+<text:list-style style:name="L1">
+       <text:list-level-style-bullet text:level="1" text:style-name="Numbering_20_Symbols" style:num-suffix="." text:bullet-char="•">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in"/>
+               </style:list-level-properties>
+       </text:list-level-style-bullet>
+       <text:list-level-style-bullet text:level="2" text:style-name="Numbering_20_Symbols" style:num-suffix="." text:bullet-char="◦">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in"/>
+               </style:list-level-properties>
+       </text:list-level-style-bullet>
+       <text:list-level-style-bullet text:level="3" text:style-name="Numbering_20_Symbols" style:num-suffix="." text:bullet-char="▪">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1in" fo:text-indent="-0.25in" fo:margin-left="1in"/>
+               </style:list-level-properties>
+       </text:list-level-style-bullet>
+       <text:list-level-style-number text:level="4" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="5" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="6" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="7" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2in" fo:text-indent="-0.25in" fo:margin-left="2in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="8" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="9" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="10" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+</text:list-style>
+<text:list-style style:name="L2">
+       <text:list-level-style-number text:level="1" text:style-name="Standard" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.5in" fo:text-indent="-0.25in" fo:margin-left="0.5in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="2" text:style-name="Standard" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.75in" fo:text-indent="-0.25in" fo:margin-left="0.75in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="3" text:style-name="Standard" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1in" fo:text-indent="-0.25in" fo:margin-left="1in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="4" text:style-name="Standard" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.25in" fo:text-indent="-0.25in" fo:margin-left="1.25in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="5" text:style-name="Standard" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.5in" fo:text-indent="-0.25in" fo:margin-left="1.5in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="6" text:style-name="Standard" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.75in" fo:text-indent="-0.25in" fo:margin-left="1.75in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="7" text:style-name="Standard" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2in" fo:text-indent="-0.25in" fo:margin-left="2in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="8" text:style-name="Standard" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.25in" fo:text-indent="-0.25in" fo:margin-left="2.25in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="9" text:style-name="Standard" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.5in" fo:text-indent="-0.25in" fo:margin-left="2.5in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+       <text:list-level-style-number text:level="10" text:style-name="Standard" style:num-suffix="." style:num-format="1">
+               <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+                       <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.75in" fo:text-indent="-0.25in" fo:margin-left="2.75in"/>
+               </style:list-level-properties>
+       </text:list-level-style-number>
+</text:list-style>
+</office:automatic-styles>
+ <office:master-styles>
+  <style:master-page style:name="Endnote" >
+    <style:header><text:h text:outline-level="2">Bibliography</text:h></style:header></style:master-page>
+  <style:master-page style:name="Footnote" style:page-layout-name="pm2"/>
+ </office:master-styles>
+<office:meta>
+       <dc:title>Abbreviations</dc:title>
+</office:meta>
+<office:body>
+<office:text>
+<text:p text:style-name="Standard">foo<text:note text:id="gn1" text:note-class="glossary"><text:note-body><text:p text:style-name="Footnote">FOO</text:p></text:note-body></text:note></text:p>
+
+<text:p text:style-name="Standard">bar<text:note text:id="gn2" text:note-class="glossary"><text:note-body><text:p text:style-name="Footnote">BAR</text:p></text:note-body></text:note></text:p>
+
+<text:p text:style-name="Standard">foo bar</text:p>
+
+<text:p text:style-name="Standard">foobar<text:note text:id="gn3" text:note-class="glossary"><text:note-body><text:p text:style-name="Footnote">FOOBAR</text:p></text:note-body></text:note></text:p>
+
+<text:p text:style-name="Standard">foo bar<text:note text:id="gn4" text:note-class="glossary"><text:note-body><text:p text:style-name="Footnote">FOO BAR</text:p></text:note-body></text:note></text:p>
+
+<text:p text:style-name="Standard">5</text:p>
+
+<text:p text:style-name="Standard">baz<text:note text:id="gn5" text:note-class="glossary"><text:note-body><text:p text:style-name="Footnote">BAZ (BAT)</text:p></text:note-body></text:note></text:p>
+</office:text>
+</office:body>
+</office:document>
index 0ac6fc7da5139fa212ce130b4555cfa05f160cb5..099d516d9e0dadfbe487db27efe1d7d72beab5cf 100644 (file)
@@ -18,6 +18,8 @@
 
 <p>5</p>
 
+<p><abbr title="BAZ (BAT)">baz</abbr></p>
+
 </body>
 </html>
 
index d830efbce8aff80d3edf8430b37b2560da971f20..ff3286b76f16e26c413844287518c8b89541aa4f 100644 (file)
@@ -12,3 +12,5 @@ latex config: article</p>
 <p><a href="FOOBAR">>foo bar</a></p>
 
 <p>5</p>
+
+<p>[>(baz) BAZ (BAT)]</p>
index f63ffbc25d28b3c5494846238a3e820b40a596bf..3e1c4b407dfe2620b66d0ae68b45087e686ff06f 100644 (file)
@@ -22,5 +22,7 @@
 
 5
 
+\newacronym{baz}{baz}{BAZ (BAT)}\gls{baz}
+
 \input{mmd6-article-footer}
 \end{document}
index 802b45c046bfd7d7c6ebc892ef60eb5c851ab157..9bd19fafa581e99805144feb67353dc15754677b 100644 (file)
@@ -13,6 +13,9 @@ latex config: article
 
 5
 
+[>(baz) BAZ (BAT)]
+
+
 [>foo]: FOO
 [>bar]: BAR
 [>foobar]: FOOBAR