% Refcard.tex - The af quick reference card.
% Copyright (C) 1996, 1997 Malc Arnold.
%
%  This program is free software; you can redistribute it and/or modify
%  it under the terms of the GNU General Public License as published by
%  the Free Software Foundation; either version 2, or (at your option)
%  any later version.
%
%  This program is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%  GNU General Public License for more details.
%
%  You should have received a copy of the GNU General Public License
%  along with this program; if not, write to the Free Software
%  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% RCS Info
%
% $Id: refcard.tex,v 2.0 1997/09/06 11:38:29 malc Rel $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% To build the reference card, just run this file through LaTeX.  If you
% use a dvi driver other than dvips, you'll have to tell it that this
% document is in landscape.  Ideally, you should print the two output
% pages as a single double-sided reference card (or sheet).
%
% This isn't exactly the world's most stylish LaTeX source, but it'll do.
% You may find you need to change the margins to get double-sided output
% to line up on your particular printer.
% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define the document class
\documentclass[10pt,a4paper,landscape]{article}

% We need the multicol package
\usepackage{multicol}

% Give dvips a paper size
\special{papersize=297mm,210mm}

% Optimise the paper dimensions
\addtolength{\textheight}{1.10in}
\addtolength{\headsep}{-0.25in}
\addtolength{\textwidth}{5.60in}
\addtolength{\oddsidemargin}{-2.50in}
\addtolength{\evensidemargin}{-2.50in}

% Configure paragraphs to taste
\setlength{\parindent}{0in}
\setlength{\parskip}{0.10in}

% We don't want page numbers
\pagestyle{empty}

