<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\IfFileExists{nag.sty}{\RequirePackage[l2tabu,orthodox]{nag}}{}

\documentclass[draft,english]{scrreprt}

\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

\usepackage[ngerman,english]{babel}

\usepackage{fixltx2e}
\usepackage[draft=false]{microtype}
\usepackage{paralist}
\usepackage{color}
\usepackage[draft=false,colorlinks,urlcolor=blue]{hyperref}
\usepackage{svn}
\usepackage{array}
\usepackage{fancyvrb}
\usepackage{dtklogos}

\newcommand*{\file}[1]{\nolinkurl{#1}}
\newcommand*{\func}[1]{\textsf{#1()}}
\newcommand*{\var}[1]{\textsf{#1}}
\newcommand*{\key}[1]{\texttt{#1}}
\newcommand*{\ctrlkey}[1]{\key{\^{}#1}%
  \texorpdfstring{%
    \ifnum`#1=\lccode`#1%
      \PackageWarning{document}{Kleinbuchstaben #1 fuer ctrlkey verwendet}%
    \fi}{}}
\newcommand*{\metakey}{\key{ESC\,}}
\newcommand*{\reskey}{\ctrlkey{C}}
\newcommand*{\subseckey}{}
\newcommand*{\keyseq}[1]{\key{\reskey\subseckey#1}}

\newcommand*{\texstring}[1]{\texttt{#1}}
\newcommand*{\texcmd}[1]{\texstring{\textbackslash{}#1}}

\newcommand*{\editpoint}{\textbullet}

\newcommand*{\help}[1]{\textcolor{green}{help: #1}}
\newcommand*{\todo}[1]{\textcolor{red}{todo: #1}}

\newlength{\mywidth}
\newcommand*{\babelHyphExample}[2]{\settowidth{\mywidth}{#1}%
  \addtolength{\mywidth}{3.65pt}%          width of hyphen sign
  \addtolength{\mywidth}{-\linewidth}%
  \par\noindent\rule{-\mywidth}{.3mm}\hspace{0pt}#2}

\SVN $LastChangedRevision: 189 $
\SVN $LastChangedDate: 2007-08-05 18:57:13 +0200 (So, 05 Aug 2007) $

\begin{document}

\title{JLM---JÃ¶rg's \LaTeX{} Mode}
\author{JÃ¶rg Sommer
  \href{mailto:joerg@alea.gnuu.de}{\nolinkurl{&lt;joerg@alea.gnuu.de&gt;}} }
\date{\SVNDate}
\maketitle

\begin{abstract}
  JLM is an advanced \LaTeX{} mode for Jed. Its aim is to help the user by
  taking over annoying and stupid things they need to be done, like add a
  \texcmd{usepackage} when you add a command or environment from this package
  or put dollar signs around mathematical commands and move the cursor to an
  appropriate point.

  JLM does not think for you. If you want a \texstring{tabular}, but insert an
  \texstring{itemize}, JLM doesn't prevent this. So, you should be familiar
  with \LaTeX{} and know what environments and commands are and where to place
  them in a document---JLM helps writing them.
\end{abstract}

\tableofcontents
% \listoftables
% \listoffigures

\chapter{Installation}
\section{\ldots{} on Unix-like systems}

Obviously, you need Jed. You can download the current version from
\url{http://www.jedsoft.org/jed/download.html}, but it is also part of many
distributions. You need at least version 0.99.18 with SLang~2 support (run
\verb+jed --version+ to check it).

\begin{enumerate}
  \setcounter{enumi}{-1}
 \item Download the archive \file{jjm-rXYZ.tgz}, where XYZ is the version
  usually the highest available, from
  \url{http://www.minet.uni-jena.de/~joergs/}.

 \item Create a directory \file{.jed/} in your home directory, if it doesn't
  exist, and save there the files from the archive. Save in the same directory
  the file \file{x-keydefs.sl} from
  \url{http://jedmodes.sf.net/mode/x-keydefs/}---use
  \url{http://jedmodes.cvs.sourceforge.net/*checkout*/jedmodes/mode/x-keydefs/x-keydefs.sl?view=checkout&amp;revision=HEAD}.

 \item Depending on your system, Jed loads the file \file{~/.jedrc} or
  \file{~/.jed/jed.rc} (on Debian) as your configuration file. You can copy
  the whole file \file{.jed/doc/latex-jed.rc} to this location or copy only
  parts from \file{latex-jed.rc} into your \file{jed.rc}.

  Important are only these lines to tell Jed where he can find JLM and that he
  should use it for files with the extention \file{.tex} or \file{.latex}.
  \begin{Verbatim}[gobble=2,fontsize=\small,frame=lines]
  Jed_Home_Directory = path_concat(getenv("HOME"), ".jed");
  set_jed_library_path(Jed_Home_Directory + "," + get_jed_library_path());
  Jed_Highlight_Cache_Dir = path_concat(Jed_Home_Directory, "dfa");

  add_mode_for_extension("latex", "tex");
  add_mode_for_extension("latex", "latex");
  \end{Verbatim}
  (On Debian the first three lines aren't needed.)
\end{enumerate}

Now you can open a \LaTeX{} file and start using JLM. Have fun.

\section{\ldots{} on Windows}

Obviously, you need Jed. You can download it from
\url{http://www.paneura.com/~dino/wjed.html}.

\begin{enumerate}
  \setcounter{enumi}{-1}
 \item Download the archive \file{jjm-rXYZ.tgz}, where XYZ is the version
  usually the highest available, from
  \url{http://www.minet.uni-jena.de/~joergs/}.

 \item Create a directory \file{C:\Dokumente und
  Einstellungen\USERNAME\Anwendungsdaten\jed} \help{Where are the
  spaces in this URL?} in your home directory, if it doesn't
  exist, and save there the files from the archive. Save in the same directory
  the file \file{x-keydefs.sl} from
  \url{http://jedmodes.sf.net/mode/x-keydefs/}---use
  \url{http://jedmodes.cvs.sourceforge.net/*checkout*/jedmodes/mode/x-keydefs/x-keydefs.sl?view=checkout&amp;revision=HEAD}.

 \item Jed loads the file
  \file{C:\Dokumente und Einstellungen\USERNAME\jed.rc}. \help{Where are the
  spaces in this URL?} You can copy the
  whole file \file{doc/latex-jed.rc} from the archive to this location or copy
  only parts from \file{latex-jed.rc} into your \file{jed.rc}.

  Important are only these lines to tell Jed where he can find JLM and that he
  should use it for files with the extention \file{.tex} or \file{.latex}.
  \begin{Verbatim}[gobble=2,fontsize=\small,frame=lines]
  Jed_Home_Directory = path_concat(getenv("APPDATA"), "jed");
  set_jed_library_path(Jed_Home_Directory + "," + get_jed_library_path());
  Jed_Highlight_Cache_Dir = path_concat(Jed_Home_Directory, "dfa");

  add_mode_for_extension("latex", "tex");
  add_mode_for_extension("latex", "latex");
  \end{Verbatim}
\end{enumerate}

Now you can open a \LaTeX{} file and start using JLM. Have fun.

\chapter{\TeX{} environments---\func{env\_insert}}

\chapter{\texstring{array} like environments}

Environments they are organised in columns \texstring{table},
\texstring{array} or \texstring{cases}.

\chapter{\TeX{} commands---\func{cmd\_insert}}\label{sec:cmds}

The function \func{cmd\_insert} is an important function of the mode. It is
used for inserting \TeX{} commands like \texcmd{LaTeX} or \texcmd{frac}. With
a database (created with \func{cmd\_add}) it decides whether a command is a
math command and how much mandatory arguments it has. If a command must be in
math mode, e.\,g. \texcmd{frac}, it inserts dollar signs \$ around the
command.

The prefix of the command (\func{prefix\_argument}) determines the number of
optional arguments, e.\,g. the exponent of \texcmd{sqrt}.

Many commands are predefined in \file{latex_cmds.sl}.

\todo{packages needed by the command are inserted}

\chapter{Math stuff}
\section{In text formulas \$\ldots\$}\label{sec:dollar}

If a command is inserted via \func{cmd\_insert} and it is known that this is a
math command, it is automaticly placed inside \$\ldots\$. See \autoref{sec:cmds}.

If you insert a dollar sign manually and a backslash is before the editing
point or the dollar sign is a begin of an in text formula, nothing happens. If
the dollar sign is the end of an in text formula, something more happens:
\begin{itemize}
 \item If the variable \var{BLINK} is non-zero the editing point jumps to the
  begin of the text formula for a short period or until the next key is
  pressed.
 \item All open brackets [, \{ and ( in the formula are closed before the
  dollar sign is inserted or all closing brackets in front of the editing
  point matching an open bracket are skipped before the dollar sign is
  inserted. A dollar sign at the point where it should be inserted is skipped
  and nothing is inserted.

  Some examples:
  \begin{itemize}
   \item \$\texcmd{frac}\{1\}\{2\}\editpoint \quad $\rightarrow$\quad
    \$\texcmd{frac}\{1\}\{2\}\$\editpoint
   \item \$\texcmd{frac}\{1\}\{2\editpoint \quad $\rightarrow$\quad
    \$\texcmd{frac}\{1\}\{2\}\$\editpoint
   \item \$(\texcmd{\{}\texcmd{frac}\{1\}\{2\editpoint \quad $\rightarrow$\quad
    \$(\texcmd{\{}\texcmd{frac}\{1\}\{2\}\texcmd{\}})\$\editpoint
   \item \$\texcmd{frac}\{1\}\{2\editpoint\}\$ \quad $\rightarrow$\quad
    \$\texcmd{frac}\{1\}\{2\}\$\editpoint
  \end{itemize}
\end{itemize}

\section{Active characters after math commands}

Some commands defined in \file{latex_cmds.sl} run a hook after insertion. If
you press one of the characters â€œ=-+&lt;&gt;â€ after you inserted one these commands
the editing point is moved before the dollar sign and the character is
inserted there. All greek letters have this hook.

Example: You want to write â€œ$\alpha$ is the upper angle in a triangle and
$\alpha+\beta=\gamma$.â€ Simply type it. Use the math key for the greek
characters, e.\,g. \key{\reskey ma} for \texstring{\$\texcmd{alpha}\$}. After
the first \texcmd{alpha} the editing point is after the dollar sign
(\$\texcmd{alpha}\$\editpoint). There you can type \help{weiterschreiben}.
After the next \texcmd{alpha} you have the same situation. Press the plus sign
and you get this: \$\texcmd{alpha}+\editpoint\$. Type on til the
\texcmd{gamma}. There you must use the right key or use the dollar sign magic
\autoref{sec:dollar}.

\chapter{Folding}
\label{cha:folding}

JLM supports folding.

\begin{table}
  \begin{tabular}{|@{\hspace{1mm}}l}
    \ttfamily
    \texcmd{documentclass\{\ldots{}\}}\\
    \quad%
       \begin{tabular}{|@{\hspace{1mm}}l}
         \texcmd{usepackage\{\ldots{}\}}
       \end{tabular}\\
    \texcmd{begin\{document\}}\\
    \quad%
       \begin{tabular}{|@{\hspace{1mm}}l}
         \ldots{}\\
         \texcmd{begin\{\ldots{}\}}\\
         \quad%
            \begin{tabular}{|@{\hspace{1mm}}l}
              \ldots{}\\
              \texcmd{begin\{\ldots{}\}}\\
              \quad%
                 \begin{tabular}{|@{\hspace{1mm}}l}
                   \ldots{}
                 \end{tabular}\\
              \texcmd{end\{\ldots{}\}}\\
              \ldots{}\\
            \end{tabular}\\
         \texcmd{end\{\ldots{}\}}\\
         \ldots{}\\
         \texcmd{chapter\{\ldots{}\}}\\
         \quad%
            \begin{tabular}{|@{\hspace{1mm}}l}
              \ldots{}\\
              \texcmd{section\{\ldots{}\}}\\
              \quad%
                 \begin{tabular}{|@{\hspace{1mm}}l}
                   \ldots{}\\
                   \texcmd{subsection\{\ldots{}\}}\\
                   \quad%
                      \begin{tabular}{|@{\hspace{1mm}}l}
                        \ldots{}\\
                        \texcmd{subsubsection\{\ldots{}\}}\\
                        \quad%
                           \begin{tabular}{|@{\hspace{1mm}}l}
                             \ldots{}\\
                           \end{tabular}\\
                        \texcmd{subsubsection\{\ldots{}\}}\\
                        \quad%
                           \begin{tabular}{|@{\hspace{1mm}}l}
                             \ldots{}\\
                           \end{tabular}\\
                      \end{tabular}\\
                   \texcmd{subsection\{\ldots{}\}}\\
                   \quad%
                      \begin{tabular}{|@{\hspace{1mm}}l}
                        \ldots{}
                      \end{tabular}
                 \end{tabular}\\
            \end{tabular}\\
         \texcmd{chapter\{\ldots{}\}}
       \end{tabular}\\
    \texcmd{end\{document\}}\\
    \makebox[1em][l]{0}\makebox[1em][l]{|1}\makebox[1em][l]{|2}%
       \makebox[1em][l]{|3}\makebox[1em][l]{|4}\makebox[1em][l]{|5}
  \end{tabular}
\end{table}

\chapter{Babel}
\section{Hyphenation}
Compound words are common in german. But compounding words with a dash
(\texttt{-}) has some drawbacks: You loose automatic hyphenation or get bad
hyphen points; see \autoref{fig:hypen-examples} The package \textsf{babel}
provides commands to circumvent these problems, but they are difficult to type
in---they start with a \texstring{\dq} which is bound to quotation mark function
\todo{add link to this section}---and you must remember that you have to use
them.

JLM takes care of this and replaces the dash by an suitable command. A dash
followed by a dollar sign or alphabetical character starts the functions and
it watches out for alphabetical characters, a slash or a closing brace. So you
can cancel the operation by moving the editing point or enter a number.

The functions counts the characters on the left side and on the right side. If
they are more than an internal set threshold the dash is replaced. If on the
left side are fewer characters than the threshold the dash is replaced by
\texstring{\dq\~} otherwise by \texstring{\dq=}. If a shash or an closing
brace follows the dash, it is replaced by \texttt{\dq\~} and \texttt{\dq\dq}
is written after the slash or brace, respectively.

Some examples:
\begin{itemize}
 \item \texstring{primitiv-rekursiv} becomes \texstring{primitiv\dq=rekursiv}

 \item \texstring{t-produktiv} becomes \texstring{t\dq\~{}produktiv}

 \item \texstring{$\alpha$-Teilchen} becomes \texstring{$\alpha$\dq\~{}Teilchen}

 \item \texstring{Ein-/Ausgabe} becomes \texstring{Ein\dq\~{}/\dq\dq{}Ausgabe}

 \item \texstring{(Haupt-)Aufgabe} becomes \texstring{(Haupt\dq\~{})\dq\dq{}Aufgabe}
\end{itemize}

\begin{figure}
  \centering
  \selectlanguage{ngerman}
  \microtypesetup{protrusion=false} % disable font protrusion, because it
                                    % changes the hyphenation
  \begin{tabular}{*{2}{p{.4\linewidth}@{}|}}
    \multicolumn{1}{c@{}}{\underline{bad hyphenation}}&amp;
    \multicolumn{1}{c@{}}{\underline{good hyphenation}}\\
    % \babelHyphExample{$C$-Vektor}{$C$-Vektorraum}&amp;
    % \babelHyphExample{$C$-Vektor}{$C$"=Vektorraum}\\
    \babelHyphExample{HI}{HI-Virus}&amp;
    \babelHyphExample{HI}{HI"~Virus}\\

    \babelHyphExample{bergauf und }{bergauf und -ab}&amp;
    \babelHyphExample{bergauf und}{bergauf und "~ab}\\

    \babelHyphExample{primitiv-rekur}{primitiv-rekursiv}&amp;
    \babelHyphExample{primitiv-rekur}{primitiv"=rekursiv}\\

    \babelHyphExample{Motor}{Motorrad-Handbuch}&amp;
    \babelHyphExample{Motor}{Motorrad"=Handbuch}\\

    \babelHyphExample{Ein}{Ein-/Ausgabe}&amp;
    \babelHyphExample{Ein/}{Ein"~/""Ausgabe}\\

    \babelHyphExample{(Haupt}{(Haupt-)Stromkreis}&amp;
    \babelHyphExample{(Haupt)}{(Haupt"~)""Stromkreis}
  \end{tabular}
  \microtypesetup{protrusion=true}
  \selectlanguage{english}
  \caption{Examples of good and bad hyphenation of compound words in german
    caused by using a simple dash}
  \label{fig:hypen-examples}
\end{figure}

\chapter{Keys}

% This documentation assumes that the variable
% `_Reserved_Key_Prefix' == "^C".
% This is the default in Jed's "emacs" emulation.
%
% The "CUA" emulation sets it to "^E", so, e.g., a keybinding "^Ce&lt;"
% will become "^Ee&lt;".

\section{Newline with completion}

Some environments are structured internally with special commands like
\texcmd{item} in \texstring{enumerate} or \texcmd{\textbackslash} in
\texstring{tabular}. \func{newline\_with\_completion} (bound to
\key{\reskey-Return} and \key{Shift-Return}) inserts a text before and after
the linebreak.

Like the dollar sign (\autoref{sec:dollar}) it closes open brackets or skipps
closing brackets before it inserts.

Examples:
\begin{verbatim}
\begin{itemize}
 \item a aaâ€¢
 \item $aaaaâ€¢
 \item \texttt{aa aaâ€¢}
 \item \texttt{$aaaâ€¢}
 \item (â€¢)
 \item $(\texttt{aaaaâ€¢})
 \item aaa $aa$ â€¢
\end{itemize}

\begin{gather*}
  \begin{cases}
    aaa&amp; aaaâ€¢
  \end{cases}\\
  aaa aa (a_{â€¢})
\end{gather*}
\end{verbatim}

% % templates - ^CT or ^C^T
% definekey_reserved("menu_select_menu(\"Global.M&amp;ode.&amp;Templates\")", "t", MODE);
% definekey_reserved("menu_select_menu(\"Global.M&amp;ode.&amp;Templates\")", "^T", MODE);

% % packages - ^CP
% definekey_reserved("latex-&gt;pkg_prompt", "p", MODE);

% % array - ^Ca
% definekey_reserved("latex-&gt;array_edit_column_format",      "ae",  MODE);
% definekey_reserved("latex-&gt;array_next_cell",               "a\t", MODE);
% definekey_reserved("latex-&gt;array_next_cell",               "aa",  MODE);
% definekey_reserved("latex-&gt;array_new_cell",                "an",  MODE);
% definekey_reserved("latex-&gt;array_prev_cell",               "ap",  MODE);

\renewcommand*{\subseckey}{e}
\subsection{environments---\keyseq{}}
\begin{center}
  \begin{tabular}{l|cl}
    \multicolumn{1}{c|}{Key}&amp; \multicolumn{1}{c}{Function}&amp;
       \multicolumn{1}{c}{Description}\\
    \hline
    \keyseq{&lt;}&amp; \func{boenv}&amp; goes to the \texcmd{begin} of the environment\\
    \keyseq{c}&amp; \func{env\_close}&amp; goes to the \texcmd{end} of the
       environment\\
    \keyseq{\}}&amp; \func{env\_close}&amp; inserts an \texcmd{end} to close the
       current environment\\
    \keyseq{e}&amp; \func{env\_prompt}&amp; inserts a new environment with
       \texcmd{begin} and \texcmd{end}\\
    \keyseq{Return}&amp; \func{env\_prompt}&amp; inserts a new environment with
       \texcmd{begin} and \texcmd{end}\\
    \keyseq{r}&amp; \func{env\_rename}&amp; renames the current environment\\
    \keyseq{&gt;}&amp; \func{eoenv}&amp; goes to the \texcmd{end} of the environment
  \end{tabular}
\end{center}

\renewcommand*{\subseckey}{d}
\subsection{commands---\keyseq{}}

% definekey_reserved("latex-&gt;cmd_prompt", "d", MODE);

\section{Hot keys for \TeX{} commands}

\renewcommand*{\subseckey}{s}
\subsection{sectioning commands---\keyseq{}}

\begin{center}
  \begin{tabular}{l|l||l|l}
    \multicolumn{1}{c|}{\TeX{} command}&amp; \multicolumn{1}{c||}{Key}&amp;
       \multicolumn{1}{c|}{\TeX{} command}&amp; \multicolumn{1}{c}{Key}\\
    \hline
    \texcmd{appendix}&amp; \keyseq{a}&amp;
       \texcmd{section}&amp; \keyseq{s}\\
    \texcmd{chapter}&amp; \keyseq{c}&amp;
       \texcmd{subsubsection}&amp; \keyseq{b}\\
    \texcmd{minisec}&amp; \keyseq{m}&amp;
       \texcmd{subsection}&amp; \keyseq{u}\\
    \texcmd{paragraph}&amp; \keyseq{g}&amp;
       \texcmd{subparagraph}&amp; \keyseq{h}\\
    \texcmd{part}&amp; \keyseq{p}
  \end{tabular}
\end{center}

\renewcommand*{\subseckey}{f}
\subsection{font commands---\keyseq{}}

\todo{KlÃ¤ren, was \func{font\_cmd} ist. Liegt auf \keyseq{p}}
% definekey_reserved("latex-&gt;font_resize(1)",              "f-", MODE);
% definekey_reserved("latex-&gt;font_resize(0)",              "f+", MODE);

\begin{center}
  \begin{tabular}{l|*{2}{&gt;{\centering\arraybackslash}p{19mm}}||l|*{2}{&gt;{\centering\arraybackslash}p{19mm}}}
    \multicolumn{1}{c|}{\TeX{} cmd.}&amp; in text mode&amp; in mathe mode&amp;
       \multicolumn{1}{c|}{\TeX{} cmd.}&amp; in math mode&amp; everywhere\\
    \hline
    \texcmd{emph}&amp; \multicolumn{2}{c||}{\keyseq{e}}&amp; &amp;&amp;\\
    &amp;&amp;&amp;\texcmd{overline}&amp; \multicolumn{2}{c}{\key{\reskey{}m\_}}\\
    \texcmd{textbf}&amp; \keyseq{b}&amp; ---&amp;\texcmd{mathbf}&amp; \keyseq{b}&amp; \keyseq{B}\\
    &amp;&amp;&amp;\texcmd{mathcal}&amp; \multicolumn{2}{c}{\keyseq{a}/\key{\reskey{}nc}}\\
    \texcmd{textit}&amp; \keyseq{i}&amp; ---&amp;\texcmd{mathit}&amp; \keyseq{i}&amp; \keyseq{I}\\
    &amp;&amp;&amp;\texcmd{mathfrak}&amp; \multicolumn{2}{c}{\keyseq{k}}\\
    \texcmd{textmd}&amp; \multicolumn{2}{c||}{\keyseq{m}}&amp;&amp;&amp;\\
    \texcmd{textnormal}&amp; \keyseq{n}&amp; ---&amp;
       \texcmd{mathnormal}&amp; \keyseq{n}&amp; \keyseq{N}\\
    \texcmd{textrm}&amp; \keyseq{r}&amp; ---&amp;\texcmd{mathrm}&amp; \keyseq{r}&amp; \keyseq{R}\\
    \texcmd{textsc}&amp; \multicolumn{2}{c||}{\keyseq{c}}&amp; &amp;&amp;\\
    \texcmd{textsf}&amp; \keyseq{f}&amp; ---&amp;\texcmd{mathsf}&amp; \keyseq{f}&amp; \keyseq{F}\\
    \texcmd{textsl}&amp; \multicolumn{2}{c||}{\keyseq{s}}&amp; &amp;&amp;\\
    \texcmd{texttt}&amp; \keyseq{t}&amp; ---&amp;\texcmd{mathtt}&amp; \keyseq{t}&amp; \keyseq{T}\\
    \texcmd{textup}&amp; \multicolumn{2}{c||}{\keyseq{u}}&amp; &amp;&amp;\\
    \texcmd{underline}&amp; \keyseq{d}/\keyseq{\_}&amp; ---&amp;
       \texcmd{underbar}&amp; \keyseq{d}/\keyseq{\_}&amp; \keyseq{D}\\
    \texcmd{verb}&amp; \multicolumn{2}{c||}{\keyseq{v}}&amp; &amp;&amp;\\
    \texcmd{text}&amp; \multicolumn{2}{c||}{\keyseq{x}}&amp; &amp;&amp;
  \end{tabular}
\end{center}

\renewcommand*{\subseckey}{m}
\subsection{math commands---\keyseq{} and \key{\reskey{}n}}

\begin{center}
  \begin{tabular}[t]{lc||}
    \TeX{} cmd.&amp; key\\
    \hline
    \texcmd{alpha}&amp;                \keyseq{a}\\
    \texcmd{beta}&amp;                 \keyseq{b}\\
    \texcmd{cap}&amp;                  \keyseq{-}\\
    \texcmd{cdot}&amp;                 \keyseq{.}\\
    \texcmd{chi}&amp;                  \keyseq{c}\\
    \texcmd{colon}&amp;                \keyseq{:}\\
    \texcmd{cos}&amp;                  \keyseq{\ctrlkey{C}}\\
    \texcmd{cup}&amp;                  \keyseq{+}\\
    \texcmd{Delta}&amp;                \keyseq{D}\\
    \texcmd{delta}&amp;                \keyseq{d}\\
    \texcmd{det}&amp;                  \keyseq{\ctrlkey{D}}\\
    \texcmd{downarrow}&amp;            \keyseq{\ctrlkey{N}}/\key{\reskey\textdownarrow}\\
    \texcmd{emptyset}&amp;             \keyseq{0}\\
    \texcmd{epsilon}&amp;              \keyseq{e}\\
    \texcmd{eta}&amp;                  \keyseq{h}\\
    \texcmd{exists}&amp;               \keyseq{E}\\
    \texcmd{exp}&amp;                  \keyseq{\ctrlkey{E}}\\
    \texcmd{forall}&amp;               \keyseq{A}\\
    \texcmd{frac}&amp;                 \key{\reskey{}nf}\\
    \texcmd{frac\{1\}}&amp;            \key{\reskey{}n1}\\
    \texcmd{frac\{1\}\{2\}}&amp;       \key{\reskey{}n2}\\
    \texcmd{frac\{1\}\{3\}}&amp;       \key{\reskey{}n3}\\
    \texcmd{frac\{1\}\{4\}}&amp;       \key{\reskey{}n4}\\
    \texcmd{frac\{1\}\{5\}}&amp;       \key{\reskey{}n5}\\
    \texcmd{frac\{1\}\{6\}}&amp;       \key{\reskey{}n6}\\
    \texcmd{frac\{1\}\{7\}}&amp;       \key{\reskey{}n7}\\
    \texcmd{frac\{1\}\{8\}}&amp;       \key{\reskey{}n8}\\
    \texcmd{frac\{1\}\{9\}}&amp;       \key{\reskey{}n9}\\
    \texcmd{Gamma}&amp;                \keyseq{G}\\
    \texcmd{gamma}&amp;                \keyseq{g}
  \end{tabular}%
  \begin{tabular}[t]{lc||}
    \TeX{} cmd.&amp; key\\
    \hline
    \texcmd{geq}&amp;                  \keyseq{&gt;}\\
    \texcmd{hat}&amp;                  \keyseq{\^}\\
    \texcmd{in}&amp;                   \keyseq{i}\\
    \texcmd{inf}&amp;                  \keyseq{\ctrlkey{\_}}\\
    \texcmd{infty}&amp;                \keyseq{I}/\keyseq{8}\\
    \texcmd{int}&amp;                  \key{\reskey{}ni}\\
    \texcmd{kappa}&amp;                \keyseq{k}\\
    \texcmd{Lambda}&amp;               \keyseq{L}\\
    \texcmd{lambda}&amp;               \keyseq{l}\\
    \texcmd{langle}&amp;               \keyseq{(}\\
    \texcmd{leftarrow}&amp;            \keyseq{\ctrlkey{B}}/\key{\reskey\textleftarrow}\\
    \texcmd{leq}&amp;                  \keyseq{&lt;}\\
    \texcmd{lim}&amp;                  \keyseq{\ctrlkey{L}}\\
    \texcmd{log}&amp;                  \key{\reskey{}nl}\\
    \texcmd{mu}&amp;                   \keyseq{m}\\
    \texcmd{nabla}&amp;                \keyseq{N}\\
    \texcmd{ne}&amp;                   \keyseq{=}\\
    \texcmd{neg}&amp;                  \keyseq{!}\\
    \texcmd{nicefrac}&amp;             \key{\reskey{}nF}\\
    \texcmd{not}&amp;                  \keyseq{/}\\
    \texcmd{nu}&amp;                   \keyseq{n}\\
    \texcmd{oint}&amp;                 \key{\reskey{}no}\\
    \texcmd{Omega}&amp;                \keyseq{O}/\keyseq{W}\\
    \texcmd{omega}&amp;                \keyseq{o}/\keyseq{w}\\
    \texcmd{Phi}&amp;                  \keyseq{V}/\keyseq{F}\\
    \texcmd{phi}&amp;                  \keyseq{f}\\
    \texcmd{Pi}&amp;                   \keyseq{P}\\
    \texcmd{pi}&amp;                   \keyseq{p}\\
    \texcmd{pmod}&amp;                 \key{\reskey{}nm}\\
    \texcmd{prod}&amp;                 \key{\reskey{}np}
  \end{tabular}%
  \begin{tabular}[t]{lc}
    \TeX{} cmd.&amp; key\\
    \hline
    \texcmd{Psi}&amp;                  \keyseq{Y}\\
    \texcmd{psi}&amp;                  \keyseq{y}\\
    \texcmd{rangle}&amp;               \keyseq{)}\\
    \texcmd{rho}&amp;                  \keyseq{r}\\
    \texcmd{rightarrow}&amp;           \keyseq{\ctrlkey{F}}/\key{\reskey\textrightarrow}\\
    \texcmd{setminus}&amp;             \keyseq{\textbackslash{}}\\
    \texcmd{Sigma}&amp;                \keyseq{S}\\
    \texcmd{sigma}&amp;                \keyseq{s}\\
    \texcmd{sin}&amp;                  \keyseq{\ctrlkey{S}}\\
    \texcmd{sqrt}&amp;                 \key{\reskey{}nq}\\
    \texcmd{subset}&amp;               \keyseq{\{}\\
    \texcmd{subseteq}&amp;             \keyseq{[}\\
    \texcmd{sum}&amp;                  \key{\reskey{}ns}\\
    \texcmd{sup}&amp;                  \keyseq{\ctrlkey{\^}}\\
    \texcmd{supset}&amp;               \keyseq{\}}\\
    \texcmd{supseteq}&amp;             \keyseq{]}\\
    \texcmd{tan}&amp;                  \keyseq{\ctrlkey{T}}\\
    \texcmd{tau}&amp;                  \keyseq{t}\\
    \texcmd{Theta}&amp;                \keyseq{Q}\\
    \texcmd{theta}&amp;                \keyseq{q}\\
    \texcmd{tilde}&amp;                \keyseq{\~}\\
    \texcmd{times}&amp;                \keyseq{*}\\
    \texcmd{uparrow}&amp;              \keyseq{\ctrlkey{P}}/\key{\reskey\textuparrow}\\
    \texcmd{Upsilon}&amp;              \keyseq{U}\\
    \texcmd{upsilon}&amp;              \keyseq{u}\\
    \texcmd{vee}&amp;                  \keyseq{|}/\keyseq{v}\\
    \texcmd{wedge}&amp;                \keyseq{\&amp;}\\
    \texcmd{Xi}&amp;                   \keyseq{X}\\
    \texcmd{xi}&amp;                   \keyseq{x}\\
    \texcmd{zeta}&amp;                 \keyseq{z}
  \end{tabular}
\end{center}

\renewcommand*{\subseckey}{l}
\subsection{links---\keyseq{}}

% definekey_reserved("latex-&gt;label_insert_at_mark", "lm", MODE);
% definekey_reserved("latex-&gt;label_ref", "lr", MODE);

\begin{center}
  \begin{tabular}{lc}
    \TeX{} cmd.&amp; key\\
    \hline
    \texcmd{cite}&amp; \keyseq{b}\\
    \texcmd{index}&amp; \key{\reskey{}ii}\\
    \texcmd{label}&amp; \keyseq{l}\\
    \texcmd{nocite}&amp; \keyseq{n}\\
    \texcmd{pageref}&amp; \keyseq{p}\\
    \texcmd{url}&amp; \keyseq{u}
  \end{tabular}
\end{center}

\renewcommand*{\subseckey}{o}
\subsection{folding---\keyseq{} and \key{return}}

\begin{itemize}
 \item With the keysequence \keyseq{o} you can fold a region. You can use
  \key{\metakey1}, \ldots{}, \key{\metakey8} to set the level relative from
  the current that gets folded. With \key{\metakey9} you get a prompt where
  you can enter an arbitrary level, e.\,g. -2 to fold the level 2nd levels
  upstairs.

 \item With the keysequence \keyseq{u} you can unfold a folded region. You
  can use it from within the region or at the begin (before the three dots).

  With a prefix argument (set with \key{\metakey1}, \ldots{},
  \key{\metakey9}) you can set the sublevel that should not be unfolded.

 \item The \key{return} key is redefined to unfold a region, if it is inside
  or before---looking at the three dots---a folded region. Otherwise it acts
  like everywhere else.
\end{itemize}

For the definition of levels see \autoref{cha:folding}.

\section{Mathematical arrows}

If you â€œdrawâ€ an arrow it becomes substitured with an corresponding math
command. The command is inserted with \func{cmd\_insert} (\autoref{sec:cmds})
so you have all comforts of \func{cmd\_insert}.

\begin{center}
  \begin{tabular}{lc||lc}
    Input&amp; Substitution&amp; Input&amp; Substitution\\
    \hline
    \key{-&gt;}&amp; \texcmd{rightarrow}&amp; \key{-{}-&gt;}&amp; \texcmd{longrightarrow}\\
    \key{&lt;-}&amp; \texcmd{leftarrow}$^{*}$&amp; \key{&lt;-{}-}&amp; \texcmd{longleftarrow}$^{*}$\\
    \key{&lt;-&gt;}&amp; \texcmd{leftrightarrow}&amp; \key{&lt;-{}-&gt;}&amp; \texcmd{longleftrightarrow}\\
    \key{=&gt;}&amp; \texcmd{Rightarrow}&amp; \key{==&gt;}&amp; \texcmd{Longrightarrow}\\
    \key{&lt;=}&amp; \texcmd{Leftarrow}$^{*}$&amp; \key{&lt;==}&amp; \texcmd{Longleftarrow}$^{*}$\\
    \key{&lt;=&gt;}&amp; \texcmd{Leftrightarrow}&amp; \key{&lt;==&gt;}&amp; \texcmd{Longleftrightarrow}\\
    \key{|-&gt;}&amp; \texcmd{mapsto}&amp; \key{|-{}-&gt;}&amp; \texcmd{longmapsto}\\
    \key{&gt;&gt;}&amp; \texcmd{gg}&amp; \key{&lt;&lt;}&amp; \texcmd{ll}\\
    \key{`-&gt;}&amp; \texcmd{hookrightarrow}&amp; &amp;
  \end{tabular}
\end{center}

Some of the input sequences---marked with $*$ in the table---become not
substitured immediately, because it's unclear if anything, e.g. a second
\key{-} or \key{&gt;}, follows. They are substitured after the next key press.
So don't be confused and write on as if the substitution happend.

Sometimes these substitutions aren't intented. The character that actives the
substitution is not alway the last character. The emacs mode of Jed offers two
possibilities to work around this substition: \ctrlkey{Q} to insert one
character without showing it to the substition function and \key{\ctrlkey{X}q}
to insert a string.

\section{Mathematical sub- and superscripts}

The keys \key{\_} and \key{\^} are automaticly surround the word (all
alphanumeric characters and a possible \texcmd{} at the begin) before the
editing point with \$, if it is not still in math mode. If the word is a
\TeX{} command it is tried to find a completion from former usages of the
command. This is very helpful when you write equations with
\begin{center}
  \texstring{\texcmd{sum}\_\{foo\}\^{}\{bar\} 12+2 =
    \texcmd{sum}\_\{foo\}\^{}\{bar\} 10+4}
\end{center}
If you don't want the completion type in what you want. If you accept the
completion than hit \key{Enter} or \key{Return}. If there is also a completion
for the counterpar, it is also presented and you can accept it with
\key{Enter} or \key{Return} or you type what you want. The visible mark shows
you which part is offered and becomes removed if you don't accept.

If you started in text mode, the editing point is placed after accepted
completion in text mode. This is helpful when you write things like
\begin{center}
  \texstring{First, we look at \$\texcmd{alpha}\_\{i\}\$. The formula becomes\\
    the truth true, iff \$\texcmd{alpha}\_\{i\}\$ is even.}
\end{center}
Than you don't have to skip the dollar sign after the subscript was completed.

The sub- and superscript function treats some \TeX{} commands specially. An
sub- or superscript for an \texcmd{rightarrow} changes the command to
\texcmd{xrightarrow} from \AMS{}math. The commands \texcmd{cup}, \texcmd{cap},
\texcmd{vee} and \texcmd{wedge} become \texcmd{bigcup}, \texcmd{bigcap},
\texcmd{bigvee} and \texcmd{bigwedge}, respectively.

\end{document}

% breaks - ^CK
definekey_reserved("latex-&gt;cmd_insert(\"newline\");newline()", "kl", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"newline\");newline()", "^K^L", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"linebreak[1]\");newline()", "kb", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"linebreak[1]\");newline()", "^K^B", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"newpage\");newline()", "kp", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"newpage\");newline()", "^K^P", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"clearpage\");newline()", "kc", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"clearpage\");newline()", "^K^C", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"cleardoublepage\");newline()", "kd", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"cleardoublepage\");newline()", "^K^D", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"pagebreak\");newline()", "kr", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"pagebreak\");newline()", "^K^R", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"nolinebreak[1]\");newline()", "kn", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"nolinebreak[1]\");newline()", "^K^N", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"nopagebreak\");newline()", "ko", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"nopagebreak\");newline()", "^K^O", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"enlargethispage\")", "ke", MODE);
definekey_reserved("latex-&gt;cmd_insert(\"enlargethispage\")", "^K^E", MODE);

% misc
definekey("latex-&gt;insert_quote", "\"", MODE);
definekey("latex-&gt;insert_quote", "`",  MODE);
definekey("latex-&gt;insert_dollar", "$",  MODE);
definekey("latex-&gt;dots", ".",  MODE);

foreach $1 ([" ", ",", "~"])
  definekey_textormath("latex-&gt;insert_without_spaces", "self_insert_cmd",
                       $1, MODE);

definekey_textormath("self_insert_cmd", "latex-&gt;cmd_insert(\"colon\")",
                     ":", MODE);
definekey_textormath("self_insert_cmd", "latex-&gt;math_right_parenthesis",
                     ")", MODE);
definekey_textormath("self_insert_cmd", "latex-&gt;math_right_parenthesis",
                     "]", MODE);
definekey("latex-&gt;insert_limits_char()", "^", MODE);
definekey("latex-&gt;insert_limits_char()", "_", MODE);
definekey("latex-&gt;newline_with_completion", Key_Shift_Return, MODE);
definekey_reserved("latex-&gt;newline_with_completion", Key_Return, MODE);

% special characters
definekey_reserved(" \\$", "$", MODE);
definekey_reserved(" \\&amp;", "&amp;", MODE);
definekey_reserved(" \\%", "%", MODE);
definekey_reserved(" \\_", "_", MODE);
definekey_reserved(" \\#", "#", MODE);
definekey_reserved(" \\{", "(", MODE);
definekey_reserved(" \\}", ")", MODE);
definekey_reserved(" \\textless{}", "&lt;", MODE);
definekey_reserved(" \\textgreater{}", "&gt;", MODE);
definekey_reserved(" \\textbackslash{}", "\\", MODE);
definekey_reserved(" \\textbar{}", "|", MODE);
definekey_reserved(" \\textasciicircum{}", "^", MODE);
definekey_reserved(" \\textasciitilde{}", "~", MODE);

% stuff from latex_external - ^C r
definekey_reserved("latex_external-&gt;select_master_file",    "ra", MODE);
definekey_reserved("latex_external-&gt;bibtex",                "rb", MODE);
definekey_reserved("latex_external-&gt;clearup",               "rc", MODE);
definekey_reserved("latex_external-&gt;makeindex",             "ri", MODE);
definekey_reserved("latex_external-&gt;mrproper",              "rm", MODE);
definekey_reserved("latex_external-&gt;cust_view",             "ro", MODE);

% often used stuff from latex_external
definekey_reserved("latex_external-&gt;compose",               "c", MODE);
definekey_reserved("latex_external-&gt;compose",               "^C", MODE);
definekey_reserved("latex_external-&gt;view",                  "v", MODE);
definekey_reserved("latex_external-&gt;view",                  "^V", MODE);
definekey_reserved("latex_external-&gt;pop_log_file",          "y", MODE);
definekey_reserved("latex_external-&gt;pop_log_file",          "^y", MODE);

% help
definekey_reserved("latex-&gt;texdoc_help()",                  "ht", MODE);
definekey_reserved("latex-&gt;texdoc_search()",                "hT", MODE);
definekey_reserved("latex-&gt;texdoc_search()",                "^h^T", MODE);
definekey_reserved("()=system(\"texdoc symbols-a4 &amp;\")",    "hs", MODE);
definekey_reserved("()=system(\"texdoc symbols-a4 &amp;\")",    "^h^S", MODE);

definekey_reserved("latex-&gt;indent_region",                  "q", MODE);

\end{document}
</pre></body></html>