Skip to content

Commit

Permalink
update letter
Browse files Browse the repository at this point in the history
  • Loading branch information
fletcher committed Feb 11, 2011
1 parent 852a87d commit 9ad3f50
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 23 deletions.
Binary file removed Sample-Letter/envelope.pdf
Binary file not shown.
Binary file modified Sample-Letter/letter.pdf
Binary file not shown.
114 changes: 114 additions & 0 deletions Sample-Letter/letter.tex
@@ -0,0 +1,114 @@
\input{mmd-letterhead-header }
\def\mytitle{Test Letter }
\def\myauthor{John Doe }
\def\email{fletcher@example.net }
\def\address{123 Main St. \\
Some City, ST 12345 \\
}
\def\recipient{Some Person }
\def\recipientaddress{321 Main St \\
Some City, ST 54321 \\
}
\def\phone{(555) 555-5555 }
\def\mydate{December 15, 2007 }
\def\latexxslt{custom-letterhead.xslt }
\input{mmd-letterhead-begin-doc }
\def\latexmode{memoir }
\def\blackandwhite{true }
To Whom It May Concern,

This is a sample document to demonstrate the new letterhead XSLT for
MultiMarkdown. It is designed to be pretty complete in itself, but is also
flexible enough to allow for custom fonts and logos on the cover page.
Additionally, you can designate default return address information in your own
stylesheet, so that you don't have to enter it in every document.

