]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Continue chipping away at LaTeX
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Sun, 12 Feb 2017 18:04:11 +0000 (13:04 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Sun, 12 Feb 2017 18:04:11 +0000 (13:04 -0500)
22 files changed:
src/latex.c
tests/MMD6Tests/Automatic Links.tex [new file with mode: 0644]
tests/MMD6Tests/Definition Lists.tex [new file with mode: 0644]
tests/MMD6Tests/Dutch.tex
tests/MMD6Tests/Emph and Strong Star.tex [new file with mode: 0644]
tests/MMD6Tests/Emph and Strong UL.tex [new file with mode: 0644]
tests/MMD6Tests/English.tex [new file with mode: 0644]
tests/MMD6Tests/Fenced Code Blocks.tex [new file with mode: 0644]
tests/MMD6Tests/French.tex
tests/MMD6Tests/German Guillemets.tex
tests/MMD6Tests/German.tex
tests/MMD6Tests/Horizontal Rules.tex [new file with mode: 0644]
tests/MMD6Tests/Inline Footnotes.tex [new file with mode: 0644]
tests/MMD6Tests/Integrated.html
tests/MMD6Tests/Integrated.htmlc
tests/MMD6Tests/Integrated.tex
tests/MMD6Tests/Integrated.text
tests/MMD6Tests/Math.tex [deleted file]
tests/MMD6Tests/Nested Definition Lists.tex [new file with mode: 0644]
tests/MMD6Tests/Reference Footnotes.tex [new file with mode: 0644]
tests/MMD6Tests/Setext Headers.tex [new file with mode: 0644]
tests/MMD6Tests/Swedish.tex

index 90afa2e875be7956efde0fde5f61f66303426304..457e91319fde4ecf1219f0255da536c4b9af24a4 100644 (file)
@@ -60,6 +60,7 @@
 #include "i18n.h"
 #include "latex.h"
 #include "parser.h"
+#include "scanners.h"
 
 
 #define print(x) d_string_append(out, x)
@@ -89,6 +90,9 @@ void mmd_print_char_latex(DString * out, char c) {
                        print_char(c);
                        print_char('$');
                        break;
+               case '|':
+                       print("\\textbar{}");
+                       break;
                case '#':
                case '{':
                case '}':
@@ -366,6 +370,37 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat
                        print("\\end{verbatim}");
                        scratch->padded = 0;
                        break;
+               case BLOCK_DEFINITION:
+                       pad(out, 2, scratch);
+
+                       temp_short = scratch->list_is_tight;
+                       if (!(t->child->next && (t->child->next->type == BLOCK_EMPTY) && t->child->next->next))
+                               scratch->list_is_tight = true;
+
+                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                       scratch->padded = 0;
+
+                       scratch->list_is_tight = temp_short;
+                       break;
+               case BLOCK_DEFLIST:
+                       pad(out, 2, scratch);
+
+                       // Group consecutive definition lists into a single list.
+                       // lemon's LALR(1) parser can't properly handle this (to my understanding).
+
+                       if (!(t->prev && (t->prev->type == BLOCK_DEFLIST)))
+                               print("\\begin{description}\n");
+       
+                       scratch->padded = 2;
+
+                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                       pad(out, 1, scratch);
+
+                       if (!(t->next && (t->next->type == BLOCK_DEFLIST)))
+                               print("\\end{description}\n");
+
+                       scratch->padded = 1;
+                       break;
                case BLOCK_EMPTY:
                        break;
                case BLOCK_H1:
@@ -428,6 +463,14 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat
                        }
                        scratch->padded = 0;
                        break;
+               case BLOCK_HR:
+                       pad(out, 2, scratch);
+                       print("\\begin{center}\\rule{3in}{0.4pt}\\end{center}");
+                       scratch->padded = 0;
+                       break;
+               case BLOCK_HTML:
+                       // Don't print HTML
+                       break;
                case BLOCK_LIST_BULLETED_LOOSE:
                case BLOCK_LIST_BULLETED:
                        temp_short = scratch->list_is_tight;
@@ -489,6 +532,13 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat
                        mmd_export_token_tree_latex(out, source, t->child, scratch);
                        scratch->padded = 0;
                        break;
+               case BLOCK_TERM:
+                       pad(out, 2, scratch);
+                       print("\\item[");
+                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                       print("]");
+                       scratch->padded = 0;
+                       break;
                case BRACE_DOUBLE_LEFT:
                        print("\\{\\{");
                        break;
@@ -566,6 +616,12 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat
                                print_char('#');
                        }
                        break;
