-
Notifications
You must be signed in to change notification settings - Fork 55
How do I customize MultiMarkdown Output?
By default, I believe MultiMarkdown does a good job with the default output for the various output formats. That said, it is often desirable to customize the output to your specific needs.
The easiest way to customize HTML output is to apply style information using
CSS. You can do this by linking to a CSS
file with the [CSS
metadata][CSS], or by manually including style
information in the form of the [HTML Header
metadata][HTML Header].
A more advanced approach is to use [XSLT] to post-process the HTML output and customize it. You can also write scripts in whatever language you are most familiar with to process the output as desired. You can include these functions in your workflow in whatever method works best for you.
Similarly, you can customize the appearance of your LaTeX output when using
MultiMarkdown. The most straightforward way is through the use of [LaTeX Input
metadata][latexinput]. You can include whatever valid LaTeX code in
these files that you desire, and you are limited only by your creativity. You
can redefine common commands as needed. You can include various packages, or
add default metadata. I recommend examining the samples in the MultiMarkdown
Gallery to see some of the customizations I have used so far.
In addition to customizing the output, there are several different "modes" of
operation when MultiMarkdown outputs LaTeX. These modes can create various
types of documents and rely on common packages. These modes can be specified with the [LaTeX Mode
metadata][latexmode].
The default mode of operation outputs fairly standard LaTeX that should be compatible with most basic document types and packages.
The memoir
mode generates output designed to be compatible with the memoir
package. This package offers several advantages, and can be used to create
books, reports, and other basic document formats.
By default, this User's Guide is processed into a PDF using the memoir class.
The beamer
mode generates output designed to be compatible with the beamer
package. This package allows you to easily create PDF slideshows (similar to
Apple's Keynote or Microsoft's PowerPoint). I used it to create the "What is
MultiMarkdown?" [slideshow]
(https://github.com/fletcher/MultiMarkdown-Gallery/raw/master/What-Is-MMD/what_is_mmd.pdf).
There really isn't anything to customize when creating an OPML document, since it's really just a different way of formatting a MultiMarkdown text document.
OpenDocument files use style information in a way that's similar to CSS for
HTML. To embed custom style information, you can use the [ODF Header
metadata][odfheader]. This will embed your XML into the header of the
document. You'll have to figure out the syntax of what to include on your own,
but it's not too difficult if you examine the source of the documents you are
interested in emulating.
Since the OpenDocument Flat Text file is an XML file, you could also use [XSLT] to customize the file as desired.
There are some creative ways to tailor the output you get based on which format type you are exporting, particularly with HTML and LaTeX. These tricks make use of [raw LaTeX][MultiMarkdown and LaTeX], and [raw HTML].
Experiment and you can come up with some creative things!