Abstract: WhizzyTeX is an Emacs minor mode for incrementally viewing LATEX documents that you are editing. It works under Unix with gv and xdvi viewers, but the Active-DVI viewer will provide much better visual effects and offer more functionalities.
gunzip whizzytex-1.00ii.tgzThen, the installation can be automatic (default or customized), or manual.
tar -xvf whizztex-1.00ii.tar
cd whizzytex-1.00ii
/usr/local/lib/whizzytex/
and Emacs-lisp code will not be
byte-compiled. Then, just type:
make allThis will create a
Makefile.config
file (only if nonexistent) by
taking a copy of the template Makefile.config.in
. This will also check
that the Makefile.config
(whether it is the default or a modified
version) makes sense. If you wish to change the default configuration, or if
your configuration is rejected, see ``Customizing the installation''
below. This will also prepared configured versions of the
files for installation.make installSee Using WhizzyTeX (Section 2) to test your installation.
Makefile.config
, manually.
You may also use the command
make configfor semi-automatic editions. This will test your system configuration and choose default values accordingly and prompt for confirmation or when a decision need to be taken. Of course, you can combine both, doing manual corrections at the end.
Makefile.config
before building other files.
This includes checking for mandatory bindings and for the conformance of
latex and viewers commands to their expected interface.
The later is done by simulating the core of a small WhizzyTeX session:
a small file is created, a specialed version of latex format is build for
that file, and used to run LATEX on on the file; finally, all
declared viewers are tested on the DVI output, which open
windows, temporarily. make config.force
, which will stamp your Makefile.config
as correct without checking it.latex
is the command name used to call LATEX,
initex
, the command name used to build a new format, and that the latex
predefined format is latex
.INITEX
,
LATEX
, and LATEXFMT
accordingly in the file
Makefile.config
.
For instance, platex
could be use the default configuration
INITEX = iniptexIf you wish to run WhizzyTeX with several configuration, you must choose a default configuration, but you will be able to call WhizzyTeX with another configuration from emacs (see Section 3.1 below).
LATEX = platex
LATEXFMT = platex
/usr/local/lib/whizzytex/bin/whizzytex
/usr/local/lib/whizzytex/latex/whizzytex.sty
wget
installed).
If automatic upgrading does not work, just do it manually.ln -s whizzytex-1.00ii whizzytex(which will be maintained as a link the current version by the manager). Alternatively, you can use whizzytex-1.00ii in place of whizzytex below. The main commands are:
make -f whizzytex/Manager upgradeThe command
make -f whizzytex/Manager install
upgrade
will successively download the newest version,
unpack it, copy the configuration of the current version to the newest
version, and bring the newest version up-to-date. The command install
will install files of the newest version. make VERSION=<version> download downgrade install
ESC x whizzytex-mode RETIf this works, skip this section. Otherwise, you should first load the library
whizzytex.el
or, better,
declare it autoload. To do this permanently, include the following
declaration in your Emacs startup file (probably is ~/.emacs
).
(autoload 'whizzytex-mode(where
"/usr/local/lib/whizzytex/lisp/whizzytex.el"
"WhizzyTeX, a minor-mode WYSIWIG environment for LaTeX" t)
/usr/local/bin/whizzytex/lisp/whizzytex.el
is the
exact location of whizzytex.el
, which depends on your installation.)
If whizzytex.el
in your (X)Emacs load-path, or if you have
adjusted this variable appropriately, you can simply write:
(autoload 'whizzytex-mode "whizzytex"
"WhizzyTeX, a minor-mode WYSIWIG environment for LaTeX" t)
.tex
.
WhizzyTeX also understands .ltx
extensions, but gives priority to the
former when it has to guess the extension. Other extensions are not possible.
The file attached to the buffer must exists and either be a well-formed
LATEX source file, or be mastered, i.e. loaded by another
LATEX source file. Thus, when the buffer is does not look well-formed (it
does not contain a \begin{document}
command), WhizzyTeX will search
for its master file, asking the user if need be, so as to first launch
itself on a buffer visiting the master file. In particular, an empty buffer
will be considered as beeing mastered, which may not be what you intend.
To start WhizzyTeX on either kind of buffer, type:
ESC x whizzytex-mode RETBy default, this should add new bindings so that you can later turn mode on and off with key strokes C-c w. This will also add a new menu Whizzy in the menu bar call ``the'' menu below.
C-u C-c w
). *filename.tex*
(where filename
stands for the name of the file
associated with the main buffer in case several files are composing your
document). (point-min)
and (mark)
to be
erased automatically (as long as the buffer is visible). ESC X toggle-debug-on-error
to get help from Emacs, and try to fix
the problem. whizzytex-command-name
is erroneous (maybe you need to give the full
path). Try to evaluate (shell-command whizzytex-command-name)
in the
minibuffer, which of course should fail, but only after the command has been
reached.(whizzy-get whizzytex-view-mode)
.*Messages*
buffer). You may also check for the presence
(and content) of the slice by visiting
_whizzy_filename.tex
or
If neither file exists, it means that Emacs did not succeed to slice, which you may force by evaluating_whizzy_filename/input/_whizzy_name.new
(whizzy-observe-changes t)
.
This can be run in even if whizzytex-mode is suspended, which may
avoid automatic processing of slices, and their erasure.and see if it succeeds.latex '&_whizzy_filename' _whizzy_filename.tex
FMT
until the
error is fixed. See the interaction buffer or select format
from the
log...
menu entry).reformat
command
in the interaction buffer. You can also turn whizzytex debug mode on and off by typing either line in the interaction window:ESC x toggle-debug-on-error RET
debug on debug off
Help
entry of the menu by following hyperlinks, we keep this section
to a minimal, so as to avoid redundancy. (In XEmacs, you may need to useESC x describe-function RET whizzytex-mode RET
instead ofESC x hyper-describe-function RET whizzytex-mode RET
describe-function
to see hyper-links.)whizzy-default-bindings
and
whizzytex-mode-hook
for list of bindings.whizzytex-mode
lists all user-configurable
variables, which may be given default values in your Emacs startup file
to be used instead of WhizzyTeX own default values. ^%; +
''
followed by a configuration keyword. If two configuration lines have the same
keyword, only the first one is considered. The argument of a configuration
line is the rest of the line stripped of its white space."
) are
stripped off, so that "foo.tex"
and foo.tex
are equivalent.-advi
, -xdvi
, or -ps
(see section 3.3)mv
is simply used.make
can itself be used as a preprocessor (with an
appropriate Makefile
). However, one may have to work around
make
's notion of time (using FORCE), which is usually too rough.
This is safe, since WhizzyTeX tests itself for needed recompilations.Makefile.config
(or whizzytex
)Makefile.config
(or whizzytex
)Makefile.config
(or whizzytex
).
This can either be used in combination with -latex
and -initex
,
or alone. For instance,
hugelatex
could be used (depending on your LATEX configuration) to
build a larger format to process huge files.-advi
previewers, both views communicate with Emacs and can be
used to navigate through source buffers and positions.
%; whizzy subsection -dvi "xdvi -s 3"It tells whizzytex to run in subsection slicing mode and use a
dvi
style viewer called with the command
xdvi -s 3
. This is also equivalent to
%; whizzy subsection -dvi xdvi -s 3since Emacs removes outer double-quotes in option arguments.
%; whizzy -pre make -initex iniptex -latex platex -fmt platexIt tells WhizzyTeX to use
iniptex
and platex
comands instead
of initex
and latex
and to use the format file platex.fmt
instead of latex.fmt
. Moreover, it should use make
to preprocess
files.whizzy-paragraph
to regexp.
slide
, section
, and document
.
The mode determines the slice of the document being displayed and how
frequently updates occurs.
slide
is mainly used for documents of the class seminar.
In slide mode, the slide is the text between two \begin {slide}
comments (thus, the text between two slides is displayed after the
preceding slide). \overlay {
n}
occurs on the left of the point, on the same line
(if several commands are on the same line, the
right-most one is taken), in which case only layers p £ n are displayed.section
mode, the slice of text is the current chapter, section.section
but also slice at subsections. paragraph
mode is a variation on section mode where, the separator
whizzy-paragraph
is defined by the user (set to two empty lines by
default) instead of using \section
and \subsection
commands.
subsection.document
take the region between \begin{document}
and \end
{document}
as the slice. none
slicing mode, there is no sectioning unit at all and
the whole document is recompiled altogether.
Currently, pages are not turned to point and the
cursor is not shown in document
mode, because full documents are not
sliced. (A slicing document mode could be obtained by working in paragraph
mode, with an appropriate regexp.)whizzy-viewers
.viewer
to the
call previewer, and want to use viewer
as the previewer, you should
arrange for viewer
to understand these signals (and forward them to the
previewer). The simplest way is to hand your script with an exec command
calling the gv
, dvi
or advi
.\special
commands, in particular
source line information of the form:
#line 610, 615 <<recog>><<nizes>> manual
dvi
or postscript file will be appended to the previewer
command.whizzy-load-factor
that control a variable of the same name, which can
be used to adjust the responsiveness (by increasing or decreasing the
load-factor). This simply adds extra delays between slicing. \begin{document}
), it
suffices to save the current file..aux
file of the whole
document. In paragraph mode, cross references and section numbers are
recompiled whenever the buffer itself is saved (manually).
This recompilation operates in batch and concurrently with the recompilation
of slices, so it may take several slices before the new counters or
references are adjusted.Start-Document
whenever possible.
Then, just tell Active-Dvi
to automatically jump at this location
when it opens/reloads the file. Active-Dvi
can dump source file positions on clicks,
when available, that is forwarded to Emacs so that it can move to the
corresponding line.-advi
should be used instead of
-dvi
. This will produce extra information (such as source line
numbers) using \special
that most DVI previewers do not recognize
and may complain about.-dvi
or -ps
. In particular, your previewer should
accept SIGUSR1
(for -dvi
) signal or SIGHUP
(for -ps
)
signal and respond by reloading the file.acroread
to reload its file in batch. post-command-hook
to make Emacs watch
changes. It uses buffer-modified-tick
to tell if any editing has
actually occurred, and compare the point position with the (remembered)
position of the region being displayed to see if saving should occur. It
uses sit-for
to delay slicing until at least the time of slice
computation has ellapsed since last saving, a significant number of editing
changes has occurred, or iddleness.\documentclass
which in turn
redefines \document
to execute \dump
(after redefining
\document
to its old value and \documentclass
so that it skips
everything till \document
). This is robust ---and seems
to work with rather complex macros. whizzy.sty
, which if existing is loaded at the end of the macros.
This may be used to add other macros in whizzy mode, e.g.
some TeX environments may be redefined to changed they type setting,
according to whether the current line is inside or outside the environment.
(We have written such an extension for an exercise package that sends the
answers at the end in an appendix, unless the cursor is inside the answer,
in which case the answer is in-lined.)*TeX-shell*
buffer from which
Emacs has been WhizzyTeX, so that Emacs can report the error. \special
annotations preceeding boxes.
Active boxes would be autoraise on focus and could be moved or resized with
the mouse. Rather than displaying actions on screen, which would be unaware
of TeX position stategies, actions should rather be reported in stdout,
as is already done for positions. This document was translated from LATEX by HEVEA.