+               case INDENT_SPACE:
+                       print_char(' ');
+                       break;
+               case INDENT_TAB:
+                       print_char('\t');
+                       break;
                case LINE_LIST_BULLETED:
                case LINE_LIST_ENUMERATED:
                        mmd_export_token_tree_latex(out, source, t->child, scratch);
@@ -603,6 +659,30 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat
                case NON_INDENT_SPACE:
                        print_char(' ');
                        break;
+               case PAIR_ANGLE:
+                       temp_token = t;
+
+                       temp_char = url_accept(source, &temp_token, true);
+
+                       if (temp_char) {
+                               if (scan_email(temp_char)) {
+                                       print("\\href{mailto:");
+                                       print(temp_char);
+                               } else {
+                                       print("\\href{");
+                                       print(temp_char);
+                               }
+                               print("}{");
+                               mmd_print_string_latex(out, temp_char);
+                               print("}");
+                       } else if (scan_html(&source[t->start])) {
+                               print_token(t);
+                       } else {
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);
+                       }
+
+                       free(temp_char);
+                       break;
                case PAIR_BACKTICK:
                        // Strip leading whitespace
                        switch (t->child->next->type) {
@@ -763,7 +843,7 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat
                                        printf("\\footnote{");
                                        temp_note = stack_peek_index(scratch->used_footnotes, temp_short - 1);
 
-                                       mmd_export_token_latex(out, source, temp_note->content, scratch);
+                                       mmd_export_token_tree_latex(out, source, temp_note->content, scratch);
                                        printf("}");
                                }
                        } else {
@@ -771,6 +851,127 @@ 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_VARIABLE:
+                       temp_char = text_inside_pair(source, t);
+                       temp_char2 = extract_metadata(scratch, temp_char);
+
+                       if (temp_char2)
+                               mmd_print_string_latex(out, temp_char2);
+                       else
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);
+
+                       // Don't free temp_char2 (it belongs to meta *)
+                       free(temp_char);
+                       break;
+               case PAIR_CRITIC_ADD:
+                       // Ignore if we're rejecting
+                       if (scratch->extensions & EXT_CRITIC_REJECT)
+                               break;
+                       if (scratch->extensions & EXT_CRITIC) {
+                               t->child->type = TEXT_EMPTY;
+                               t->child->mate->type = TEXT_EMPTY;
+                               if (scratch->extensions & EXT_CRITIC_ACCEPT) {
+                                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                               } else {
+                                       print("\\underline{");
+                                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                                       print("}");
+                               }
+                       } else {
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);                            
+                       }
+                       break;
+               case PAIR_CRITIC_DEL:
+                       // Ignore if we're accepting
+                       if (scratch->extensions & EXT_CRITIC_ACCEPT)
+                               break;
+                       if (scratch->extensions & EXT_CRITIC) {
+                               t->child->type = TEXT_EMPTY;
+                               t->child->mate->type = TEXT_EMPTY;
+                               if (scratch->extensions & EXT_CRITIC_REJECT) {
+                                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                               } else {
+                                       print("\\sout{");
+                                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                                       print("}");
+                               }
+                       } else {
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);                            
+                       }
+                       break;
+               case PAIR_CRITIC_COM:
+                       // Ignore if we're rejecting or accepting
+                       if ((scratch->extensions & EXT_CRITIC_REJECT) ||
+                               (scratch->extensions & EXT_CRITIC_ACCEPT))
+                               break;
+                       if (scratch->extensions & EXT_CRITIC) {
+                               t->child->type = TEXT_EMPTY;
+                               t->child->mate->type = TEXT_EMPTY;
+                               print("\\todo{");
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);
+                               print("}");
+                       } else {
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);
+                       }
+                       break;
+               case PAIR_CRITIC_HI:
+                       // Ignore if we're rejecting or accepting
+                       if ((scratch->extensions & EXT_CRITIC_REJECT) ||
+                               (scratch->extensions & EXT_CRITIC_ACCEPT))
+                               break;
+                       if (scratch->extensions & EXT_CRITIC) {
+                               t->child->type = TEXT_EMPTY;
+                               t->child->mate->type = TEXT_EMPTY;
+                               // 'hl' requires 'soul' package
+                               print("\\hl{");
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);
+                               print("}");
+                       } else {
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);
+                       }
+                       break;
+               case CRITIC_SUB_DIV_A:
+                       print("~");
+                       break;
+               case CRITIC_SUB_DIV_B:
+                       print("&gt;");
+                       break;
+               case PAIR_CRITIC_SUB_DEL:
+                       if ((scratch->extensions & EXT_CRITIC) &&
+                               (t->next->type == PAIR_CRITIC_SUB_ADD)) {
+                               t->child->type = TEXT_EMPTY;
+                               t->child->mate->type = TEXT_EMPTY;
+                               if (scratch->extensions & EXT_CRITIC_ACCEPT) {
+
+                               } else if (scratch->extensions & EXT_CRITIC_REJECT) {
+                                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                               } else {
+                                       print("\\sout{");
+                                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                                       print("}");
+                               }
+                       } else {
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);
+                       }
+                       break;
+               case PAIR_CRITIC_SUB_ADD:
+                       if ((scratch->extensions & EXT_CRITIC) &&
+                               (t->prev->type == PAIR_CRITIC_SUB_DEL)) {
+                               t->child->type = TEXT_EMPTY;
+                               t->child->mate->type = TEXT_EMPTY;
+                               if (scratch->extensions & EXT_CRITIC_REJECT) {
+
+                               } else if (scratch->extensions & EXT_CRITIC_ACCEPT) {
+                                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                               } else {
+                                       print("\\underline{");
+                                       mmd_export_token_tree_latex(out, source, t->child, scratch);
+                                       print("}");
+                               }
+                       } else {
+                               mmd_export_token_tree_latex(out, source, t->child, scratch);
+                       }
+                       break;
                case PAIR_MATH:
                case PAIR_PAREN:
                case PAIR_QUOTE_DOUBLE:
