XSLT confusion


I’m using Scrivener + Mendeley + TexShop to write scientific papers.
I need a certain layout, and I need to use LaTex because of citations,
so I need to look at the .xslt-files that come with Scrivener.

While looking at the files I noticed that in the compiled file (MultiMarkdown -> LaTex) are things that I can’t see in the corresponding .xslt-file.

I used the standard memoir.xslt, and in the compiled file this shows up:

\usepackage{fancyvrb}			% Allow \verbatim et al. in footnotes
\usepackage{graphicx}			% To include graphics in pdf's (jpg, gif, png, etc)
\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)

%\geometry{landscape}			% Activate for rotated page geometry

%\usepackage[parfill]{parskip}	        % Activate to begin paragraphs with an empty
						        % line rather than an indent

\def\myauthor{Author}			% In case these were not included in metadata


I can’t find this in memoir.xslt, but in memoir-xelatex.xslt.
How comes this?


Is there any documentation available when it comes to scrivener and XSLT?

This has all been made much less confusing in the new version of MMD. It generates LaTeX code natively, instead of using XSLTs, and has an easy way of including preamble and footer documents using \input{} codes. With what you are seeing, the XSLT files are chained together. If you can’t find stuff in one file, check the top of it for an import statement which includes another file, and then open that one, look for it, and continue on upward in the chain. Best practice is to make your own XSLT, using a simple one like article.xslt as an example. The way it works is, whatever you define in the top level XSLT, the one you give to Scrivener, takes precedence over others. So you can import the memoir.xslt (as article does) and use it to only modify a few pieces of output while taking advantage of the larger network of files.

But like I say, all of this can be done with much less bother in the new system, and Scrivener already works with MMD3 if you use the optional Mac support package. Just make sure to move your old MMD folder in Application Support to a backup location before running the installer. For now, I recommend using Scrivener’s “Meta-Data” file technique for the meta-data block. MMD3 meta-data is slightly different in that order matters; and the current version of Scrivener doesn’t work well with that in mind. If you place a file named “Meta-Data” at the top of your compile, it will be used as meta-data when you compile. The next release of Scrivener, 2.1, will have some transitional stuff to make MMD3 easier, and following that transitional period, we’re putting together some further integration tools, and will be embedding MMD3 (hopefully!) in the application bundle, making it official. But like I say, it already works with the support package installed.