From: Fletcher T. Penney Date: Sun, 12 Feb 2017 18:04:11 +0000 (-0500) Subject: ADDED: Continue chipping away at LaTeX X-Git-Tag: 0.3.0a^2~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7fa152cbc3ba72611c47886b46585c2eff932d2;p=multimarkdown ADDED: Continue chipping away at LaTeX --- diff --git a/src/latex.c b/src/latex.c index 90afa2e..457e913 100644 --- a/src/latex.c +++ b/src/latex.c @@ -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(">"); + 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 index 0000000..b587ee8 --- /dev/null +++ b/tests/MMD6Tests/Automatic Links.tex @@ -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 index 0000000..884d214 --- /dev/null +++ b/tests/MMD6Tests/Definition Lists.tex @@ -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 diff --git a/tests/MMD6Tests/Dutch.tex b/tests/MMD6Tests/Dutch.tex index ebc1b93..b383bb9 100644 --- a/tests/MMD6Tests/Dutch.tex +++ b/tests/MMD6Tests/Dutch.tex @@ -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 index 0000000..108ca1e --- /dev/null +++ b/tests/MMD6Tests/Emph and Strong Star.tex @@ -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 index 0000000..48d78f2 --- /dev/null +++ b/tests/MMD6Tests/Emph and Strong UL.tex @@ -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 index 0000000..2e5381b --- /dev/null +++ b/tests/MMD6Tests/English.tex @@ -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 index 0000000..0240c76 --- /dev/null +++ b/tests/MMD6Tests/Fenced Code Blocks.tex @@ -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} diff --git a/tests/MMD6Tests/French.tex b/tests/MMD6Tests/French.tex index ebc1b93..694cc33 100644 --- a/tests/MMD6Tests/French.tex +++ b/tests/MMD6Tests/French.tex @@ -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/German Guillemets.tex b/tests/MMD6Tests/German Guillemets.tex index 1f4ffef..402a768 100644 --- a/tests/MMD6Tests/German Guillemets.tex +++ b/tests/MMD6Tests/German Guillemets.tex @@ -13,6 +13,3 @@ foo -- bar foo{\ldots} \footnote{foo} - -~\citep{bar} -\end{document} diff --git a/tests/MMD6Tests/German.tex b/tests/MMD6Tests/German.tex index ebc1b93..a2e9fb3 100644 --- a/tests/MMD6Tests/German.tex +++ b/tests/MMD6Tests/German.tex @@ -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 index 0000000..e52e1a6 --- /dev/null +++ b/tests/MMD6Tests/Horizontal Rules.tex @@ -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 index 0000000..7f93106 --- /dev/null +++ b/tests/MMD6Tests/Inline Footnotes.tex @@ -0,0 +1,5 @@ +Inline.\footnote{foo \emph{bar}} + +Inline.\footnote{foo \emph{bar} +\href{/bar}{foo}\footnote{\href{/bar}{\slash bar}} +\textbf{foo}.} diff --git a/tests/MMD6Tests/Integrated.html b/tests/MMD6Tests/Integrated.html index eb9eed0..f9aca9a 100644 --- a/tests/MMD6Tests/Integrated.html +++ b/tests/MMD6Tests/Integrated.html @@ -50,6 +50,28 @@ code

“foo” and ‘bar’ – with — dashes…

+

CriticMarkup

+ +

foo

+ +

bar

+ +

foobar

+ +

foo

+ +

bar

+ +

Definition Lists

+ +
+
foo
+
bar
+
*foo bar
+ +
baz bat*
+
+

    diff --git a/tests/MMD6Tests/Integrated.htmlc b/tests/MMD6Tests/Integrated.htmlc index ac16124..e1f71c0 100644 --- a/tests/MMD6Tests/Integrated.htmlc +++ b/tests/MMD6Tests/Integrated.htmlc @@ -52,3 +52,22 @@ code

    Smart Quotes

    "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/Integrated.tex b/tests/MMD6Tests/Integrated.tex index eeb5dd3..2c79737 100644 --- a/tests/MMD6Tests/Integrated.tex +++ b/tests/MMD6Tests/Integrated.tex @@ -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} diff --git a/tests/MMD6Tests/Integrated.text b/tests/MMD6Tests/Integrated.text index 1da8522..30fd280 100644 --- a/tests/MMD6Tests/Integrated.text +++ b/tests/MMD6Tests/Integrated.text @@ -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 index b1d1a3b..0000000 --- a/tests/MMD6Tests/Math.tex +++ /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 index 0000000..3fd38dc --- /dev/null +++ b/tests/MMD6Tests/Nested Definition Lists.tex @@ -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 index 0000000..4fb39e2 --- /dev/null +++ b/tests/MMD6Tests/Reference Footnotes.tex @@ -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 index 0000000..fb9bfc8 --- /dev/null +++ b/tests/MMD6Tests/Setext Headers.tex @@ -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} diff --git a/tests/MMD6Tests/Swedish.tex b/tests/MMD6Tests/Swedish.tex index ebc1b93..3a50f0f 100644 --- a/tests/MMD6Tests/Swedish.tex +++ b/tests/MMD6Tests/Swedish.tex @@ -1,6 +1,6 @@ -`foo' +'foo' -``foo'' +''foo'' foo's @@ -13,6 +13,3 @@ foo -- bar foo{\ldots} \footnote{foo} - -~\citep{bar} -\end{document}