@@ -786,7 +987,7 @@ void mmd_export_token_latex(DString * out, const char * source, token * t, scrat
                        print(")");
                        break;
                case PIPE:
-                       print_token(t);
+                       print("\\textbar{}");
                        break;
                case PLUS:
                        print_token(t);
diff --git a/tests/MMD6Tests/Automatic Links.tex b/tests/MMD6Tests/Automatic Links.tex
new file mode 100644 (file)
index 0000000..b587ee8
--- /dev/null
@@ -0,0 +1,3 @@
+\href{http://foo.com/}{http:/\slash foo.com\slash }
+
+\href{mailto:foo@bar.com}{foo@bar.com}
diff --git a/tests/MMD6Tests/Definition Lists.tex b/tests/MMD6Tests/Definition Lists.tex
new file mode 100644 (file)
index 0000000..884d214
--- /dev/null
@@ -0,0 +1,31 @@
+\begin{description}
+\item[foo]
+
+\item[bar]
+
+*foo bar
+
+baz bat*
+
+\item[foo]
+
+\item[bar]
+
+\emph{foo bar
+bar foo}
+
+baz bat
+
+\item[bat]
+
+\emph{foo}
+
+\item[foo]
+
+*foo bar
+bar foo
+
+baz* bat
+\end{description}
+
+foo
index ebc1b9318d952c4ed98f199713db83a8fcde76b9..b383bb9f1605f1b4990fcee64f618adad5f66c3d 100644 (file)
@@ -1,6 +1,6 @@
 `foo'
 
-``foo''
+foo''
 
 foo's
 
@@ -13,6 +13,3 @@ foo -- bar
 foo{\ldots}
 
 \footnote{foo}
-
-~\citep{bar}
-\end{document}
diff --git a/tests/MMD6Tests/Emph and Strong Star.tex b/tests/MMD6Tests/Emph and Strong Star.tex
new file mode 100644 (file)
index 0000000..108ca1e
--- /dev/null
@@ -0,0 +1,195 @@
+\emph{foo}
+
+*\emph{foo}
+
+\emph{foo}*
+
+\emph{foo bar}
+
+\emph{foo} bar
+
+5
+
+foo \emph{bar}
+
+\textbf{foo}
+
+\textbf{foo bar}
+
+\textbf{foo} bar
+
+foo \textbf{bar}
+
+10
+
+\emph{foo \emph{bar} foo}
+
+\emph{foo \textbf{bar} foo}
+
+\emph{foo \textbf{\emph{bar}} foo}
+
+\textbf{foo \emph{bar} foo}
+
+\textbf{foo \textbf{bar} foo}
+
+15
+
+\textbf{foo \textbf{\emph{bar}} foo}
+
+\textbf{\emph{foo \emph{bar} foo}}
+
+\textbf{\emph{foo \textbf{bar} foo}}
+
+\textbf{\emph{foo \textbf{\emph{bar}} foo}}
+
+\textbf{\emph{foo}}
+
+20
+
+\emph{\textbf{foo} bar}
+
+\textbf{\emph{foo} bar}
+
+\emph{foo \textbf{bar}}
+
+\textbf{foo \emph{bar}}
+
+\emph{foo}bar*
+
+25
+
+\emph{foo \emph{bar \emph{foo \emph{bar}}}}
+
+\emph{\emph{\emph{\emph{foo} bar} foo} bar}
+
+\emph{foo bar}bar
+
+\textbf{foo bar}bar
+
+\textbf{\emph{foo bar}}bar
+
+30
+
+foo\emph{bar}foo
+
+foo\textbf{bar}foo
+
+foo\textbf{\emph{bar}}foo
+
+foo\emph{bar}foo
+
+\textbf{foo \emph{foobarfoo} foo}
+
+35
+
+foo\textbf{\texttt{*bar*}}
+
+*(\emph{foo})
+
+\emph{foo}:
+
+\textbf{foo}:
+
+\textbf{\emph{foo}}:
+
+40
+
+foo*bar
+
+foo\emph{bar foo}bar
+
+foo**bar
+
+foo\textbf{bar foo}bar
+
+foo***bar
+
+45
+
+foo\textbf{\emph{bar foo}}bar
+
+foo \textbf{- bar}
+
+foo \textbf{1. bar}
+
+\textbf{foo:} bar
+
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+\emph{foo}
diff --git a/tests/MMD6Tests/Emph and Strong UL.tex b/tests/MMD6Tests/Emph and Strong UL.tex
new file mode 100644 (file)
index 0000000..48d78f2
--- /dev/null
@@ -0,0 +1,193 @@
+\emph{foo}
+
+_\emph{foo}
+
+\emph{foo}_
+
+\emph{foo bar}
+
+\emph{foo} bar
+
+5
+
+foo \emph{bar}
+
+\textbf{foo}
+
+\textbf{foo bar}
+
+\textbf{foo} bar
+
+foo \textbf{bar}
+
+10
+
+\emph{foo \emph{bar} foo}
+
+\emph{foo \textbf{bar} foo}
+
+\emph{foo \textbf{\emph{bar}} foo}
+
+\textbf{foo \emph{bar} foo}
+
+\textbf{foo \textbf{bar} foo}
+
+15
+
+\textbf{foo \textbf{\emph{bar}} foo}
+
+\textbf{\emph{foo \emph{bar} foo}}
+
+\textbf{\emph{foo \textbf{bar} foo}}
+
+\textbf{\emph{foo \textbf{\emph{bar}} foo}}
+
+\textbf{\emph{foo}}
+
+20
+
+\emph{\textbf{foo} bar}
+
+\textbf{\emph{foo} bar}
+
+\emph{foo \textbf{bar}}
+
+\textbf{foo \emph{bar}}
+
+\emph{foo_bar}
+
+25
+
+\emph{foo \emph{bar \emph{foo \emph{bar}}}}
+
+\emph{\emph{\emph{\emph{foo} bar} foo} bar}
+
+_foo bar_bar
+
+__foo bar__bar
+
+___foo bar___bar
+
+30
+
+foo_bar_foo
+
+foo__bar__foo
+
+foo___bar___foo
+
+foo_bar_foo
+
+\textbf{foo \emph{foobarfoo} foo}
+
+35
+
+foo__\texttt{_bar_}__
+
+_(\emph{foo})
+
+\emph{foo}:
+
+\textbf{foo}:
+
+\textbf{\emph{foo}}:
+
+40
+
+foo_bar
+
+foo_bar foo_bar
+
+foo__bar
+
+foo__bar foo__bar
+
+foo___bar
+
+45
+
+foo___bar foo___bar
+
+foo __- bar__
+
+foo \textbf{1. bar}
+
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+_foo
+\emph{foo}
diff --git a/tests/MMD6Tests/English.tex b/tests/MMD6Tests/English.tex
new file mode 100644 (file)
index 0000000..2e5381b
--- /dev/null
@@ -0,0 +1,15 @@
+`foo'
+
+``foo''
+
+foo's
+
+foo --- bar
+
+foo -- bar
+
+5
+
+foo{\ldots}
+
+\footnote{foo}
diff --git a/tests/MMD6Tests/Fenced Code Blocks.tex b/tests/MMD6Tests/Fenced Code Blocks.tex
new file mode 100644 (file)
index 0000000..0240c76
--- /dev/null
@@ -0,0 +1,30 @@
+\begin{verbatim}
+*foo*
+\end{verbatim}
+
+\begin{verbatim}
+*foo*
+
+bar
+\end{verbatim}
+
+\begin{itemize}
+\item foo
+
+\begin{verbatim}
+*foo*
+\end{verbatim}
+
+\item foo
+
+\begin{verbatim}
+*foo*
+
+bar
+\end{verbatim}
+
+\end{itemize}
+
+\begin{verbatim}
+foo
+\end{verbatim}
index ebc1b9318d952c4ed98f199713db83a8fcde76b9..694cc3377f85cab6881a7363fcc8577dea45f55b 100644 (file)
@@ -1,6 +1,6 @@
-`foo'
+'foo'
 
-``foo''
+«foo»
 
 foo's
 
@@ -13,6 +13,3 @@ foo -- bar
 foo{\ldots}
 
 \footnote{foo}
-
-~\citep{bar}
-\end{document}
index 1f4ffefbb34183a5ddb560c97ae200581b605a66..402a768f73beb985444414c42c4e2b600bc0250c 100644 (file)
@@ -13,6 +13,3 @@ foo -- bar
 foo{\ldots}
 
 \footnote{foo}
-
-~\citep{bar}
-\end{document}
index ebc1b9318d952c4ed98f199713db83a8fcde76b9..a2e9fb3eb485f02f830cd690564ccdd713674d47 100644 (file)
@@ -1,6 +1,6 @@
-`foo'
+‚foo`
 
-``foo''
+„foo``
 
 foo's
 
@@ -13,6 +13,3 @@ foo -- bar
 foo{\ldots}
 
 \footnote{foo}
-
-~\citep{bar}
-\end{document}
diff --git a/tests/MMD6Tests/Horizontal Rules.tex b/tests/MMD6Tests/Horizontal Rules.tex
new file mode 100644 (file)
index 0000000..e52e1a6
--- /dev/null
@@ -0,0 +1,89 @@
+Dashes:
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{verbatim}
+-{}-{}-
+\end{verbatim}
+
+5
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{verbatim}
+- - -
+\end{verbatim}
+
+10
+
+Asterisks:
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{verbatim}
+***
+\end{verbatim}
+
+15
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{verbatim}
+* * *
+\end{verbatim}
+
+20
+
+Underscores:
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{verbatim}
+___
+\end{verbatim}
+
+25
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{verbatim}
+_ _ _
+\end{verbatim}
+
+30
diff --git a/tests/MMD6Tests/Inline Footnotes.tex b/tests/MMD6Tests/Inline Footnotes.tex
new file mode 100644 (file)
index 0000000..7f93106
--- /dev/null
@@ -0,0 +1,5 @@
+Inline.\footnote{foo \emph{bar}}
+
+Inline.\footnote{foo \emph{bar}
+\href{/bar}{foo}\footnote{\href{/bar}{\slash bar}}
+\textbf{foo}.}
index eb9eed084a7301d2db2b88f1bb22c2b80fea8d85..f9aca9ab59c9a391a394ebfe54ec2853f0472ea6 100644 (file)
@@ -50,6 +50,28 @@ code
 
 <p>&#8220;foo&#8221; and &#8216;bar&#8217; &#8211; with &#8212; dashes&#8230;</p>
 
+<h1 id="criticmarkup">CriticMarkup </h1>
+
+<p><ins>foo</ins></p>
+
+<p><del>bar</del></p>
+
+<p><del>foo</del><ins>bar</ins></p>
+
+<p><span class="critic comment">foo</span></p>
+
+<p><mark>bar</mark></p>
+
+<h1 id="definitionlists">Definition Lists </h1>
+
+<dl>
+<dt>foo</dt>
+<dt>bar</dt>
+<dd>*foo bar</dd>
+
+<dd>baz bat*</dd>
+</dl>
+
 <div class="footnotes">
 <hr />
 <ol>
index ac1612445d9359e6e1a3a0d954e3768db4c26874..e1f71c0a305ea12e85802f468b9e6f8789919b12 100644 (file)
@@ -52,3 +52,22 @@ code
 <h1>Smart Quotes </h1>
 
 <p>&quot;foo&quot; and 'bar' -- with --- dashes...</p>
+
+<h1>CriticMarkup </h1>
+
+<p>{++foo++}</p>
+
+<p>{--bar--}</p>
+
+<p>{~~foo~&gt;bar~~}</p>
+
+<p>{&gt;&gt;foo&lt;&lt;}</p>
+
+<p>{==bar==}</p>
+
+<h1>Definition Lists </h1>
+
+<p>foo
+bar
+:      <em>foo bar
+:      baz bat</em></p>
index eeb5dd392368d89359a034af5a49636bfe16ff7d..2c79737ee993a35f878f61f11eebcc01fa8835fa 100644 (file)
@@ -59,3 +59,27 @@ math ${e}^{i\pi }+1=0$
 \label{smartquotes}
 
 ``foo'' and `bar' -- with --- dashes{\ldots}
+
+\part{CriticMarkup }
+\label{criticmarkup}
+
+\underline{foo}
+
+\sout{bar}
+
+\sout{foo}\underline{bar}
+
+\todo{foo}
+
+\hl{bar}
+
+\part{Definition Lists }
+\label{definitionlists}
+
+\begin{description}
+\item[foo]
+\item[bar]
+*foo bar
+
+baz bat*
+\end{description}
index 1da8522587745f80b564cd20d3f187a71c31d763..30fd2803e5e2732b6a840e305b2af651248871f8 100644 (file)
@@ -2,7 +2,6 @@ This file is a designed as a single test that incorporates most of the
 *commonly* used MultiMarkdown features. This allows a single test file to
 identify common structures that are not supported yet -- particularly useful
 when developing a new output format.
-
 # Basic Blocks #
 
 paragraph
@@ -53,4 +52,21 @@ math ${e}^{i\pi }+1=0$
 
 "foo" and 'bar' -- with --- dashes...
 
+# CriticMarkup #
+
+{++foo++}
+
+{--bar--}
+
+{~~foo~>bar~~}
+
+{>>foo<<}
+
+{==bar==}
+
+# Definition Lists #
 
+foo
+bar
+:      *foo bar
+:      baz bat*
diff --git a/tests/MMD6Tests/Math.tex b/tests/MMD6Tests/Math.tex
deleted file mode 100644 (file)
index b1d1a3b..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-foo ${e}^{i\pi }+1=0$ bar
-
-\[ {x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a} \]
-
-foo ${e}^{i\pi }+1=0$ bar
-
-foo ${e}^{i\pi }+1=0$, bar
-
-$${x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}$$
-
-5
-
-foo \$ \{e\}\textsuperscript{{i}\textbackslash{}pi \}+1=0\$ bar
-
-\$\$ \{x\}\_\{1,2\}=\textbackslash{}frac\{-b\textbackslash{}pm \textbackslash{}sqrt\{\{b\}\textsuperscript{{2}}--4ac\}\}\{2a\}\$\$
-
-foo \$\{e\}\textsuperscript{{i}\textbackslash{}pi \}+1=0 \$ bar
-
-\$\$\{x\}\_\{1,2\}=\textbackslash{}frac\{-b\textbackslash{}pm \textbackslash{}sqrt\{\{b\}\textsuperscript{{2}}--4ac\}\}\{2a\} \$\$
-
-foo a\$\{e\}\textsuperscript{{i}\textbackslash{}pi \}+1=0\$ bar
-
-10
-
-a\$\$\{x\}\_\{1,2\}=\textbackslash{}frac\{-b\textbackslash{}pm \textbackslash{}sqrt\{\{b\}\textsuperscript{{2}}--4ac\}\}\{2a\}\$\$
-
-foo \$\{e\}\textsuperscript{{i}\textbackslash{}pi \}+1=0\$b bar
-
-\$\$\{x\}\_\{1,2\}=\textbackslash{}frac\{-b\textbackslash{}pm \textbackslash{}sqrt\{\{b\}\textsuperscript{{2}}--4ac\}\}\{2a\}\$\$b
-
-$\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}$
-
-$$\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}$$
-
-15
-
-$\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}$
-
-\[\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\]
-
-\begin{equation}\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\end{equation}
-
-$\begin{equation}\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\end{equation}
-
-\begin{equation}\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\end{equation}
-
-20
-
-\begin{equation}\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\end{equation}
-
-\texttt{\textbackslash{}begin\{equation\}\textbackslash{}nabla \textbackslash{}times \textbackslash{}mathbf\{E\} = - \textbackslash{}frac\{\textbackslash{}partial \textbackslash{}mathbf\{B\}\}\{\textbackslash{}partial t\}\textbackslash{}end\{equation\}}
diff --git a/tests/MMD6Tests/Nested Definition Lists.tex b/tests/MMD6Tests/Nested Definition Lists.tex
new file mode 100644 (file)
index 0000000..3fd38dc
--- /dev/null
@@ -0,0 +1,11 @@
+\begin{description}
+\item[bat]
+
+\emph{foo}
+
+bar
+
+\begin{verbatim}
+*foo*
+\end{verbatim}
+\end{description}
diff --git a/tests/MMD6Tests/Reference Footnotes.tex b/tests/MMD6Tests/Reference Footnotes.tex
new file mode 100644 (file)
index 0000000..4fb39e2
--- /dev/null
@@ -0,0 +1,13 @@
+foo.\footnote{\emph{foo}}
+
+foo.\footnote{\emph{foo
+bar}}
+
+foo.\footnote{foo
+
+\emph{bar}
+
+\begin{itemize}
+\item bat
+
+\end{itemize}}
diff --git a/tests/MMD6Tests/Setext Headers.tex b/tests/MMD6Tests/Setext Headers.tex
new file mode 100644 (file)
index 0000000..fb9bfc8
--- /dev/null
@@ -0,0 +1,34 @@
+\part{foo bar}
+\label{foobar}
+
+\chapter{foo \emph{bar}}
+\label{foobar}
+
+\part{foo
+bar}
+\label{foobar}
+
+\chapter{foo
+bar}
+\label{foobar}
+
+\part{foo}
+\label{foo}
+
+bar
+
+5
+
+\chapter{foo}
+\label{foo}
+
+bar
+
+\begin{verbatim}
+foo
+====
+\end{verbatim}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
+
+\begin{center}\rule{3in}{0.4pt}\end{center}
index ebc1b9318d952c4ed98f199713db83a8fcde76b9..3a50f0fb37580aeff96553cdac1f8b289a98eeca 100644 (file)
@@ -1,6 +1,6 @@
-`foo'
+'foo'
 
-``foo''
+''foo''
 
 foo's
 
@@ -13,6 +13,3 @@ foo -- bar
 foo{\ldots}
 
 \footnote{foo}
-
-~\citep{bar}
-\end{document}