The letterhead feature requires that you install the \texttt{mmd-letterhead.sty} file
(available from \href{http://files.fletcherpenney.net/mmd-letterhead.zip}{http:\slash \slash files.fletcherpenney.net\slash mmd-letterhead.zip}). You
install it the same way you install other LaTeX stylesheets. To use the
envelope feature, you must install \texttt{mmd-envelope.sty}.

Additionally, this sample document uses the \texttt{custom-letterhead.xslt} XSLT
stylesheet (included with MultiMarkdown), and the \texttt{fletcherpenney.sty} LaTeX
stylesheet, which is available on my website
(\href{http://fletcherpenney.net/XSLT_Files}{http:\slash \slash fletcherpenney.net\slash XSLT\_Files}) and also included with this sample
document. These files add additional font information and the logotype in the
upper left corner. Due to the font requirements, you must process this file
with XeLaTeX, which is part of \href{http://www.tug.org/mactex/}{MacTeX}\footnote{\href{http://www.tug.org/mactex/}{http:\slash \slash www.tug.org\slash mactex\slash }}. To use
this customization, you must have the \texttt{Garamond} and \texttt{Didot} fonts installed
on your system.

To use the letterhead and envelope features, simply be sure to include the
appropriate metadata --- \texttt{Author}, \texttt{Address}, \texttt{Recipient}, \texttt{RecipientAddress}. You can also optionally use \texttt{Email}, \texttt{Web}, \texttt{Phone}, \texttt{Fax},
\texttt{Department}, \texttt{Position}, \texttt{Signature}, and \texttt{Date}. To save time, you can
follow the example of the \texttt{custom-letterhead.xslt} and \texttt{custom-envelope.xslt}
files to store default information to be used. You can also add a custom logo,
typesetting, and a scanned signature, or whatever else you like. This sample
demonstrates most of these features via the \texttt{custom-letterhead} and
\texttt{custom-envelope} XSLT stylesheets.

In order to demonstrate some of the capabilities for letters produced with
this system, I have included a familiar table, MultiMarkdown vs. Crayons (\autoref{multimarkdownvs.crayons}).

\begin{table}[htbp]
\begin{minipage}{\linewidth}
\setlength{\tymax}{0.5\linewidth}
\centering
\small
\caption{MultiMarkdown vs. Crayons}
\label{multimarkdownvs.crayons}
\begin{tabular}{@{}lcc@{}} \toprule
Features&MultiMarkdown&Crayons\\
\midrule
Melts in warm places&No&Yes\\
Mistakes can be easily fixed&Yes&No\\
Easy to copy documents for friends&Yes&No\\
Fun at parties&No&Why not?\\

\midrule
Minimum markup for maximum quality?&Yes&No\\

\bottomrule

\end{tabular}
\end{minipage}
\end{table}


In order to ensure that we go on to page 2, I have included some filler text
so that you can see what the ``non-cover'' pages look like.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum laoreet
consequat turpis. Praesent dolor ligula, venenatis vitae, posuere ut, luctus
ac, urna. Fusce sed enim. Duis ipsum enim, placerat et, tincidunt et, aliquet
vel, nulla. Donec pellentesque dolor a augue iaculis aliquam. In a turpis.
Mauris et turpis. Morbi pharetra arcu vel tortor. Vestibulum lobortis. Cras
tempus, est a dictum ultricies, augue pede iaculis lorem, ac sagittis dolor
massa in risus. Sed pulvinar faucibus velit. Donec suscipit leo. Donec eget
nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
inceptos hymenaeos. Vivamus egestas. Aenean risus lectus, dapibus eget,
feugiat vel, dapibus eu, lorem. Fusce sem metus, porta nec, imperdiet sit
amet, fermentum ac, ligula. Duis facilisis, orci non ullamcorper imperdiet,
nisl tortor aliquet tellus, eget vehicula magna massa sit amet neque.

Mauris non metus. Praesent pretium. Ut pellentesque lorem sit amet est.
Phasellus sit amet orci pellentesque quam suscipit tempus. Maecenas ac tortor.
Nulla rhoncus vehicula dui. Fusce dictum, orci eu iaculis tempus, nisi justo
tempus pede, non mattis mi eros ac ligula. Maecenas vehicula eleifend justo.
Donec at libero et orci sollicitudin iaculis. Nunc porta malesuada neque.
Vestibulum turpis. Morbi a sem. Vivamus ut urna. Duis ornare.

And some math:

\[ {e}^{i\pi }+1=0 \]

\[ {x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a} \]

You can also include formulas within a sentence, such as
\({x}^{2}+{y}^{2}=1\).

Enjoy!

\input{mmd-letterhead-footer }

\end{document}
51 changes: 28 additions & 23 deletions Sample-Letter/sample.txt → Sample-Letter/letter.txt
@@ -1,12 +1,20 @@
Title: Test Letter
Author: Fletcher T. Penney
recipient: Some Person
latex input: mmd-letterhead-header
Title: Test Letter
Author: John Doe
email: fletcher@example.net
address: 123 Main St.
Some City, ST 12345
recipient: Some Person
Recipient Address: 321 Main St
New York, NY 54321
Date: December 15, 2007
latex xslt: custom-letterhead.xslt
graphic signature: true
base header level: 2
Some City, ST 54321
phone: (555) 555-5555
Date: December 15, 2007
latex xslt: custom-letterhead.xslt
latex input: mmd-letterhead-begin-doc
latex mode: memoir
latex footer: mmd-letterhead-footer
black and white: true
base header level: 2


To Whom It May Concern,
Expand Down Expand Up @@ -45,15 +53,15 @@ demonstrates most of these features via the `custom-letterhead` and
In order to demonstrate some of the capabilities for letters produced with
this system, I have included a familiar table, [MultiMarkdown vs. Crayons][].

[MultiMarkdown vs. Crayons][MultiMarkdown vs. Crayons]
Features | MultiMarkdown | Crayons |
----------------------------------- | :-----------: | :------: |
Melts in warm places | No | Yes |
Mistakes can be easily fixed | Yes | No |
Easy to copy documents for friends | Yes | No |
Fun at parties | No | Why not? |
[MultiMarkdown vs. Crayons][MultiMarkdown vs. Crayons]
Features | MultiMarkdown | Crayons |
----------------------------------- | :-----------: | :------: |
Melts in warm places | No | Yes |
Mistakes can be easily fixed | Yes | No |
Easy to copy documents for friends | Yes | No |
Fun at parties | No | Why not? |

Minimum markup for maximum quality? | Yes | No |
Minimum markup for maximum quality? | Yes | No |


In order to ensure that we go on to page 2, I have included some filler text
Expand Down Expand Up @@ -83,14 +91,11 @@ Vestibulum turpis. Morbi a sem. Vivamus ut urna. Duis ornare.

And some math:

<< e^(i pi) + 1 = 0 [Euler's identity]>>
\\[ {e}^{i\pi }+1=0 \\]

<< x_(1,2) = (-b+-sqrt(b^2-4ac))/(2a) [quadratic equation solution]>>
\\[ {x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a} \\]

You can also include formulas within a sentence, such as
<<x^2 + y^2 = 1>>.
\\({x}^{2}+{y}^{2}=1\\).

BTW, the signature below is obviously not mine, but is included as an example
of what you can do with this setup.

Enjoy!
Enjoy!

0 comments on commit 9ad3f50

Please sign in to comment.