]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Work on cpack installer -- change project name for compatibility
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 18 Feb 2017 00:53:44 +0000 (19:53 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 18 Feb 2017 00:53:44 +0000 (19:53 -0500)
33 files changed:
CMakeLists.txt
README.md
scripts/markdown [new file with mode: 0755]
scripts/markdown.bat [new file with mode: 0755]
scripts/mmd [new file with mode: 0755]
scripts/mmd.bat [new file with mode: 0755]
scripts/mmd2all [new file with mode: 0755]
scripts/mmd2odf [new file with mode: 0755]
scripts/mmd2odf.bat [new file with mode: 0755]
scripts/mmd2opml [new file with mode: 0755]
scripts/mmd2opml.bat [new file with mode: 0755]
scripts/mmd2pdf [new file with mode: 0755]
scripts/mmd2rtf [new file with mode: 0755]
scripts/mmd2rtf.bat [new file with mode: 0755]
scripts/mmd2tex [new file with mode: 0755]
scripts/mmd2tex.bat [new file with mode: 0755]
src/main.c
texmf/tex/latex/mmd6/mmd6-article-begin.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-article-footer.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-article-leader.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-criticmarkup.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-default-metadata.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-memoir-footer.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-memoir-layout-8.5x11.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-memoir-packages.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-memoir-setup.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-tufte-book-begin.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-tufte-book-footer.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-tufte-book-leader.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-tufte-footer.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-tufte-handout-begin.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-tufte-handout-footer.tex [new file with mode: 0644]
texmf/tex/latex/mmd6/mmd6-tufte-handout-leader.tex [new file with mode: 0644]

index 74ca9254ae8744f261a3ebcf45903b5df4fe56e3..8201d28dce7940635356c0cf61957a3ff377810a 100644 (file)
@@ -5,7 +5,7 @@ cmake_minimum_required (VERSION 2.6)
 # Define Our Project
 # ==================
 
-set (My_Project_Title "MultiMarkdown 6")
+set (My_Project_Title "MultiMarkdown")
 set (My_Project_Description "Lightweight markup processor to produce HTML, LaTeX, and more.")
 set (My_Project_Author "Fletcher T. Penney")
 set (My_Project_Revised_Date "2017-02-14")
@@ -212,6 +212,35 @@ set(header_files
        src/writer.h
 )
 
+set (scripts
+       scripts/mmd
+       scripts/mmd2all
+       scripts/mmd2opml
+       scripts/mmd2odf
+       scripts/mmd2pdf
+       scripts/mmd2tex
+       scripts/markdown
+)
+
+set (latex
+       texmf/tex/latex/mmd6/mmd6-article-begin.tex
+       texmf/tex/latex/mmd6/mmd6-article-footer.tex
+       texmf/tex/latex/mmd6/mmd6-article-leader.tex
+       texmf/tex/latex/mmd6/mmd6-criticmarkup.tex
+       texmf/tex/latex/mmd6/mmd6-default-metadata.tex
+       texmf/tex/latex/mmd6/mmd6-memoir-footer.tex
+       texmf/tex/latex/mmd6/mmd6-memoir-layout-8.5x11.tex
+       texmf/tex/latex/mmd6/mmd6-memoir-packages.tex
+       texmf/tex/latex/mmd6/mmd6-memoir-setup.tex
+       texmf/tex/latex/mmd6/mmd6-tufte-book-begin.tex
+       texmf/tex/latex/mmd6/mmd6-tufte-book-footer.tex
+       texmf/tex/latex/mmd6/mmd6-tufte-book-leader.tex
+       texmf/tex/latex/mmd6/mmd6-tufte-footer.tex
+       texmf/tex/latex/mmd6/mmd6-tufte-handout-begin.tex
+       texmf/tex/latex/mmd6/mmd6-tufte-handout-footer.tex
+       texmf/tex/latex/mmd6/mmd6-tufte-handout-leader.tex
+)
+
 # Public headers, will be installed in 'include'
 # Do not manually add files here, use the ADD_PUBLIC_HEADER() macro
 set(public_header_files
@@ -400,8 +429,42 @@ set_target_properties(multimarkdown PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH
 
 # install (FILES ${public_header_files} DESTINATION local/include/libFoo) 
 
+# Install MMD binary
+install (TARGETS multimarkdown
+       DESTINATION bin
+       COMPONENT application
+)
+set (CPACK_COMPONENT_APPLICATION_DISPLAY_NAME "MultiMarkdown")
+set (CPACK_COMPONENT_APPLICATION_DESCRIPTION "Install the actual `multimarkdown` program.")
+
+
+# Install utility scripts
+install (FILES ${scripts}
+       DESTINATION bin
+       COMPONENT scripts
+       PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+)
+set (CPACK_COMPONENT_SCRIPTS_DISPLAY_NAME "Convenience scripts")
+set (CPACK_COMPONENT_SCRIPTS_DESCRIPTION "Install convenience scripts for common MultiMarkdown shortcuts, e.g. `mmd`, `mmd2tex`, etc.")
+
+
+# Install LaTeX support files
+install (FILES ${latex}
+       DESTINATION share/texmf/mmd6
+       COMPONENT latex
+       PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
+)
+set (CPACK_COMPONENT_LATEX_DISPLAY_NAME "LaTeX support files")
+set (CPACK_COMPONENT_LATEX_DESCRIPTION "Install configuration files for MultiMarkdown-based LaTex configurations.")
+
+
+# Which groups should be installed?
+set (CPACK_COMPONENTS_ALL application scripts latex)
+
+set (CPACK_PACKAGE_NAME "MultiMarkdown6")
 set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "${My_Project_Description}")
-set (CPACK_PACKAGE_VENDOR "${My_Project_Author}")
+#set (CPACK_PACKAGE_VENDOR "${My_Project_Author}")
+set (CPACK_PACKAGE_VENDOR "fletcherpenney.net")
 set (CPACK_PACKAGE_VERSION "${My_Project_Version_Major}.${My_Project_Version_Minor}.${My_Project_Version_Patch}")
 set (CPACK_PACKAGE_VERSION_MAJOR "${My_Project_Version_Major}")
 set (CPACK_PACKAGE_VERSION_MINOR "${My_Project_Version_Minor}")
@@ -425,6 +488,8 @@ endif (WIN32)
 
 set (CPACK_PACKAGE_INSTALL_DIRECTORY ${PROJECT})
 
+set (CPACK_PACKAGE_CONTACT "fletcher@fletcherpenney.net")
+
 include (CPack)
 
 
index 2756f7236eb99f34d87c64d9ec2ee110d9e00d92..fc5d63fef22386253a5b6e4e97c4740e615cb573 100644 (file)
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
 
 |            |                           |  
 | ---------- | ------------------------- |  
-| Title:     | MultiMarkdown        |  
+| Title:     | MultiMarkdown        |  
 | Author:    | Fletcher T. Penney       |  
 | Date:      | 2017-02-14 |  
 | Copyright: | Copyright © 2016 - 2017 Fletcher T. Penney.    |  
diff --git a/scripts/markdown b/scripts/markdown
new file mode 100755 (executable)
index 0000000..f59c5db
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# markdown --- MultiMarkdown convenience script
+#      <http://fletcherpenney.net/multimarkdown/>
+#      Fletcher T. Penney
+#
+# Pass arguments on to the binary to convert text to XHTML
+#
+
+# Be sure to include multimarkdown in our PATH
+export PATH="$PWD:/usr/local/bin:$PATH"
+
+which multimarkdown > /dev/null
+if [ $? = 1 ]
+then
+       echo multimarkdown executable not found! >&2
+       exit 1
+fi
+
+if [ $# = 0 ]
+then
+       multimarkdown -c
+else
+until [ "$*" = "" ]
+do
+       multimarkdown -c -b "$1"
+       shift
+done
+fi
diff --git a/scripts/markdown.bat b/scripts/markdown.bat
new file mode 100755 (executable)
index 0000000..633b2c3
--- /dev/null
@@ -0,0 +1,8 @@
+@ECHO OFF\r
+:Loop\r
+IF "%1"=="" GOTO Continue\r
+   "%~dp0\multimarkdown" -c -b "%1"\r
+SHIFT\r
+GOTO Loop\r
+:Continue\r
+\r
diff --git a/scripts/mmd b/scripts/mmd
new file mode 100755 (executable)
index 0000000..6f37362
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# mmd --- MultiMarkdown convenience script
+#      <http://fletcherpenney.net/multimarkdown/>
+#      Fletcher T. Penney
+#
+# Pass arguments on to the binary to convert text to XHTML
+#
+
+# Be sure to include multimarkdown in our PATH
+export PATH="$PWD:/usr/local/bin:$PATH"
+
+which multimarkdown > /dev/null
+if [ $? = 1 ]
+then
+       echo multimarkdown executable not found! >&2
+       exit 1
+fi
+
+if [ $# = 0 ]
+then
+       multimarkdown
+else
+until [ "$*" = "" ]
+do
+       multimarkdown -b "$1"
+       shift
+done
+fi
diff --git a/scripts/mmd.bat b/scripts/mmd.bat
new file mode 100755 (executable)
index 0000000..76e0074
--- /dev/null
@@ -0,0 +1,8 @@
+@ECHO OFF\r
+:Loop\r
+IF "%1"=="" GOTO Continue\r
+   "%~dp0\multimarkdown" -b "%1"\r
+SHIFT\r
+GOTO Loop\r
+:Continue\r
+\r
diff --git a/scripts/mmd2all b/scripts/mmd2all
new file mode 100755 (executable)
index 0000000..fe0294c
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+#
+# mmd2all --- MultiMarkdown convenience script
+#      <http://fletcherpenney.net/multimarkdown/>
+#      Fletcher T. Penney
+#
+# Pass arguments on to the binary to convert text to multiple
+# formats and open them
+#
+
+# Be sure to include multimarkdown in our PATH
+export PATH="$PWD:/usr/local/bin:$PATH"
+
+which multimarkdown > /dev/null
+if [ $? = 1 ]
+then
+       echo multimarkdown executable not found! >&2
+       exit 1
+fi
+
+if [ $# = 0 ]
+then
+       echo "Can't work on stdin"
+else
+until [ "$*" = "" ]
+do
+       file_name=`echo $1| sed 's/\.[^.]*$//'`
+
+       multimarkdown -b "$1"
+#      open "$file_name.html"
+
+       multimarkdown -b -t latex "$1"
+#      mate "$file_name.tex"
+
+       multimarkdown -b -t odf "$1"
+#      open "$file_name.fodt"
+
+       multimarkdown -b -t opml "$1"
+#      open "$file_name.opml"
+
+       shift
+done
+fi
diff --git a/scripts/mmd2odf b/scripts/mmd2odf
new file mode 100755 (executable)
index 0000000..0109cab
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# mmd2odf --- MultiMarkdown convenience script
+#      <http://fletcherpenney.net/multimarkdown/>
+#      Fletcher T. Penney
+#
+# Pass arguments on to the binary to convert text to OpenDocument
+#
+
+# Be sure to include multimarkdown in our PATH
+export PATH="$PWD:/usr/local/bin:$PATH"
+
+which multimarkdown > /dev/null
+if [ $? = 1 ]
+then
+       echo multimarkdown executable not found! >&2
+       exit 1
+fi
+
+if [ $# = 0 ]
+then
+       multimarkdown -t odf
+else
+until [ "$*" = "" ]
+do
+       multimarkdown -b -t odf "$1"
+       shift
+done
+fi
diff --git a/scripts/mmd2odf.bat b/scripts/mmd2odf.bat
new file mode 100755 (executable)
index 0000000..3e82996
--- /dev/null
@@ -0,0 +1,8 @@
+@ECHO OFF\r
+:Loop\r
+IF "%1"=="" GOTO Continue\r
+   "%~dp0\multimarkdown" -b -t odf "%1"\r
+SHIFT\r
+GOTO Loop\r
+:Continue\r
+\r
diff --git a/scripts/mmd2opml b/scripts/mmd2opml
new file mode 100755 (executable)
index 0000000..7ffa149
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# mmd2opml --- MultiMarkdown convenience script
+#      <http://fletcherpenney.net/multimarkdown/>
+#      Fletcher T. Penney
+#
+# Pass arguments on to the binary to convert text to OPML
+#
+
+# Be sure to include multimarkdown in our PATH
+export PATH="$PWD:/usr/local/bin:$PATH"
+
+which multimarkdown > /dev/null
+if [ $? = 1 ]
+then
+       echo multimarkdown executable not found! >&2
+       exit 1
+fi
+
+if [ $# = 0 ]
+then
+       multimarkdown -t opml
+else
+until [ "$*" = "" ]
+do
+       multimarkdown -b -t opml "$1"
+       shift
+done
+fi
diff --git a/scripts/mmd2opml.bat b/scripts/mmd2opml.bat
new file mode 100755 (executable)
index 0000000..a1b58a2
--- /dev/null
@@ -0,0 +1,8 @@
+@ECHO OFF\r
+:Loop\r
+IF "%1"=="" GOTO Continue\r
+   "%~dp0\multimarkdown" -b -t opml "%1"\r
+SHIFT\r
+GOTO Loop\r
+:Continue\r
+\r
diff --git a/scripts/mmd2pdf b/scripts/mmd2pdf
new file mode 100755 (executable)
index 0000000..1afe5a5
--- /dev/null
@@ -0,0 +1,79 @@
+#!/bin/sh
+#
+# mmd2pdf --- MultiMarkdown convenience script
+#      <http://fletcherpenney.net/multimarkdown/>
+#      Fletcher T. Penney
+#
+# Pass arguments on to the binary to convert text to LaTeX
+# Then use latexmk to process into PDF.
+# Requires a few extra passes of pdflatex to be sure all autorefs
+#      are managed.
+# Then call latexmk with -c option to try and clean up some extra files.
+#
+#      NOTE: This file is included as a convenience for users - it's not 
+#              likely to fail gracefully if there are any issues in your
+#              LaTeX file.
+
+# Be sure to include multimarkdown and latex in our PATH
+export PATH="$PWD:/usr/local/bin:/usr/texbin:/Library/TeX/texbin:$PATH"
+
+which multimarkdown > /dev/null
+if [ $? = 1 ]
+then
+       echo multimarkdown executable not found! >&2
+       exit 1
+fi
+
+if [ $# = 0 ]
+then
+       multimarkdown -t latex
+else
+until [ "$*" = "" ]
+do
+       multimarkdown -b -t latex "$1"
+
+       file_name=`echo $1| sed 's/\.[^.]*$//'`
+       
+       # Check for XeLaTeX mode
+       
+       xelatex=`multimarkdown -e usexelatex "$1"`
+       
+       if [ "$xelatex" != "" ]
+       then
+               # Use XeLaTeX
+               
+               xelatex "$file_name.tex"
+
+               if [ "$?" = "127" ]
+               then
+                       echo "It doesn't appear that xelatex is installed properly." 1>&2
+                       echo "Be sure you have a working LaTeX installation." 1>&2
+                       exit 1
+               fi
+
+               xelatex "$file_name.tex"
+               xelatex "$file_name.tex"
+               xelatex "$file_name.tex"
+               latexmk -c "$file_name.tex"
+       
+       else
+               # Use LaTeX
+               latexmk "$file_name.tex"
+       
+               if [ "$?" = "127" ]
+               then
+                       echo "It doesn't appear that latexmk is installed properly." 1>&2
+                       echo "Be sure you have a working LaTeX installation." 1>&2
+                       exit 1
+               fi
+
+               makeglossaries "$file_name"
+               pdflatex "$file_name.tex"
+               pdflatex "$file_name.tex"
+               latexmk -c "$file_name.tex"
+
+       fi
+       
+       shift
+done
+fi
diff --git a/scripts/mmd2rtf b/scripts/mmd2rtf
new file mode 100755 (executable)
index 0000000..2cf68b8
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# mmd2rtf --- MultiMarkdown convenience script
+#      <http://fletcherpenney.net/multimarkdown/>
+#      Fletcher T. Penney
+#
+# Pass arguments on to the binary to convert text to OpenDocument
+#
+
+# NOTE:  MultiMarkdown's RTF support is limited at best.  If you find
+#      something that isn't working properly, submit code for a proposed 
+#      fix via github or email.  But don't just send a message letting me
+#      know it isn't working. ;)
+#
+# Be sure to include multimarkdown in our PATH
+export PATH="$PWD:/usr/local/bin:$PATH"
+
+which multimarkdown > /dev/null
+if [ $? = 1 ]
+then
+       echo multimarkdown executable not found! >&2
+       exit 1
+fi
+
+if [ $# = 0 ]
+then
+       multimarkdown -t rtf
+else
+until [ "$*" = "" ]
+do
+       multimarkdown -b -t rtf "$1"
+       shift
+done
+fi
diff --git a/scripts/mmd2rtf.bat b/scripts/mmd2rtf.bat
new file mode 100755 (executable)
index 0000000..42f293f
--- /dev/null
@@ -0,0 +1,8 @@
+@ECHO OFF\r
+:Loop\r
+IF "%1"=="" GOTO Continue\r
+   "%~dp0\multimarkdown" -b -t rtf "%1"\r
+SHIFT\r
+GOTO Loop\r
+:Continue\r
+\r
diff --git a/scripts/mmd2tex b/scripts/mmd2tex
new file mode 100755 (executable)
index 0000000..2cac18d
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# mmd2tex --- MultiMarkdown convenience script
+#      <http://fletcherpenney.net/multimarkdown/>
+#      Fletcher T. Penney
+#
+# Pass arguments on to the binary to convert text to LaTeX
+#
+
+# Be sure to include multimarkdown in our PATH
+export PATH="$PWD:/usr/local/bin:$PATH"
+
+which multimarkdown > /dev/null
+if [ $? = 1 ]
+then
+       echo multimarkdown executable not found! >&2
+       exit 1
+fi
+
+if [ $# = 0 ]
+then
+       multimarkdown -t latex
+else
+until [ "$*" = "" ]
+do
+       multimarkdown -b -t latex "$1"
+       shift
+done
+fi
diff --git a/scripts/mmd2tex.bat b/scripts/mmd2tex.bat
new file mode 100755 (executable)
index 0000000..a77ae84
--- /dev/null
@@ -0,0 +1,8 @@
+@ECHO OFF\r
+:Loop\r
+IF "%1"=="" GOTO Continue\r
+   "%~dp0\multimarkdown" -b -t latex "%1"\r
+SHIFT\r
+GOTO Loop\r
+:Continue\r
+\r
index dd7f1f87273789568a82a055028f7af66bfc0004..33ebeb89eb1cdd3a20f81fbe766ddb3343d07973 100644 (file)
@@ -221,7 +221,7 @@ int main(int argc, char** argv) {
 
        // '--help' takes precedence
        if (a_help->count > 0) {
-               printf("\n%s v%s\n\n", MULTIMARKDOWN_6_NAME, MULTIMARKDOWN_6_VERSION);
+               printf("\n%s v%s\n\n", MULTIMARKDOWN_NAME, MULTIMARKDOWN_VERSION);
                printf("\tUsage: %s", binname);
                arg_print_syntax(stdout, argtable, "\n\n");
                printf("Options:\n");
@@ -232,7 +232,7 @@ int main(int argc, char** argv) {
 
        if (nerrors > 0) {
                // Report errors
-               arg_print_errors(stdout, a_end, MULTIMARKDOWN_6_NAME);
+               arg_print_errors(stdout, a_end, MULTIMARKDOWN_NAME);
                printf("Try '%s --help' for more information.\n", binname);
                exitcode = 1;
                goto exit;
@@ -240,9 +240,9 @@ int main(int argc, char** argv) {
 
        // '--version' also takes precedence
        if (a_version->count > 0) {
-               printf("\nMultiMarkdown 6 v%s\n", MULTIMARKDOWN_6_VERSION);
-               printf("%s\n\n", MULTIMARKDOWN_6_COPYRIGHT);
-               printf("%s\n", MULTIMARKDOWN_6_LICENSE);
+               printf("\nMultiMarkdown 6 v%s\n", MULTIMARKDOWN_VERSION);
+               printf("%s\n\n", MULTIMARKDOWN_COPYRIGHT);
+               printf("%s\n", MULTIMARKDOWN_LICENSE);
                printf("\n");
                goto exit;
        }
diff --git a/texmf/tex/latex/mmd6/mmd6-article-begin.tex b/texmf/tex/latex/mmd6/mmd6-article-begin.tex
new file mode 100644 (file)
index 0000000..d82f55c
--- /dev/null
@@ -0,0 +1,44 @@
+%
+%      For setup that must follow metadata included in the document
+%
+
+\usepackage[
+       plainpages=false,
+       pdfpagelabels,
+       pdftitle={\mytitle},
+       pagebackref,
+       pdfauthor={\myauthor},
+       pdfkeywords={\mykeywords}
+       ]{hyperref}
+\usepackage{memhfixc}
+
+
+\input{mmd6-title}
+
+
+\begin{document}
+
+\VerbatimFootnotes
+
+\title{\mytitle}
+\author{\myauthor}
+
+\ifx\mydate\undefined
+\else
+       \date{\mydate}
+\fi
+
+\mainmatter
+\maketitle
+
+
+% Copyright
+\setlength{\parindent}{0pt}
+
+\ifx\mycopyright\undefined
+\else
+       \textcopyright{} \mycopyright
+\fi
+
+\setlength{\parindent}{1em}
+
diff --git a/texmf/tex/latex/mmd6/mmd6-article-footer.tex b/texmf/tex/latex/mmd6/mmd6-article-footer.tex
new file mode 100644 (file)
index 0000000..4d5222c
--- /dev/null
@@ -0,0 +1,5 @@
+%
+%      Configure LaTeX to produce an article using the memoir class
+%
+
+\input{mmd6-memoir-footer}
diff --git a/texmf/tex/latex/mmd6/mmd6-article-leader.tex b/texmf/tex/latex/mmd6/mmd6-article-leader.tex
new file mode 100644 (file)
index 0000000..d67541d
--- /dev/null
@@ -0,0 +1,7 @@
+%
+%      Configure LaTeX to produce an article using the memoir class
+%
+
+\documentclass[oneside,article]{memoir}
+
+\input{mmd6-memoir-setup}
diff --git a/texmf/tex/latex/mmd6/mmd6-criticmarkup.tex b/texmf/tex/latex/mmd6/mmd6-criticmarkup.tex
new file mode 100644 (file)
index 0000000..6e06f55
--- /dev/null
@@ -0,0 +1,6 @@
+% CriticMarkup Support
+\usepackage{soul}
+\usepackage{xargs}
+\usepackage{todonotes}
+\newcommandx{\cmnote}[2][1=]{\todo[linecolor=red,backgroundcolor=red!25,bordercolor=red,#1]{#2}}
+
diff --git a/texmf/tex/latex/mmd6/mmd6-default-metadata.tex b/texmf/tex/latex/mmd6/mmd6-default-metadata.tex
new file mode 100644 (file)
index 0000000..1a758cb
--- /dev/null
@@ -0,0 +1,27 @@
+%
+%      Configure default metadata in case it's missing to avoid errors
+%
+
+\def\myauthor{Author}
+\def\defaultemail{}
+\def\defaultposition{}
+\def\defaultdepartment{}
+\def\defaultaddress{}
+\def\defaultphone{}
+\def\defaultfax{}
+\def\defaultweb{}
+\def\defaultaffiliation{}
+
+\def\mytitle{Title}
+\def\subtitle{}
+\def\mykeywords{}
+
+
+\def\bibliostyle{plain}
+% \def\bibliocommand{}
+
+\def\myrecipient{}
+
+% Overwrite with your own if desired
+%\input{ftp-metadata}
+
diff --git a/texmf/tex/latex/mmd6/mmd6-memoir-footer.tex b/texmf/tex/latex/mmd6/mmd6-memoir-footer.tex
new file mode 100644 (file)
index 0000000..ea0f7c1
--- /dev/null
@@ -0,0 +1,29 @@
+%
+%      MultiMarkdown default footer file
+%
+
+
+% Back Matter
+\if@mainmatter
+       we're in main
+       \backmatter
+\fi
+
+
+% Bibliography
+
+\ifx\bibliocommand\undefined
+\else
+       \bibliographystyle{\bibliostyle}
+       \bibliocommand
+\fi
+
+
+
+% Glossary
+\printglossaries
+
+
+% Index
+\printindex
+
diff --git a/texmf/tex/latex/mmd6/mmd6-memoir-layout-8.5x11.tex b/texmf/tex/latex/mmd6/mmd6-memoir-layout-8.5x11.tex
new file mode 100644 (file)
index 0000000..d8ce320
--- /dev/null
@@ -0,0 +1,35 @@
+%
+%      8.5 x 11 layout for memoir-based documents
+%
+
+
+%%% need more space for ToC page numbers
+\setpnumwidth{2.55em}
+\setrmarg{3.55em}
+
+%%% need more space for ToC section numbers
+\cftsetindents{part}{0em}{3em}
+\cftsetindents{chapter}{0em}{3em}
+\cftsetindents{section}{3em}{3em}
+\cftsetindents{subsection}{4.5em}{3.9em}
+\cftsetindents{subsubsection}{8.4em}{4.8em}
+\cftsetindents{paragraph}{10.7em}{5.7em}
+\cftsetindents{subparagraph}{12.7em}{6.7em}
+
+%%% need more space for LoF numbers
+\cftsetindents{figure}{0em}{3.0em}
+
+%%% and do the same for the LoT
+\cftsetindents{table}{0em}{3.0em}
+
+%%% set up the page layout
+\settrimmedsize{\stockheight}{\stockwidth}{*}  % Use entire page
+\settrims{0pt}{0pt}
+
+\setlrmarginsandblock{1.5in}{1.5in}{*}
+\setulmarginsandblock{1.5in}{1.5in}{*}
+
+\setmarginnotes{17pt}{51pt}{\onelineskip}
+\setheadfoot{\onelineskip}{2\onelineskip}
+\setheaderspaces{*}{2\onelineskip}{*}
+\checkandfixthelayout
\ No newline at end of file
diff --git a/texmf/tex/latex/mmd6/mmd6-memoir-packages.tex b/texmf/tex/latex/mmd6/mmd6-memoir-packages.tex
new file mode 100644 (file)
index 0000000..ba64eca
--- /dev/null
@@ -0,0 +1,17 @@
+%
+%      Default packages for memoir documents created by MultiMarkdown
+%
+
+\usepackage{fancyvrb}                  % Allow \verbatim et al. in footnotes
+\usepackage{graphicx}                  % To enable including graphics in pdf's
+\usepackage{booktabs}                  % Better tables
+\usepackage{tabulary}                  % Support longer table cells
+\usepackage[T1]{fontenc}               % Use T1 font encoding for accented characters
+\usepackage[utf8]{inputenc}            % For UTF-8 support
+\usepackage{xcolor}                            % Allow for color (annotations)
+\usepackage{listings}                  % Allow for source code highlighting
+\usepackage[sort&compress]{natbib} % Better bibliography support
+\usepackage{acronym}                   % Support acronyms
+\usepackage[normalem]{ulem}            % Support strikethrough
+
+\input{mmd6-criticmarkup}
diff --git a/texmf/tex/latex/mmd6/mmd6-memoir-setup.tex b/texmf/tex/latex/mmd6/mmd6-memoir-setup.tex
new file mode 100644 (file)
index 0000000..5708bfb
--- /dev/null
@@ -0,0 +1,31 @@
+%
+%      Generic Configuration for memoir-based documents
+%
+
+\usepackage{layouts}[2001/04/29]
+
+
+% In case we need a glossary, or index
+\usepackage{glossaries}
+\glstoctrue
+\makeglossaries
+\makeindex
+
+
+% Basic page layout configuration
+\def\mychapterstyle{default}
+\def\mypagestyle{headings}
+
+
+% Use 8.5 x 11 inch page layout
+\input{mmd6-memoir-layout-8.5x11}
+
+
+% Use default packages for memoir setup
+\input{mmd6-memoir-packages}
+
+
+% Configure default metadata to avoid errors
+\input{mmd6-default-metadata}
+
+
diff --git a/texmf/tex/latex/mmd6/mmd6-tufte-book-begin.tex b/texmf/tex/latex/mmd6/mmd6-tufte-book-begin.tex
new file mode 100644 (file)
index 0000000..bd71c7e
--- /dev/null
@@ -0,0 +1,16 @@
+
+
+\title{\mytitle}
+\author{\myauthor}
+
+\ifx\mydate\undefined
+\else
+       \date{\mydate}
+\fi
+
+\begin{document}
+\maketitle
+
+\tableofcontents
+%\listoffigures
+%\listoftables
diff --git a/texmf/tex/latex/mmd6/mmd6-tufte-book-footer.tex b/texmf/tex/latex/mmd6/mmd6-tufte-book-footer.tex
new file mode 100644 (file)
index 0000000..ad32c2b
--- /dev/null
@@ -0,0 +1 @@
+\input{mmd6-tufte-footer}
diff --git a/texmf/tex/latex/mmd6/mmd6-tufte-book-leader.tex b/texmf/tex/latex/mmd6/mmd6-tufte-book-leader.tex
new file mode 100644 (file)
index 0000000..21c57fc
--- /dev/null
@@ -0,0 +1,41 @@
+%
+%      tufte-latex book for MultiMarkdown
+%              http://code.google.com/p/tufte-latex/
+%
+%      Creates a basic handout emulating part of Edward Tufte's style
+%      from some of his books
+%
+%      * Only h1 and h2 are valid
+%      * \citep may be better than \cite
+%      * \autoref doesn't work properly, may get better results with \ref
+%      * footnotes don't work inside of tables
+%
+
+
+\documentclass{tufte-book}
+%\documentclass[justified]{tufte-handout}
+
+
+% Use default packages for memoir setup
+
+\usepackage{fancyvrb}                  % Allow \verbatim et al. in footnotes
+\usepackage{graphicx}                  % To enable including graphics in pdf's
+\usepackage{booktabs}                  % Better tables
+\usepackage{tabulary}                  % Support longer table cells
+\usepackage[utf8]{inputenc}            % For UTF-8 support
+\usepackage[T1]{fontenc}               % Use T1 font encoding for accented characters
+\usepackage{xcolor}                            % Allow for color (annotations)
+\usepackage{listings}                  % Allow for source code highlighting
+\usepackage{subscript}
+\usepackage{acronym}                   % Support acronyms
+
+
+\usepackage{glossaries}
+\glstoctrue
+\makeglossaries
+\makeindex
+
+
+% Configure default metadata to avoid errors
+\input{mmd6-default-metadata}
+
diff --git a/texmf/tex/latex/mmd6/mmd6-tufte-footer.tex b/texmf/tex/latex/mmd6/mmd6-tufte-footer.tex
new file mode 100644 (file)
index 0000000..c25159f
--- /dev/null
@@ -0,0 +1,10 @@
+
+
+% Bibliography
+
+\ifx\bibliocommand\undefined
+\else
+       \bibliographystyle{\bibliostyle}
+       \bibliocommand
+\fi
+
diff --git a/texmf/tex/latex/mmd6/mmd6-tufte-handout-begin.tex b/texmf/tex/latex/mmd6/mmd6-tufte-handout-begin.tex
new file mode 100644 (file)
index 0000000..58c14f5
--- /dev/null
@@ -0,0 +1,13 @@
+
+
+\title{\mytitle}
+\author{\myauthor}
+
+\ifx\mydate\undefined
+\else
+       \date{\mydate}
+\fi
+
+\begin{document}
+\maketitle
+
diff --git a/texmf/tex/latex/mmd6/mmd6-tufte-handout-footer.tex b/texmf/tex/latex/mmd6/mmd6-tufte-handout-footer.tex
new file mode 100644 (file)
index 0000000..ad32c2b
--- /dev/null
@@ -0,0 +1 @@
+\input{mmd6-tufte-footer}
diff --git a/texmf/tex/latex/mmd6/mmd6-tufte-handout-leader.tex b/texmf/tex/latex/mmd6/mmd6-tufte-handout-leader.tex
new file mode 100644 (file)
index 0000000..be8ffc8
--- /dev/null
@@ -0,0 +1,41 @@
+%
+%      tufte-latex handout for MultiMarkdown
+%              http://code.google.com/p/tufte-latex/
+%
+%      Creates a basic handout emulating part of Edward Tufte's style
+%      from some of his books
+%
+%      * Only h1 and h2 are valid
+%      * \citep may be better than \cite
+%      * \autoref doesn't work properly, may get better results with \ref
+%      * footnotes don't work inside of tables
+%
+
+
+\documentclass{tufte-handout}
+%\documentclass[justified]{tufte-handout}
+
+
+% Use default packages for memoir setup
+
+\usepackage{fancyvrb}                  % Allow \verbatim et al. in footnotes
+\usepackage{graphicx}                  % To enable including graphics in pdf's
+\usepackage{booktabs}                  % Better tables
+\usepackage{tabulary}                  % Support longer table cells
+\usepackage[utf8]{inputenc}            % For UTF-8 support
+\usepackage[T1]{fontenc}               % Use T1 font encoding for accented characters
+\usepackage{xcolor}                            % Allow for color (annotations)
+\usepackage{listings}                  % Allow for source code highlighting
+\usepackage{subscript}
+\usepackage{acronym}                   % Support acronyms
+
+
+\usepackage{glossaries}
+\glstoctrue
+\makeglossaries
+\makeindex
+
+
+% Configure default metadata to avoid errors
+\input{mmd6-default-metadata}
+