DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T

⟦037de0eeb⟧ TextFile

    Length: 4977 (0x1371)
    Types: TextFile
    Names: »TeX-mode.doc«

Derivation

└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦c319c2751⟧ »unix3.0/TeX3.0.tar.Z« 
        └─⟦036c765ac⟧ 
            └─⟦this⟧ »TeX3.0/TeXcontrib/trickey/emacsmacro/TeX-mode.doc« 
└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89
    └─⟦this⟧ »./tex82/TeXcontrib/trickey/emacsmacro/TeX-mode.doc« 
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦63303ae94⟧ »unix3.14/TeX3.14.tar.Z« 
        └─⟦c58930e5c⟧ 
            └─⟦this⟧ »TeX3.14/TeXcontrib/trickey/emacsmacro/TeX-mode.doc« 

TextFile

The TeX Library is for editing files which contain formatting information
for Knuth's TeX (Tau Epsilon Chi) text formatting system. This documentation
will assume the reader is already familiar with TeX.

* Menu:

* TeX Mode::	An introduction to TeX Mode
* Dollar::	Notes on TeX Mode's flashing dollarsign
* Quotes::	Notes on ``quote'' marks for TeX
* Utility::	Other useful extended commands available in the TeX Library


********
TeX Mode
********

The Emacs syntax table is set up in a useful way for editing TeX code.

{ ... }	Typing a close-brace will flash the brace which it matches. 

\	Backslash will `quote' the syntax of the character which follows 
	it. As a result, Emacs will be able to recognize that objects like
	{...\{...} are balanced, and paren-balancing commands will work.
	That is, "ESC-X forward-paren" will go forward over balanced TeX
	braces. "ESC-X backward-paren" will go backward, etc.

$	Typing a dollarsign runs a macro which scans backward and tries to
	determine if the $ begins or ends a TeX math mode field. If more than
	two $'s appear together, Emacs will beep at you. If the $ typed begins
	a field, there is no effect. If, however, the $ is the end of a math
	mode field, TeX mode will move the cursor to flash the $ or $$ which
	begins the field. See *Dollar below.

ESC-j	ESC-j is bound to the justify-paragraph command.


******
Dollar
******

TeX mode offers ``flashing'' dollarsigns (like the flashing parens available
for Lisp Mode). 

TeX mode's dollarsigns may be very slow at times in long files. This is
because every time you type a dollarsign, it must scan outward looking for
the first preceding { or for the beginning of the file if not in a {. Once
having scanned back for that point, it moves forward, counting $'s and $$'s
to see if you are entering or exiting a mathmode field. Hence, if you have
typed { ... $  it won't have to scan back far to find the { and so will be
quite fast. If you type a $ at toplevel, you may have to wait a long time
for it to return. Typing C-Q $ is one way to locally get around this
problem, or C-G may be typed if you realize that you're hanging waiting for
it to return from the backward scan of a long file. However, the recommended
approach is to type ESC-$ (ESC-dollarsign) at intervals in the file where
you *know* the dollarsigns should be balanced. This checks to make sure the
dollarsigns are balanced and, if they are, inserts a special marker in the
file on a line by itself (the marker looks like "%emacs-mathOK").  This
marker says to TeX mode, ``You may assume that all $'s prior to this point
are correctly balanced.'' Experience has shown that flashing $'s, in
conjunction with judicious use of the markers inserted by ESC-$ can make
TeX's hard-to-read syntax quite livable.

Although flashing dollarsigns are on by default, they can be disabled if
they are found undesirable. To do so, put the command

	(declare-global TeX-inhibit-$)

in your Emacs init file. If you are already in TeX Mode, you should execute
the command "ESC-X local-bind-to-key self-insert $".


******
Quotes
******

Users of TeX are encouraged to use ``...'' rather than "..." to delimit
quoted text -- it makes the output look far nicer. There exists a macro
which the user can put on the " key to make it expand into either `` or ''
as appropriate from context. Just typing `` and '' is not really hard, but
especially as a novice, it's easy to forget to do. This feature is not
on by default, but can be turned on by putting

	(declare-global TeX-expand-quote)

in your Emacs init file. If you are already in TeX Mode, you should execute
the command `ESC-X local-bind-to-key TeX-double-quote "'.


*******
Utility
*******

This node offers descriptions of the extended commands which come with the
TeX library, in addition to ESC-X TeX-mode ...

ESC-X setup-indented-TeX-display

  This macro will take a normally indented expression in a variable
  width region and set it up so that it will be output aligned similarly
  by TeX. *Only* the beginnings of lines will line up right. Example:
  The region must be placed around the area that is to be set up.
  This macro is primarily for setting up indented Lisp code in a variable
  width font. Requires a \noflash macro to be defined 
  (see ESC-X insert-TeX-aux-macros below)

ESC-X unsetup-indented-TeX-display

  This macro will convert a region of the buffer which has had
  ESC-X setup-indented-TeX-display run across it and turn it back into
  normally indented text. The cursor may be placed generally anywhere
  touching the \vbox{...} which is to be converted back.

ESC-X insert-TeX-aux-macros

  Inserts macro definition for \noflash macro used by the output of
  ESC-X setup-indented-TeX-display. If the \noflash macro is found to be
  of general use to the TeX community, it may be moved into one of the
  TeX libraries, but for now you'll have to manually include its definition
  by running this macro at the top of your file.