]> granicus.if.org Git - multimarkdown/commitdiff
FIXED: Fix algorithm for creating TOC to properly handle 'incorrect' levels
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 4 Mar 2017 17:14:37 +0000 (12:14 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 4 Mar 2017 17:14:37 +0000 (12:14 -0500)
Sources/libMultiMarkdown/html.c
Sources/libMultiMarkdown/latex.c
Sources/libMultiMarkdown/odf.c
Sources/libMultiMarkdown/writer.c
Sources/libMultiMarkdown/writer.h
tests/MMD6Tests/Table of Contents.fodt
tests/MMD6Tests/Table of Contents.html
tests/MMD6Tests/Table of Contents.tex
tests/MMD6Tests/Tables.fodt

index 6aafb425d1dbcbd13c8f1fd5ac31100390175dd3..9ca38f4b834bb54284e2d0f9ea4c34325503e385 100644 (file)
@@ -293,6 +293,61 @@ void mmd_export_image_html(DString * out, const char * source, token * text, lin
 }
 
 
+void mmd_export_toc_entry_html(DString * out, const char * source, scratch_pad * scratch, size_t * counter, short level) {
+       token * entry, * next;
+       short entry_level, next_level;
+       char * temp_char;
+
+       print_const("\n<ul>\n");
+
+       // Iterate over tokens
+       while (*counter < scratch->header_stack->size) {
+               // Get token for header
+               entry = stack_peek_index(scratch->header_stack, *counter);
+               entry_level = raw_level_for_header(entry);
+
+               if (entry_level >= level) {
+                       // This entry is a direct descendant of the parent
+                       temp_char = label_from_header(source, entry);
+                       printf("<li><a href=\"#%s\">", temp_char);
+                       mmd_export_token_tree_html(out, source, entry->child, 0, scratch);
+                       print_const("</a>");
+
+                       if (*counter < scratch->header_stack->size - 1) {
+                               next = stack_peek_index(scratch->header_stack, *counter + 1);
+                               next_level = next->type - BLOCK_H1 + 1;
+                               if (next_level > entry_level) {
+                                       // This entry has children
+                                       (*counter)++;
+                                       mmd_export_toc_entry_html(out, source, scratch, counter, entry_level + 1);
+                               }
+                       }
+
+                       print_const("</li>\n");
+                       free(temp_char);
+               } else if (entry_level < level ) {
+                       // If entry < level, exit this level
+                       // Decrement counter first, so that we can test it again later
+                       (*counter)--;
+                       break;
+               }
+               
+               // Increment counter
+               (*counter)++;
+       }
+
+       print_const("</ul>\n");
+}
+
+
+void mmd_export_toc_html(DString * out, const char * source, scratch_pad * scratch) {
+       token * entry;
+       size_t counter = 0;
+
+       mmd_export_toc_entry_html(out, source, scratch, &counter, 0);
+}
+
+
 void mmd_export_token_html(DString * out, const char * source, token * t, size_t offset, scratch_pad * scratch) {
        if (t == NULL)
                return;
@@ -680,8 +735,12 @@ void mmd_export_token_html(DString * out, const char * source, token * t, size_t
                        temp_short = 0;
                        temp_short2 = 0;
                        pad(out, 2, scratch);
-                       print_const("<div class=\"TOC\">");
+                       print_const("<div class=\"TOC\">\n");
 
+                       mmd_export_toc_html(out, source, scratch);
+                       print_const("</div>");
+                       scratch->padded = 0;
+                       break;
                        for (int i = 0; i < scratch->header_stack->size; ++i)
                        {
                                temp_token = stack_peek_index(scratch->header_stack, i);
index cab0d58b280c58a95e10c48353da98e9c4dc4ead..5d6bdac6b5946586cabd199ee0386525c72235af 100644 (file)
@@ -370,6 +370,60 @@ void mmd_export_image_latex(DString * out, const char * source, token * text, li
 }
 
 
+void mmd_export_toc_entry_latex(DString * out, const char * source, scratch_pad * scratch, size_t * counter, short level) {
+       token * entry, * next;
+       short entry_level, next_level;
+       char * temp_char;
+
+       print_const("\\begin{itemize}\n\n");
+
+       // Iterate over tokens
+       while (*counter < scratch->header_stack->size) {
+               // Get token for header
+               entry = stack_peek_index(scratch->header_stack, *counter);
+               entry_level = raw_level_for_header(entry);
+
+               if (entry_level >= level) {
+                       // This entry is a direct descendant of the parent
+                       temp_char = label_from_header(source, entry);
+                       print_const("\\item ");
+                       mmd_export_token_tree_latex(out, source, entry->child, scratch);
+                       printf("(\\autoref{%s})\n\n", temp_char);
+
+                       if (*counter < scratch->header_stack->size - 1) {
+                               next = stack_peek_index(scratch->header_stack, *counter + 1);
+                               next_level = next->type - BLOCK_H1 + 1;
+                               if (next_level > entry_level) {
+                                       // This entry has children
+                                       (*counter)++;
+                                       mmd_export_toc_entry_latex(out, source, scratch, counter, entry_level + 1);
+                               }
+                       }
+
+                       free(temp_char);
+               } else if (entry_level < level ) {
+                       // If entry < level, exit this level
+                       // Decrement counter first, so that we can test it again later
+                       (*counter)--;
+                       break;
+               }
+               
+               // Increment counter
+               (*counter)++;
+       }
+
+       print_const("\\end{itemize}\n\n");
+}
+
+
+void mmd_export_toc_latex(DString * out, const char * source, scratch_pad * scratch) {
+       token * entry;
+       size_t counter = 0;
+
+       mmd_export_toc_entry_latex(out, source, scratch, &counter, 0);
+}
+
+
 void mmd_export_token_latex(DString * out, const char * source, token * t, scratch_pad * scratch) {
        if (t == NULL)
                return;
@@ -699,72 +753,7 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat
                        temp_short2 = 0;
                        pad(out, 2, scratch);
 
-                       for (int i = 0; i < scratch->header_stack->size; ++i)
-                       {
-                               temp_token = stack_peek_index(scratch->header_stack, i);
-
-                               if (temp_token->type == temp_short2) {
-                                       // Same level -- close list item
-                                       //pad(out, 2, scratch);
-                               }
-
-                               if (temp_short == 0) {
-                                       // First item
-                                       pad(out, 2, scratch);
-                                       print_const("\\begin{itemize}");
-                                       scratch->padded = 0;
-                                       temp_short = temp_token->type;
-                                       temp_short2 = temp_short;
-                               }
-
-                               // Indent?
-                               if (temp_token->type == temp_short2) {
-                                       // Same level -- NTD
-                               } else if (temp_token->type == temp_short2 + 1) {
-                                       // Indent
-                                       pad(out, 2, scratch);
-                                       print_const("\\begin{itemize}");
-                                       scratch->padded = 0;
-                                       temp_short2++;
-                               } else if (temp_token->type < temp_short2) {
-                                       // Outdent
-                                       pad(out, 2, scratch);
-                                       while (temp_short2 > temp_token->type) {
-                                               if (temp_short2 > temp_short) {
-                                                       pad(out, 2, scratch);
-                                                       print_const("\\end{itemize}");
-                                                       scratch->padded = 0;
-                                               } else
-                                                       temp_short = temp_short2 - 1;
-
-                                               temp_short2--;
-                                       }
-                               } else {
-                                       // Skipped more than one level -- ignore
-                                       continue;
-                               }
-
-                               temp_char = label_from_header(source, temp_token);
-                               pad(out, 2, scratch);
-                               print_const("\\item ");
-                               mmd_export_token_tree_latex(out, source, temp_token->child, scratch);
-                               printf("(\\autoref{%s})", temp_char);
-                               scratch->padded = 0;
-                               free(temp_char);
-                       }
-
-                       while (temp_short2 > (temp_short)) {
-                               pad(out, 2, scratch);
-                               print_const("\\end{itemize}");
-                               scratch->padded = 0;
-                               temp_short2--;
-                       }
-                       
-                       if (temp_short) {
-                               pad(out, 2, scratch);
-                               print_const("\\end{itemize}");
-                               scratch->padded = 0;
-                       }
+                       mmd_export_toc_latex(out, source, scratch);
 
                        scratch->padded = 0;
                        break;
index 5a349d57aef0f28cee4d451a5f84176690cd2704..3385a686460ec2f605fc897d589c6743a28be6bf 100644 (file)
@@ -296,6 +296,61 @@ void mmd_export_image_odf(DString * out, const char * source, token * text, link
 }
 
 
+
+void mmd_export_toc_entry_odf(DString * out, const char * source, scratch_pad * scratch, size_t * counter, short level) {
+       token * entry, * next;
+       short entry_level, next_level;
+       char * temp_char;
+
+       print_const("\n<text:list text:style-name=\"L1\">\n");
+
+       // Iterate over tokens
+       while (*counter < scratch->header_stack->size) {
+               // Get token for header
+               entry = stack_peek_index(scratch->header_stack, *counter);
+               entry_level = raw_level_for_header(entry);
+
+               if (entry_level >= level) {
+                       // This entry is a direct descendant of the parent
+                       temp_char = label_from_header(source, entry);
+                       printf("<text:list-item><text:p text:style-name=\"P1\"><text:a xlink:type=\"simple\" xlink:href=\"#%s\">", temp_char);
+                       mmd_export_token_tree_odf(out, source, entry->child, scratch);
+                       print_const("</text:a></text:p>");
+
+                       if (*counter < scratch->header_stack->size - 1) {
+                               next = stack_peek_index(scratch->header_stack, *counter + 1);
+                               next_level = next->type - BLOCK_H1 + 1;
+                               if (next_level > entry_level) {
+                                       // This entry has children
+                                       (*counter)++;
+                                       mmd_export_toc_entry_odf(out, source, scratch, counter, entry_level + 1);
+                               }
+                       }
+
+                       print_const("</text:list-item>\n");
+                       free(temp_char);
+               } else if (entry_level < level ) {
+                       // If entry < level, exit this level
+                       // Decrement counter first, so that we can test it again later
+                       (*counter)--;
+                       break;
+               }
+               
+               // Increment counter
+               (*counter)++;
+       }
+
+       print_const("</text:list>\n");
+}
+
+void mmd_export_toc_odf(DString * out, const char * source, scratch_pad * scratch) {
+       token * entry;
+       size_t counter = 0;
+
+       mmd_export_toc_entry_odf(out, source, scratch, &counter, 0);
+}
+
+
 void mmd_export_token_odf(DString * out, const char * source, token * t, scratch_pad * scratch) {
        if (t == NULL)
                return;
@@ -633,60 +688,7 @@ void mmd_export_token_odf(DString * out, const char * source, token * t, scratch
                        temp_short2 = 0;
                        pad(out, 2, scratch);
 
-                       for (int i = 0; i < scratch->header_stack->size; ++i)
-                       {
-                               temp_token = stack_peek_index(scratch->header_stack, i);
-
-                               if (temp_token->type == temp_short2) {
-                                       // Same level -- close list item
-                                       print_const("</text:list-item>\n");
-                               }
-
-                               if (temp_short == 0) {
-                                       // First item
-                                       print_const("\n<text:list text:style-name=\"L1\">\n");
-                                       temp_short = temp_token->type;
-                                       temp_short2 = temp_short;
-                               }
-
-                               // Indent?
-                               if (temp_token->type == temp_short2) {
-                                       // Same level -- NTD
-                               } else if (temp_token->type == temp_short2 + 1) {
-                                       // Indent
-                                       print_const("\n\n<text:list text:style-name=\"L1\">\n");
-                                       temp_short2++;
-                               } else if (temp_token->type < temp_short2) {
-                                       // Outdent
-                                       print_const("</text:list-item>\n");
-                                       while (temp_short2 > temp_token->type) {
-                                               if (temp_short2 > temp_short)
-                                                       print_const("</text:list></text:list-item>\n");
-                                               else
-                                                       temp_short = temp_short2 - 1;
-
-                                               temp_short2--;
-                                       }
-                               } else {
-                                       // Skipped more than one level -- ignore
-                                       continue;
-                               }
-
-                               temp_char = label_from_header(source, temp_token);
-
-                               printf("<text:list-item><text:p text:style-name=\"P1\"><text:a xlink:type=\"simple\" xlink:href=\"#%s\">", temp_char);
-                               mmd_export_token_tree_odf(out, source, temp_token->child, scratch);
-                               print_const("</text:a></text:p>");
-                               free(temp_char);
-                       }
-
-                       while (temp_short2 > (temp_short)) {
-                               print_const("</text:list>\n");
-                               temp_short2--;
-                       }
-                       
-                       if (temp_short)
-                               print_const("</text:list-item>\n</text:list>\n");
+                       mmd_export_toc_odf(out, source, scratch);
 
                        scratch->padded = 1;
                        break;
index 74ce6e3f7be25d7e2c179a15d4b0999a011499a2..1e531e020fa996fe3d82289c5bbc8b2f7336ffbe 100644 (file)
@@ -2126,3 +2126,25 @@ char * get_fence_language_specifier(token * fence, const char * source) {
        return result;
 }
 
+
+short raw_level_for_header(token * header) {
+       switch (header->type) {
+               case BLOCK_H1:
+               case BLOCK_SETEXT_1:
+                       return 1;
+               case BLOCK_H2:
+               case BLOCK_SETEXT_2:
+                       return 2;
+               case BLOCK_H3:
+                       return 3;
+               case BLOCK_H4:
+                       return 4;
+               case BLOCK_H5:
+                       return 5;
+               case BLOCK_H6:
+                       return 6;
+       }
+
+       return 0;
+}
+
index 61d0eb601a3708c74eb32dc7e6ca596825e6fe44..84b041f339492e59301a41343302e258b099bb8e 100644 (file)
@@ -236,5 +236,7 @@ char * label_from_string(const char * str);
 
 char * clean_string(const char * str, bool lowercase);
 
+short raw_level_for_header(token * header);
+
 #endif
 
index 606111b73d94f106e48e992696a695e32681fa96..7c943194226ad44af1fdb2b64702ead4dd1b9181 100644 (file)
    <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:master-page style:name="Footnote" style:page-layout-name="pm2"/>
  </office:master-styles>
 <office:meta>
-<dc:title>Table of Contents</dc:title>
-<meta:user-defined meta:name="latex config">article</meta:user-defined>
+       <dc:title>Table of Contents</dc:title>
 </office:meta>
 <office:body>
 <office:text>
-<text:list text:style-name="L1"><text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#secondlevel">Second Level</text:a></text:p></text:list-item>
-<text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#firstlevel">First Level</text:a></text:p>
-
-<text:list text:style-name="L1"><text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#secondlevelb">Second Level b</text:a></text:p>
-
-<text:list text:style-name="L1"><text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#thirdlevel">Third Level</text:a></text:p></text:list-item>
-</text:list></text:list-item>
-<text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#secondlevelc">Second Level c</text:a></text:p></text:list-item>
-</text:list></text:list-item>
-<text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#firstlevelb">First Level b</text:a></text:p>
-
-<text:list text:style-name="L1"><text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#secondleveld">Second level d</text:a></text:p>
-
-<text:list text:style-name="L1"><text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#thirdleveld">Third level d</text:a></text:p>
 
-<text:list text:style-name="L1"><text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#fourthleveld">Fourth level d</text:a></text:p></text:list-item>
-</text:list></text:list-item>
-</text:list></text:list-item>
-</text:list></text:list-item>
-<text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#firstlevele">First level</text:a></text:p>
-
-<text:list text:style-name="L1"><text:list-item>
-<text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#secondlevele">Second level</text:a></text:p></text:list-item>
-</text:list></text:list-item>
+<text:list text:style-name="L1">
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#secondlevel">Second Level </text:a></text:p></text:list-item>
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#firstlevel">First Level </text:a></text:p>
+<text:list text:style-name="L1">
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#secondlevelb">Second Level b </text:a></text:p>
+<text:list text:style-name="L1">
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#thirdlevel">Third Level </text:a></text:p></text:list-item>
+</text:list>
+</text:list-item>
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#secondlevelc">Second Level c </text:a></text:p></text:list-item>
+</text:list>
+</text:list-item>
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#firstlevelb">First Level b </text:a></text:p>
+<text:list text:style-name="L1">
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#thirdlevelb">Third Level b </text:a></text:p></text:list-item>
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#secondleveld">Second level d </text:a></text:p>
+<text:list text:style-name="L1">
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#thirdleveld">Third level d </text:a></text:p>
+<text:list text:style-name="L1">
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#fourthleveld">Fourth level d </text:a></text:p></text:list-item>
+</text:list>
+</text:list-item>
+</text:list>
+</text:list-item>
+</text:list>
+</text:list-item>
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#firstlevele">First level  </text:a></text:p>
+<text:list text:style-name="L1">
+<text:list-item><text:p text:style-name="P1"><text:a xlink:type="simple" xlink:href="#secondlevele">Second level  </text:a></text:p></text:list-item>
+</text:list>
+</text:list-item>
 </text:list>
 
-<text:h text:outline-level="2"><text:bookmark text:name="secondlevel"/>Second Level<text:bookmark-end text:name="secondlevel"/></text:h>
+<text:h text:outline-level="2"><text:bookmark text:name="secondlevel"/>Second Level <text:bookmark-end text:name="secondlevel"/></text:h>
 
-<text:h text:outline-level="1"><text:bookmark text:name="firstlevel"/>First Level<text:bookmark-end text:name="firstlevel"/></text:h>
+<text:h text:outline-level="1"><text:bookmark text:name="firstlevel"/>First Level <text:bookmark-end text:name="firstlevel"/></text:h>
 
-<text:h text:outline-level="2"><text:bookmark text:name="secondlevelb"/>Second Level b<text:bookmark-end text:name="secondlevelb"/></text:h>
+<text:h text:outline-level="2"><text:bookmark text:name="secondlevelb"/>Second Level b <text:bookmark-end text:name="secondlevelb"/></text:h>
 
-<text:h text:outline-level="3"><text:bookmark text:name="thirdlevel"/>Third Level<text:bookmark-end text:name="thirdlevel"/></text:h>
+<text:h text:outline-level="3"><text:bookmark text:name="thirdlevel"/>Third Level <text:bookmark-end text:name="thirdlevel"/></text:h>
 
-<text:h text:outline-level="2"><text:bookmark text:name="secondlevelc"/>Second Level c<text:bookmark-end text:name="secondlevelc"/></text:h>
+<text:h text:outline-level="2"><text:bookmark text:name="secondlevelc"/>Second Level c <text:bookmark-end text:name="secondlevelc"/></text:h>
 
-<text:h text:outline-level="1"><text:bookmark text:name="firstlevelb"/>First Level b<text:bookmark-end text:name="firstlevelb"/></text:h>
+<text:h text:outline-level="1"><text:bookmark text:name="firstlevelb"/>First Level b <text:bookmark-end text:name="firstlevelb"/></text:h>
 
-<text:h text:outline-level="3"><text:bookmark text:name="thirdlevelb"/>Third Level b<text:bookmark-end text:name="thirdlevelb"/></text:h>
+<text:h text:outline-level="3"><text:bookmark text:name="thirdlevelb"/>Third Level b <text:bookmark-end text:name="thirdlevelb"/></text:h>
 
-<text:h text:outline-level="2"><text:bookmark text:name="secondleveld"/>Second level d<text:bookmark-end text:name="secondleveld"/></text:h>
+<text:h text:outline-level="2"><text:bookmark text:name="secondleveld"/>Second level d <text:bookmark-end text:name="secondleveld"/></text:h>
 
-<text:h text:outline-level="3"><text:bookmark text:name="thirdleveld"/>Third level d<text:bookmark-end text:name="thirdleveld"/></text:h>
+<text:h text:outline-level="3"><text:bookmark text:name="thirdleveld"/>Third level d <text:bookmark-end text:name="thirdleveld"/></text:h>
 
-<text:h text:outline-level="4"><text:bookmark text:name="fourthleveld"/>Fourth level d<text:bookmark-end text:name="fourthleveld"/></text:h>
+<text:h text:outline-level="4"><text:bookmark text:name="fourthleveld"/>Fourth level d <text:bookmark-end text:name="fourthleveld"/></text:h>
 
-<text:h text:outline-level="1"><text:bookmark text:name="firstlevele"/>First level<text:bookmark-end text:name="firstlevele"/></text:h>
+<text:h text:outline-level="1"><text:bookmark text:name="firstlevele"/>First level  <text:bookmark-end text:name="firstlevele"/></text:h>
 
-<text:h text:outline-level="2"><text:bookmark text:name="secondlevele"/>Second level<text:bookmark-end text:name="secondlevele"/></text:h></office:text>
+<text:h text:outline-level="2"><text:bookmark text:name="secondlevele"/>Second level  <text:bookmark-end text:name="secondlevele"/></text:h>
+</office:text>
 </office:body>
 </office:document>
index 0aab366b2f9c24283fd4498870bec8e9baa9b859..9fc49483fc8a3bb465fd897efc509a3d5dc4f2a8 100644 (file)
@@ -7,35 +7,37 @@
 <body>
 
 <div class="TOC">
+
 <ul>
 <li><a href="#secondlevel">Second Level </a></li>
 <li><a href="#firstlevel">First Level </a>
-
 <ul>
 <li><a href="#secondlevelb">Second Level b </a>
-
 <ul>
 <li><a href="#thirdlevel">Third Level </a></li>
-</ul></li>
+</ul>
+</li>
 <li><a href="#secondlevelc">Second Level c </a></li>
-</ul></li>
+</ul>
+</li>
 <li><a href="#firstlevelb">First Level b </a>
-
 <ul>
+<li><a href="#thirdlevelb">Third Level b </a></li>
 <li><a href="#secondleveld">Second level d </a>
-
 <ul>
 <li><a href="#thirdleveld">Third level d </a>
-
 <ul>
 <li><a href="#fourthleveld">Fourth level d </a></li>
-</ul></li>
-</ul></li>
-</ul></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+</li>
 <li><a href="#firstlevele">First level  </a>
-
 <ul>
-<li><a href="#secondlevele">Second level  </a></ul>
+<li><a href="#secondlevele">Second level  </a></li>
+</ul>
 </li>
 </ul>
 </div>
index c75ef617afe80cad95b943bffbfacd9a973c7513..72886c7818a6d043fc4df70885e2face00c2f517 100644 (file)
@@ -26,6 +26,8 @@
 
 \begin{itemize}
 
+\item Third Level b (\autoref{thirdlevelb})
+
 \item Second level d (\autoref{secondleveld})
 
 \begin{itemize}
@@ -52,6 +54,8 @@
 
 \end{itemize}
 
+
+
 \chapter{Second Level }
 \label{secondlevel}
 
index 04c91a0cbd776bc13bedb46568f03927587afefc..7e21e66c6c2eac085b41d6315357c2c803dc1fbd 100644 (file)
 </table:table-cell>
 </table:table-row>
 <table:table-row>
-<table:table-cell table:numer-columns-spanned="2">
+<table:table-cell table:number-columns-spanned="2">
 <text:p text:style-name="MMD-Table"> <text:span text:style-name="MMD-Bold">foo bar</text:span><text:tab/><text:tab/></text:p>
 </table:table-cell>
 </table:table-row>
 </table:table-cell>
 </table:table-row>
 <table:table-row>
-<table:table-cell table:numer-columns-spanned="2">
+<table:table-cell table:number-columns-spanned="2">
 <text:p text:style-name="MMD-Table"> <text:span text:style-name="MMD-Bold">foo bar</text:span> </text:p>
 </table:table-cell>
 </table:table-row>
 </table:table-cell>
 </table:table-row>
 <table:table-row>
-<table:table-cell table:numer-columns-spanned="2">
+<table:table-cell table:number-columns-spanned="2">
 <text:p text:style-name="MMD-Table"> <text:span text:style-name="MMD-Bold">foo bar</text:span> </text:p>
 </table:table-cell>
 </table:table-row>
 </table:table-cell>
 </table:table-row>
 <table:table-row>
-<table:table-cell table:numer-columns-spanned="2">
+<table:table-cell table:number-columns-spanned="2">
 <text:p text:style-name="MMD-Table"> <text:span text:style-name="MMD-Bold">foo bar</text:span> </text:p>
 </table:table-cell>
 </table:table-row>
 </table:table-cell>
 </table:table-row>
 <table:table-row>
-<table:table-cell table:numer-columns-spanned="2">
+<table:table-cell table:number-columns-spanned="2">
 <text:p text:style-name="MMD-Table"> <text:span text:style-name="MMD-Bold">foo bar</text:span> | </text:p>
 </table:table-cell>
 </table:table-row>
 </table:table-cell>
 </table:table-row>
 <table:table-row>
-<table:table-cell table:numer-columns-spanned="2">
+<table:table-cell table:number-columns-spanned="2">
 <text:p text:style-name="MMD-Table"> <text:span text:style-name="MMD-Bold">foo bar</text:span> </text:p>
 </table:table-cell>
 </table:table-row>