## Updates ##
+* 2017-02-14 -- v 0.3.0a:
+
+ * ADDED: Add basic image support to LaTeX
+ * ADDED: Add file transclusion
+ * ADDED: Add support for citation 'locators'
+ * ADDED: Add support for manual labels on ATX Headers
+ * ADDED: Add support for manual labels on Setext Headers
+ * ADDED: Add support for tables in LaTeX
+ * ADDED: HTML Comments appear as raw LaTeX
+ * ADDED: Improved citation support in LaTeX
+ * ADDED: Support \autoref{} in LaTeX
+ * ADDED: Support combined options in LaTeX citations that use the '\]\[' syntax
+ * ADDED: Support language specifier in fenced code blocks
+ * ADDED: Support metadata in LaTeX
+ * ADDED: Update Citations test suite
+ * FIXED: Escaped LaTeX characters
+ * FIXED: Fix bug in URL parsing
+ * FIXED: Fix bug in citation links
+ * FIXED: Fix bug when no closing divider or newline at end of last table cell
+ * FIXED: Fix issue printing '-'
+ * FIXED: Fix scan_url test suite
+ * FIXED: Get Math working in LaTeX
+ * FIXED: Improve reliability or link scanner
+ * FIXED: Properly add id attribute to new instances of citation only
+ * FIXED: Properly handle manual labels with TOC
+ * FIXED: Properly print hash characters in LaTeX
+ * FIXED: Separate LaTeX verbatim and texttt character handling
+ * FIXED: Update Escapes test LaTeX result
+ * FIXED: Work on escaping LaTeX characters
+
+
* 2017-02-08 -- v 0.1.4a:
* ADDED: Add smart quote support for other languages (resolves #15)
print_char('\n');
} else if (strcmp(m->key, "htmlheaderlevel") == 0) {
} else if (strcmp(m->key, "lang") == 0) {
+ } else if (strcmp(m->key, "latexbegin") == 0) {
} else if (strcmp(m->key, "latexfooter") == 0) {
+ } else if (strcmp(m->key, "latexheaderlevel") == 0) {
} else if (strcmp(m->key, "latexinput") == 0) {
+ } else if (strcmp(m->key, "latexleader") == 0) {
} else if (strcmp(m->key, "latexmode") == 0) {
} else if (strcmp(m->key, "mmdfooter") == 0) {
} else if (strcmp(m->key, "mmdheader") == 0) {
// Iterate over metadata keys
meta * m;
+ m = extract_meta_from_stack(scratch, "latexleader");
+ if (m) {
+ printf("\\input{%s}\n", m->value);
+ }
+
for (m = scratch->meta_hash; m != NULL; m = m->hh.next) {
if (strcmp(m->key, "baseheaderlevel") == 0) {
} else if (strcmp(m->key, "bibtex") == 0) {
} else if (strcmp(m->key, "htmlheader") == 0) {
} else if (strcmp(m->key, "htmlheaderlevel") == 0) {
} else if (strcmp(m->key, "lang") == 0) {
+ } else if (strcmp(m->key, "latexbegin") == 0) {
} else if (strcmp(m->key, "latexheader") == 0) {
- print(m->value);
- print_char('\n');
} else if (strcmp(m->key, "latexfooter") == 0) {
+ } else if (strcmp(m->key, "latexheaderlevel") == 0) {
} else if (strcmp(m->key, "latexinput") == 0) {
+ } else if (strcmp(m->key, "latexleader") == 0) {
} else if (strcmp(m->key, "latexmode") == 0) {
} else if (strcmp(m->key, "mmdfooter") == 0) {
} else if (strcmp(m->key, "mmdheader") == 0) {
print("}\n");
}
}
+
+ m = extract_meta_from_stack(scratch, "latexbegin");
+ if (m) {
+ printf("\\input{%s}\n", m->value);
+ }
+
scratch->padded = 1;
}
void mmd_end_complete_latex(DString * out, const char * source, scratch_pad * scratch) {
pad(out, 2, scratch);
+
+ meta * m = extract_meta_from_stack(scratch, "latexfooter");
+
+ if (m) {
+ printf("\\input{%s}\n\n", m->value);
+ }
+
print("\\end{document}");
scratch->padded = 0;
}
store_citation(p, f);
}
- // Store links in a hash for rapid retrieval when exporting
+ // Store metadata in a hash for rapid retrieval when exporting
p->meta_hash = NULL;
meta * m;
void meta_set_value(meta * m, const char * value);
void meta_free(meta * m);
char * extract_metadata(scratch_pad * scratch, const char * target);
+meta * extract_meta_from_stack(scratch_pad * scratch, const char * target);
void read_table_column_alignments(const char * source, token * table, scratch_pad * scratch);
-<p>title: <em>foo</em> "bar"
+<p>latex leader: mmd-article-header
+title: <em>foo</em> "bar"
css: http://foo.com/bar.css
HTML header: <script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
+latex begin: mmd-article-begin-doc
+latex footer: mmd-memoir-footer
foo: bar
foo bar
foo bar
foo: <em>bar</em>
html header level: 2
+latex header level: 2
base header level: 3</p>
<p>foo: bar</p>
+\input{mmd-article-header}
\def\mytitle{*foo* "bar"}
\def\foo{bar foo bar foo bar}
+\input{mmd-article-begin-doc}
foo: bar
-\section{foo }
+\chapter{foo }
\label{foo}
+\input{mmd-memoir-footer}
+
\end{document}
+latex leader: mmd-article-header
title: *foo* "bar"
css: http://foo.com/bar.css
HTML header: <script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
+latex begin: mmd-article-begin-doc
+latex footer: mmd-memoir-footer
foo: bar
foo bar
foo bar
foo: *bar*
html header level: 2
+latex header level: 2
base header level: 3
foo: bar