% Now start the document
\begin{document}
\begin{multicols}{3}

  % With a header for the card
  \parbox{2.80in}{\begin{center}
      {\huge \textbf{Af Reference Card}}

      {\small {For Af version 2.0}}

      {\small Copyright \copyright 1996, 1997 Malc Arnold}
    \end{center}}
  \vfill

  % How to start af
  {\large \textbf{Starting Af}}
  \nopagebreak

  \parbox{2.80in}{To start af in interactive mode, just type ``af''.  To
    read a folder instead of your incoming mailbox use ``af -f
    \emph{folder}''.  To start af to send a single message use ``af
    \emph{address}''.}
  \vfill

  % How to stop af
  {\large \textbf{Leaving Af}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    suspend af & C-z \\
    exit af & C-x C-c \\
    save all buffers and exit af & M-z \\
  \end{tabular}
  \vfill

  % Aborting commands
  {\large \textbf{Aborting Commands}}
  \nopagebreak

  \parbox{2.80in}{Typing ``C-g'' will always abort a partially-typed
    command.  If you are in Minibuffer or Typeout mode, ``C-g'' with no
    partially-typed command will cancel the operation, returning you to
    Mail mode.}
  \vfill

  % The help system
  {\large \textbf{Getting Help}}
  \nopagebreak

  \parbox{2.80in}{To get into af's help system, type ``C-h''.  To see
    what options are available, type ``C-h'' again.  For a verbose
    listing of the options, type ``C-h'' a third time.}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    view the af user manual & C-h i \\
    show what matches a string & C-h a \\
    show the help for a function & C-h f \\
    show the help for a key & C-h k \\
    show what command a key runs & C-h c \\
  \end{tabular}
  \vfill

  % Sending mail
  {\large \textbf{Sending Mail}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    send a mail message & M-s or M-m \\
    reply to the current message & M-r \\
    group reply to the message & C-M-r \\
    forward the current message & M-f \\
    bounce the current messsage & M-b \\
    & \\
    set a mail alias & C-x C-a \\
  \end{tabular}
  \vfill

  % Basic movement
  {\large \textbf{Moving Around the Buffer}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    move to previous message & C-p or p \\
    move to next message & C-n or n \\
    move to start of buffer & C-$<$ or $<$ \\
    move to end of buffer & C-$>$ or $>$ \\
    move to centre of window & M-. \\
    move to a given line & M-g \\
    & \\
    scroll forward a screen & C-v \\
    scroll backward a screen & M-v \\
    redraw screen with point centred & C-l \\
  \end{tabular}
  \vfill
  
  % Typeout commands
  {\large \textbf{Typeout}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    scroll forward or exit at end & SPC \\
    scroll forward one screen & C-v \\
    scroll backward one screen & M-v \\
    scroll forward one line & C-n \\
    scroll backward one line & C-p \\
    move to start of buffer & C-$<$ or $<$ \\
    move to end of buffer & C-$>$ or $>$ \\
    redraw screen with point centred & C-l \\
    & \\
    search typeout buffer forwards & C-s \\
    search typeout buffer backwards & C-r \\
  \end{tabular}
  \vfill  

  % Minibuffer commands
  {\large \textbf{The Minibuffer}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    move forwards one character & C-f \\
    move backwards one character & C-b \\
    move forwards one word & M-f \\
    move backwards one word & M-b \\
    move to beginning of line & C-a \\
    move to end of line & C-e \\
    & \\
    delete the previous character & DEL \\
    delete the next character & C-d \\
    delete to end of line & C-k \\
    delete the previous word & M-DEL \\
    delete the next word & M-d \\
    transpose chars around point & C-t \\
    & \\
    set the mark & C-SPC \\
    delete the region & C-w \\
    copy region as if killed & M-w \\
    & \\
    Make the next word lower case & M-l \\
    Make the next word upper case & M-u \\
    Make the next word capitalised & M-c \\
    & \\
    Move to the previous history line & C-p \\
    Move to the next history line & C-n \\
    Move to the first history line & M-$<$ \\
    Move to the last history line & M-$>$ \\
    Search history backwards & C-r \\
    Search history forwards & C-s \\
    & \\
    quoted insert a character & C-q \\
    complete the current line & TAB \\
    complete the current word & SPC \\
    show possible completions & ? \\
    finish minibuffer input & RET \\
  \end{tabular}
  \vfill

  % Repeat the header for page 2
  \parbox{2.80in}{\begin{center}
      {\huge \textbf{Af Reference Card}}

      {\small {For Af version 2.0}}
    \end{center}}
  \vfill

  % Basic Message Handling
  {\large \textbf{Handling Messages}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    open and read a message & C-o or RET \\
    display a message via a pager & C-M-o or \\
    & M-RET \\
    show info about a message & C-x = \\
    save a message to a folder & M-+ \\
    print a message & M-p \\
    pipe a message into a command & M-$|$ \\
    edit a message & C-x C-e \\
  \end{tabular}
  \vfill

  % Killing and Yanking
  {\large \textbf{Killing and Yanking}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    kill the current message & C-k \\
    kill the messages in the region & C-w \\
    copy the region as if killed & M-w \\
    kill tagged messages & C-t C-k \\
    copy tagged messages as if killed & C-t w \\
    & \\
    yank the last kill into the buffer & C-y \\
    cycle yanks through kill ring & M-y \\
  \end{tabular}
  \vfill

  % Mark and region commands
  {\large \textbf{Mark \& Region}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    set the mark & C-SPC \\
    swap point and mark & C-x C-x \\
    save messages in region & C-x + \\
    print messages in region & C-x p \\
    pipe messages in region & C-x $|$ \\
  \end{tabular}
  \vfill

  % Tag commands
  {\large \textbf{Tags}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    tag the current message & C-t t \\
    untag the current message & C-t u \\
    show tags on current message & C-t ? \\
    save tagged messages & C-t + \\
    print tagged messages & C-t p \\
    pipe tagged messages & C-t $|$ \\
  \end{tabular}
  \vfill

  % Search commands
  {\large \textbf{Searching}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    search forwards for regex & C-s \\
    search backwards for regex & C-r \\
    search forwards for tag & C-t C-s \\
    search backwards for tag & C-t C-r \\
    tag messages matching regex & C-t s \\
  \end{tabular}
  \vfill

  % Sorting commands
  {\large \textbf{Sorting}}
  \nopagebreak

  \parbox{2.80in}{To sort the messages in the buffer use
    ``M-x sort-buffer''.  Typing ``?'' at the prompt will list the
    sort orders af supports.  You can also use ``M-x sort-region''
    or ``M-x sort-tagset'' to sort the region or tagged messages.}
  \vfill

  % Narrow commands
  {\large \textbf{Narrowing}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    narrow buffer to the region & C-x n \\
    narrow buffer to tagged messages & C-t n \\
    widen the buffer & C-x w \\
  \end{tabular}
  \vfill

  % Folder-handling commands
  {\large \textbf{Folders}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    find a folder & C-x C-f \\
    find a folder read-only & C-x C-r \\
    find an alternate folder & C-x C-v \\
    find folder in other window & C-x 4 b \\
    resynchronise the buffer & C-x r \\
    & \\
    save a buffer to disk & C-x C-s \\
    save some buffers to disk & C-x s \\
    write buffer to a named file & C-x C-w \\
  \end{tabular}
  \vfill

  % Buffer-handling commands
  {\large \textbf{Buffers}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    select another buffer & C-x b \\
    select buffer in other window & C-x 4 b \\
    list the buffers & C-x C-b \\
    kill a buffer & C-x k \\
  \end {tabular}

  % Window-handling commands
  {\large \textbf{Windows}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    split the window in two vertically & C-x 2 \\
    move to another window & C-x o \\
    scroll the other window & C-M-v \\
    delete the selected window & C-x 0 \\
    delete all other windows & C-x 1 \\
    enlarge the selected window & C-x $\wedge$ \\
  \end{tabular}
  \vfill

  % Customisation commands
  {\large \textbf{Customisation}}
  \nopagebreak

  \begin{tabular}{p{2.00in}p{0.80in}}
    start defining a keyboard macro & C-x ( \\
    end a keyboard macro definition & C-x ) \\
    execute the last keyboard macro & C-x e \\
    query the user during a macro & C-x q \\
    & \\
    set a variable & C-x a \\
  \end{tabular}

\end{multicols}
\end{document}                  % End of document
