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.
Unix plateforms2.gunzip whizzytex-1.1.3.tgzThen, the installation can be automatic (default or customized), or manual.
tar -xvf whizztex-1.1.3.tar
cd whizzytex-1.1.3
xdvi a shell-script that erroneously
end with the line xdvi.bin "$@" instead of
exec xdvi.bin "$@". The later is needed to preserve the process
id, so that signals sent to xdvi are correctly received and
handled by xdvi.bin. ./checkconfigBy default, this check is performed by automatic installation below.
whizzytex will be installed in
/usr/local/bin/ and all files will be installed a subdirectory
of /usr/local/share/whizzytex/
but the documentation, which will be installed in
/usr/local/share/doc/whizzytex/.
Moreover, Emacs-lisp code will not be byte-compiled. 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
the Makefile.config (whether it is the default or a modified version)
against the software installed on your machine. 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.umask 022 make installThe first line ensures that you give read and execute permission to all.
Makefile.config, manually.
You may also use either the command
./configureThis command may be passed arguments to customize your installation. Call it with the option
-help to see a list of all options.
By default, the configuration is not interactive. However, you may call it
with option -helpme to have the script do more guessing for you and
prompt for choices if needed.-elc to configure in
order to byte-compiled it.Makefile.config has been produced and before
building other files. These include checking for mandatory bindings (useful
for manual configuration) and for the conformance of initex, latex, and viewers commands to their expected interface.make config.force, which will stamp your Makefile.config
as correct without checking it. Checking compliance to viewers interface
is also bypassed if you you do not have a connection to X. Conversely, you
may force checking manually by typing ./checkconfig.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 FORMAT accordingly in the file
Makefile.config.
For instance, platex could be use the default configuration
INITEX = iniptexThis would be produced directly with the configuration line:
LATEX = platex
FORMAT = platex
BIBTEX = jbibtex
./configure -initex iniptex -latex platex -format latex -bibtex jbibtexIf you wish to run WhizzyTeX with several configurations, you must still choose a default configuration, but you will still be able to call WhizzyTeX with another configuration from Emacs (see Section 3.1.2 below).
~/.whizzytexrc containing, for example, the following lines:
INITEX = iniptexDuring the configuration, you must at least choose one default previewer type among
LATEX = platex
FORMAT = platex
BIBTEX = jbibtex
advi, xdvi, and ps, and at most one default
previewer for each previewer type you chose. You will still be able to call
WhizzyTeX with other previewers from Emacs, via Emacs configuration (see
Section
3.1.1). /usr/local/bin/whizzytexbash in the very first line of the
script, as well as some variables in the manual configuration section of the
script. /usr/local/share/whizzytex/latex/whizzytex.stywget to be
installed). If automatic upgrading does not work, just do it manually.ln -s whizzytex-1.1.3 whizzytex(the manager will then update this link when version changes). Alternatively, you can also use the full name whizzytex-1.1.3 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 the command is understood, 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 (which probably is ~/.emacs if
you are using Emacs):
(autoload 'whizzytex-modeThis asumes that
"whizzytex"
"WhizzyTeX, a minor-mode WYSIWIG environment for LaTeX" t)
whizzytex.el has been installed in your (X)Emacs
load-path. Otherwise, you may either adjust the load-path
appropriately, or replace whizzytex by the full path to the file
whizzytex.el, which depends on your installation and can be
obtained by typing make where in the installation root directory. For
instance, if you are using Emacs, the default location for
whizzytex.el is
/usr/local/share/whizzytex/lisp/whizzytex.el (but it will be different
if you are using XEmacs or a customized installation)..tex. WhizzyTeX also understands .ltx extensions, but gives
priority to the former when it has to guess the extension. Other extensions
are possible but not recommended.
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, whenever the buffer 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 C-w. This will also add a new menu Whizzy in the menu bar call ``the'' menu below. (If you are using the auctex, your may use other configuration key strokes to avoid clashes (see online emacs-help).
C-u C-c C-w). whizzytex-mode is on, the line contain Whizzy.N when
N is a numeric indication of the load in number of buffer changes
between two slices, so the higher, the slower. However, WhizzyTeX is changed
to Whizzy-ERROR when ERROR is either FORMAT, LATEX,
or SLICE, which indicate an error in the format, the full document, or
the slice, in this order. That is, if there is both an error in the format
and the slice, only the FORMAT error will be shown.*filename.tex* (where filename stands for the name of the file
associated with the main buffer in case several files are composing your
document). 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 whizzy-command-name) in the
minibuffer, which of course should fail, but only after the command has been
reached.format log and
if necessary the command with which WhizzyTeX has been launched.
(Once the bug is fixed, you should switch off the debug mode, which may slow
down WhizzyTeX.)(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
If whizzytex fails at lauch time, you may also use the option -trace of file configuration (see Section 3.1.2).trace on trace off
Help entry of the menu by following hyperlinks.
Alternatively, you can type
(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.") 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)-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.
FILE.dvi to FILE.wdvi). This can be used with command
dvicopy so as to expand virtual font, which advi does not understand
yet) -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 -mkslice 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
the slice.whizzy-paragraph to regexp.
slide, section, and
document.
The mode determines the slice of the document being displayed and indirectly
the frequently of slicing. none slices are always included in the file
beeing editing and files that it may include. Thus, when slice delimitors
are not found, the slice default to the whole file. The slice may also be
empty if the cursor is located before \begin{document} or
after \end{document}.
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. Hence it defaults to the file
when the file is a slave, which does not contain \begin{document}. 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 780, 785 <<to<<rec>><<ognize>>additional>> manual.tex
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.reformat when the file is saved.
Files can also be declared as macro-files with
whizzy-macro file configuration keyword (see Section 3.1.2), which argument should then indicate the master file.
Files with .sty extension are by default considered as macro files
and their master file is guessed if possible..aux file of the whole
document. In paragraph mode, cross references and section numbers are
recompiled whenever the buffer itself is saved (manually).
The recompilation of the whole document is off in slide mode.Start-Document whenever possible.
Then, just tell Active-DVI to automatically jump at this location
when it opens/reloads the file (option -html Start-Document).shift-left-mouse or left-mouse), 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.dvicopy
can be used to expand them. See the option -dvicopy in Section 3.1.2. -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. whizzy.sty in the
LATEX path that will be automatically loaded by
WhizzyTeX at the end format building. This file can be be placed in your
macro directory and be used for all documents (you may thus customize
WhizzyTeXitself), or in the current directory
and be used for only some documents.whizzy-customize (that can be set
interactively from the menu) to define a few LATEX commands that will be
inserted at the beginning of each slides. This alone or in combination with
whizzy.sty allows for a per-session rather than per-document
customization. Moreover, the customization may be easily changed in the
middle of a session. For instance, I frequently set this variable to
\large to temporarily enlarge the text.Requires a recent version of Active-DVI (later that the CVS version of 01/11/2003)When used together with Active-DVI, WhizzyTeX can be made much mode powerful. In particular, it is not difficult to lift WhizzyTeX from an incremental viewer to an assistant editor.
\special annotations. When Active-DVI is put in edition mode,
active boxes are drawn on screen and can be move or resized with the mouse.
When the mouse is released, the new size or position is printed
on standard output together with the action to be taken and received by
emacs watching the output.
Emacs has then enough information to adjust some dimensional parameters in
the source buffer. Just after this edition, the new slice is processed and
the new position is displayed. Thanks to the short incremental loop, this
almost appears as if actions where executed by Active-DVI itself.
This dream has now become real...\adviedit[tag]{< options>}{< body>}where < options> is a comma separated list of bindings. according to the keyval package. Each binding is either of the form < field>=< float> where < field> ranges either other letters x, y, h, w, d in lowercase or uppercase, or other unit=< dimension>.
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. This document was translated from LATEX by HEVEA.