]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Add support for 'latexauthor' and 'latextitle' metadata (Addresses #58)
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Mon, 29 May 2017 22:03:42 +0000 (18:03 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Mon, 29 May 2017 22:04:02 +0000 (18:04 -0400)
Sources/libMultiMarkdown/latex.c
texmf/tex/latex/mmd6/article/mmd6-article-begin.tex
texmf/tex/latex/mmd6/shared/mmd6-title.tex

index 93d4d94c4084046c1115472c2cf44b24bb94a0f5..b1d7557a58dbbbfa4d25a7b5c8b16dbbb593cbb5 100644 (file)
@@ -1890,16 +1890,22 @@ void mmd_start_complete_latex(DString * out, const char * source, scratch_pad *
                } else if (strcmp(m->key, "mmdfooter") == 0) {
                } else if (strcmp(m->key, "mmdheader") == 0) {
                } else if (strcmp(m->key, "quoteslanguage") == 0) {
-               } else if ((strcmp(m->key, "title") == 0) ||
-                       (strcmp(m->key, "latextitle") == 0)) {
+               } else if (strcmp(m->key, "title") == 0) {
                        print_const("\\def\\mytitle{");
                        mmd_print_string_latex(out, m->value);
                        print_const("}\n");
-               } else if ((strcmp(m->key, "author") == 0) ||
-                       (strcmp(m->key, "latexauthor") == 0)) {
+               } else if (strcmp(m->key, "latextitle") == 0) {
+                       print_const("\\def\\latextitle{");
+                       print(m->value);
+                       print_const("}\n");
+               } else if (strcmp(m->key, "author") == 0) {
                        print_const("\\def\\myauthor{");
                        mmd_print_string_latex(out, m->value);
                        print_const("}\n");
+               } else if (strcmp(m->key, "latexauthor") == 0) {
+                       print_const("\\def\\latexauthor{");
+                       print(m->value);
+                       print_const("}\n");
                } else if (strcmp(m->key, "date") == 0) {
                        print_const("\\def\\mydate{");
                        mmd_print_string_latex(out, m->value);
index d82f55c3ecd856a15f856e28211a1110ec11926e..29f21e257fe5162d715001cd88d9772393f4b0b0 100644 (file)
@@ -20,7 +20,7 @@
 
 \VerbatimFootnotes
 
-\title{\mytitle}
+\title{\latextitle}
 \author{\myauthor}
 
 \ifx\mydate\undefined
index 7e676732cda4f9140e5b39256d6ca14bca1b0711..e108fed4e75cbfeb5cadad241460fc6a0c2d1878 100644 (file)
@@ -35,4 +35,9 @@
 \ifx\event\undefined
 \else
        \date[\mydate]{\today}
-\fi
\ No newline at end of file
+\fi
+
+\ifx\latextitle\undefined
+       \def\latextitle{\mytitle}
+\else
+\fi