Commit e44f1fdf authored by Caleb Maclennan's avatar Caleb Maclennan

add various example and galley files

parent 9e566b29
\documentclass{article}
\begin{document}
Hello world!
\end{document}
\ No newline at end of file
\documentclass{scrartcl}
\usepackage{libertine}
\usepackage{lipsum}
\begin{document}
\lipsum[1-5]
\end{document}
\ No newline at end of file
\documentclass{scrartcl}
\usepackage{lipsum}
\begin{document}
\lipsum[1-10]
\end{document}
\ No newline at end of file
File added
......@@ -60,19 +60,44 @@
\makeindex[intoc,columns=2]
% Set default values for formatting verbatim examples
\lstset{%
numberstyle=\tiny,
xleftmargin=2em,
xrightmargin=2em,
framesep=1ex,
rulesep=2pt
}
\newcommand*{\texample}[1]{
\lstset{
frame=shadowbox,
title=#1.tex,
caption=[file: #1.tex]#1.tex,
label=#1
}
\lstinputlisting{../examples/#1.tex}
}
\def\lstlistlistingname{List of examples}
\lstnewenvironment{ExampleCode}[1][snippet.tex]{%
\lstnewenvironment{ExampleShell}[1][shell commands]{%
\def\lstlistingname{Example}
\lstset{%
language=bash,
float=here,
frame=l,
title=#1,
caption=[terminal: #1]#1,
label=#1
}
\ttfamily
}{}
\lstnewenvironment{ExampleCode}[1][snippet.tex]{%
\def\lstlistingname{Example}
\lstset{%
language=tex,
numbers=left,
numberstyle=\tiny,
xleftmargin=2em,
xrightmargin=2em,
float=here,
frame=l,
framesep=1ex,
caption=[snippet: #1]~,
title=#1,
caption=[file: #1]#1,
label=#1
}
\ttfamily
......@@ -82,11 +107,7 @@
\lstset{%
language=tex,
numbers=left,
numberstyle=\tiny,
xleftmargin=2em,
xrightmargin=2em,
frame=shadowbox,
framesep=1ex,
title=#1,
caption=[file: #1]#1,
label=#1
......@@ -254,6 +275,13 @@ My weapon of choice would be LibreOffice, but this didn't get me much further.
Why alternatives like page layout programs don't quite cut the mustard.
Special events shouldn't require starting from scratch with a totally new
layout. Memorial services, weddings, seminars, etc should be easily adaptable
from existing publishing workflow.
You shouldn't be copy-pasting a bunch of repetitive parts or trying to remember
what week you used that special thing...
\subsection{Most typography fails its purpose}
Your content is more that just the way it is typeset, but the way you typeset it
......@@ -301,13 +329,6 @@ example~\vref{fig:tflafter}, please just put this document down and walk away.
\pdfcompare{1}{../gallery/tfl_sample_pleading_before.pdf}{../gallery/tfl_sample_pleading_after.pdf}{The difference typography can make\cite{tflpleading}}{tfl}
Special events shouldn't require starting from scratch with a totally new
layout. Memorial services, weddings, seminars, etc should be easily adaptable
from existing publishing workflow.
You shouldn't be copy-pasting a bunch of repetitive parts or trying to remember
what week you used that special thing...
\section{What is the right tool for the job?}
Have more than a hammer.
......@@ -394,14 +415,31 @@ Recommend luatex...
\subsection{How do I make it do something?}
\begin{ExampleFile}[helloworld.tex]
\documentclass{letter}
\begin{document}
Hello world!
\end{document}
\end{ExampleFile}
\texample{helloworld}
See example~\vref{helloworld}
Compile by running
\begin{ExampleShell}[compile helloworld example]
[host]# pdflatex helloworld.tex
\end{ExampleShell}
See example~\vref{helloworld.tex}
\subsubsection{Picking a document class}
\subsubsection{Setting the fonts}
Using latex will limit your font selection a little because not all fonts
come in formats that support its adavanced typesetting features, but rest easy
because the choices you do have are the best of the best.
Please \textbf{for the love of all things beautiful do not set your bulletin in
Comic Sans}\footnote{I'm not kidding. Don't do it. If you don't know
why, learn why. Seriously look around design galleries and find they
lists of ``worst fonts ever''. Comic Sans is always at the top of the
list}. That is how puppies die and I will disavow you.
\texample{libertine}
\subsection{How do I use the examples in this tutorial?}
......@@ -646,5 +684,7 @@ Some inspiring examples of well typeset bulletins!
\addcontentsline{toc}{section}{\lstlistlistingname}
\lstlistoflistings
\listoffigures
\end{document}
% vim: textwidth=80
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment