Initial commit

This commit is contained in:
Mateus Pinto Rodrigues
2017-11-11 15:15:10 -02:00
commit 58c3bd6728
1202 changed files with 434097 additions and 0 deletions

34
elpa/auctex-11.91.0/doc/.gitignore vendored Normal file
View File

@@ -0,0 +1,34 @@
*.aux
*.cp
*.cps
*.dvi
*.fn
*.fns
*.ky
*.kys
*.log
*.pg
*.pgs
*.toc
*.tp
*.vr
*.vrs
*.tmp
*.ps
*.pdf
*.info
*.info-*
Makefile
CHANGES
HISTORY
INSTALL
INSTALL.windows
README
TODO
FAQ
auctex*.html
version.texi
preview-dtxdoc.texi
preview-latex
preview-latex.tmp
auto

View File

@@ -0,0 +1,224 @@
# Makefile for AUCTeX
# Maintainer: auctex-devel@gnu.org
# Copyright (C) 2003-2008, 2013-2015 Free Software Foundation, Inc.
# This file is part of AUCTeX.
# AUCTeX 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 3, or (at your option)
# any later version.
# AUCTeX 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 AUCTeX; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
prefix=@prefix@$(null)
datarootdir=@datarootdir@$(null)
datadir=@datadir@$(null)
packagedir=@packagedir@$(null)
infodir=@infodir@$(null)
docdir=@docdir@$(null)
TEX=@TEX@
PDFTEX=@PDFTEX@
MAKEINFO=@MAKEINFO@
MAKEINFO_PLAIN=-D rawfile --no-headers
INSTALL_INFO=@INSTALL_INFO@
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@
DESTDIR=
# If `texi2html' is not available, use `makeinfo' when possible. Set the ToC
# file accordingly. Actually, makeinfo >= 5 is needed, but we don't check the
# version.
ifneq (@TEXI2HTML@,:)
TEXI2HTML=@TEXI2HTML@
TEXI2HTML_TOC=auctex_toc.html
else
ifneq (@MAKEINFO@,:)
TEXI2HTML=@MAKEINFO@ --html
TEXI2HTML_TOC=index.html
else
TEXI2HTML=@TEXI2HTML@
TEXI2HTML_TOC=auctex_toc.html
endif
endif
TEXI2DVI=@TEXI2DVI@
TEXI2PDF=@TEXI2PDF@
MKINSTALLDIRS = ../mkinstalldirs
DVIPS=@DVIPS@
PERL=@PERL@
AUCTEXDATE=@AUCTEXDATE@
AUCTEXVERSION=@AUCTEXVERSION@
PACKAGE_TARNAME=@PACKAGE_TARNAME@
AUCTEXTEXIFILES = auctex.texi install.texi wininstall.texi intro.texi \
changes.texi todo.texi faq.texi macros.texi quickstart.texi \
fdl.texi version.texi
PREVIEWTEXIFILES = copying.texi preview-faq.texi macros.texi \
preview-dtxdoc.texi preview-latex.texi preview-problems.texi \
preview-readme.texi preview-todo.texi version.texi
DISTTEXTS = ../README ../INSTALL ../TODO ../INSTALL.windows ../FAQ ../CHANGES \
../PROBLEMS.preview
all: dist
info: auctex.info preview-latex.info
dvi: auctex.dvi tex-ref.dvi preview-latex.dvi
install: install-auctex install-preview
install-man:
test x$(packagedir) != xno && \
{ $(MKINSTALLDIRS) $(DESTDIR)$(packagedir)/man/auctex ; \
for i in $(AUCTEXTEXIFILES) $(PREVIEWTEXIFILES) tex-ref.tex ; \
do echo $(INSTALL_DATA) $$i $(DESTDIR)$(packagedir)/man/auctex; \
$(INSTALL_DATA) $$i $(DESTDIR)$(packagedir)/man/auctex; \
done ; \
}
dist: $(DISTTEXTS) preview-latex.info auctex.info tex-ref.pdf
extradist: html/$(TEXI2HTML_TOC) auctex.ps auctex.pdf tex-ref.ps tex-ref.pdf
.PHONY: all info dvi dist install-auctex disttexts clean distclean \
maintainer-clean install-preview install-man uninstall html-docs \
extradist
# AUCTeX
html/$(TEXI2HTML_TOC): auctex.texi
rm -rf html
mkdir html
cd html && $(TEXI2HTML) --split=node -I .. ../auctex.texi && \
test ! -d auctex || { mv auctex/* . && rm -rf auctex ; }
tex-ref.dvi: tex-ref.tex
$(TEX) tex-ref
tex-ref.ps: tex-ref.dvi
$(DVIPS) tex-ref.dvi -Ppdf -o tex-ref.ps
tex-ref.pdf: tex-ref.tex
$(PDFTEX) tex-ref.tex
version.texi: ../ChangeLog.1
echo @set VERSION $(AUCTEXVERSION) >version.texi
echo @set UPDATED $(AUCTEXDATE) >>version.texi
auctex.dvi: $(AUCTEXTEXIFILES)
$(TEXI2DVI) auctex.texi
auctex.pdf: $(AUCTEXTEXIFILES)
$(TEXI2PDF) auctex.texi
auctex.ps: auctex.dvi
$(DVIPS) auctex.dvi -Ppdf -o auctex.ps
auctex.info: $(AUCTEXTEXIFILES)
$(MAKEINFO) auctex.texi
install-auctex: auctex.info tex-ref.pdf
-$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
rm -f $(DESTDIR)$(infodir)/auctex $(DESTDIR)$(infodir)/auctex-*
$(INSTALL_DATA) auctex.info $(DESTDIR)$(infodir)
for x in auctex.info-*; do \
if [ -r $$x ]; then \
$(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \
fi; \
done
-$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) auctex.info
test X$(packagedir) != Xno || { \
$(MKINSTALLDIRS) $(DESTDIR)$(docdir); \
rm -f $(DESTDIR)$(docdir)/tex-ref.pdf; \
$(INSTALL_DATA) tex-ref.pdf $(DESTDIR)$(docdir); \
}
# preview
preview-latex/index.html: $(PREVIEWTEXIFILES)
rm -f preview-latex/*
$(TEXI2HTML) preview-latex.texi
html-docs: preview-latex/index.html
preview-dtxdoc.texi: ../latex/preview.dtx preview-dtxdoc.pl
-$(PERL) preview-dtxdoc.pl ../latex/preview.dtx \
preview-dtxdoc.texi
preview-latex.dvi: $(PREVIEWTEXIFILES)
$(TEXI2DVI) preview-latex.texi
preview-latex.ps: preview-latex.dvi
$(DVIPS) preview-latex.dvi -Ppdf -o preview-latex.ps
preview-latex.pdf: $(PREVIEWTEXIFILES)
$(TEXI2PDF) preview-latex.texi
preview-latex.info: $(PREVIEWTEXIFILES)
$(MAKEINFO) preview-latex.texi
install-preview: preview-latex.info
-$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
for x in preview-latex.info* ; do \
$(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \
done
-$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) preview-latex.info
# disttexts
../INSTALL: install.texi macros.texi
$(MAKEINFO) $(MAKEINFO_PLAIN) install.texi --output $@
../INSTALL.windows: wininstall.texi macros.texi
$(MAKEINFO) $(MAKEINFO_PLAIN) wininstall.texi --output $@
../README: intro.texi preview-readme.texi macros.texi
$(MAKEINFO) $(MAKEINFO_PLAIN) intro.texi --output $@
$(MAKEINFO) $(MAKEINFO_PLAIN) preview-readme.texi --output - >> $@
../CHANGES: changes.texi macros.texi
$(MAKEINFO) $(MAKEINFO_PLAIN) changes.texi --output $@
../TODO: todo.texi preview-todo.texi macros.texi
$(MAKEINFO) $(MAKEINFO_PLAIN) todo.texi --output $@
$(MAKEINFO) $(MAKEINFO_PLAIN) preview-todo.texi --output - >> $@
../FAQ: faq.texi preview-faq.texi macros.texi
$(MAKEINFO) $(MAKEINFO_PLAIN) faq.texi --output $@
$(MAKEINFO) $(MAKEINFO_PLAIN) --number-sections preview-faq.texi --output - >> $@
../PROBLEMS.preview: preview-problems.texi macros.texi
$(MAKEINFO) $(MAKEINFO_PLAIN) --number-sections preview-problems.texi --output $@
# clean
uninstall:
for info in $(DESTDIR)$(infodir)/{auctex.info,preview-latex.info}; do \
test ! -f $${info} || \
$(INSTALL_INFO) --delete --info-dir=$(DESTDIR)$(infodir) $${info}; \
done
rm -f $(DESTDIR)$(infodir)/auctex.info $(DESTDIR)$(infodir)/auctex.info-* \
$(DESTDIR)$(infodir)/preview-latex.info*
test X$(packagedir) != Xno || rm -rf -f $(DESTDIR)$(docdir)
clean:
rm -f *.dvi *.ps *.pdf *.aux *.cp *.fn *.ky *.log *~ \#*\# \
*.tp *.vr *.pg *.toc *.tp *.bak *.cps *.kys *.tps \
*.fns *.vrs *.pgs *.tmp *.html
rm -rf html preview-latex
distclean: clean
rm -f Makefile
maintainer-clean: distclean
rm -f INSTALL.windows README CHANGES HISTORY TODO FAQ \
preview-dtxdoc.texi version.texi $(DISTTEXTS) *.info *.info-*

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,48 @@
@include macros.texi
@c -----------------------
@cindex Copying
@cindex Copyright
@cindex GPL
@cindex General Public License
@cindex License
@c @cindex Free
@c @cindex Free software
@c @cindex Distribution
@c @cindex Right
@cindex Warranty
(This text is stolen from the Texinfo manual, Edition 4.0).
The programs currently being distributed that relate to @previewlatex{}
include lisp files for Emacs and style files for @LaTeX{}. These
programs are @dfn{free}; this means that everyone is free to use them
and free to redistribute them on a free basis. The @previewlatex{}
related programs are not in the public domain; they are copyrighted and
there are restrictions on their distribution, but these restrictions are
designed to permit everything that a good cooperating citizen would want
to do. What is not allowed is to try to prevent others from further
sharing any version of these programs that they might get from you.
Specifically, we want to make sure that you have the right to give away
copies of the programs that relate to @previewlatex{}, that you receive
source code or else can get it if you want it, that you can change these
programs or use pieces of them in new free programs, and that you know
you can do these things.
To make sure that everyone has such rights, we have to forbid you to
deprive anyone else of these rights. For example, if you distribute
copies of the @previewlatex{} related programs, you must give the
recipients all the rights that you have. You must make sure that they,
too, receive or can get the source code. And you must tell them their
rights.
Also, for our own protection, we must make certain that everyone finds
out that there is no warranty for the programs that relate to
@previewlatex{}. If these programs are modified by someone else and
passed on, we want their recipients to know that what they have is not
what we distributed, so that any problems introduced by others will not
reflect on our reputation.
The precise conditions of the licenses for the programs currently being
distributed that relate to @previewlatex{} are found in the General Public
Licenses that accompany them.

View File

@@ -0,0 +1,153 @@
@c This is part of the AUCTeX Manual.
@c Copyright (C) 2004-2014 Free Software Foundation, Inc.
@c See the file auctex.texi for copying conditions.
@ifset rawfile
@include macros.texi
@chapheading Frequently Asked Questions about @AUCTeX{}
@end ifset
@c We should switch to sectioning commands instead of items when this
@c list grows. Keep in mind to formulate short questions because
@c section headings will not be broken in contrast to items.
@enumerate
@item
Something is not working correctly. What should I do?
Well, you might have guessed it, the first place to look is in the
available documentation packaged with @AUCTeX{}. This could be the
release notes (in the @file{RELEASE} file) or the news section of the
manual in case you are experiencing problems after an upgrade, the
@file{INSTALL} file in case you are having problems with the
installation, the section about bugs in the manual in case you
encountered a bug or the relevant sections in the manual for other
related problems.
If this did not help, you can send a bug report to the @AUCTeX{} bug
reporting list by using the command @kbd{M-x TeX-submit-bug-report RET}.
But before you do this, you can try to get more information about the
problem at hand which might also help you locate the cause of the error
yourself.
First, you can try to generate a so-called backtrace which shows the
functions involved in a program error. In order to do this, start Emacs
with the command line @samp{emacs --debug-init} and/or put the line
@lisp
(setq debug-on-error t)
@end lisp
as the first line into your init file. XEmacs users might want to add
@code{(setq stack-trace-on-error t)} as well. After Emacs has started,
you can load a file which triggers the error and a new window should pop
up showing the backtrace. If you get such a backtrace, please include
it in the bug report.
Second, you can try to figure out if something in your personal or site
configuration triggers the error by starting Emacs without such
customizations. You can do this by invoking Emacs with the command line
@samp{emacs -q -no-site-file -l auctex}. The @samp{-l} option
@samp{auctex.el} which you normally do in your init file. After you
have started Emacs like this, you can load the file triggering the
error. If everything is working now, you know that you have to search
either in the site configuration file or your personal init file for
statements related to the problem.
@item
What versions of Emacs and XEmacs are supported?
@AUCTeX{} was tested with @w{Emacs 21} and @w{XEmacs 21.4.15}. Older
versions may work but are unsupported. Older versions of XEmacs might
possibly made to work by updating the @file{xemacs-base} package through
the XEmacs package system. If you are looking for a recommendation, it
would appear that the smoothest working platform on all operating
systems at the current point of time would be @w{Emacs 22} or higher.
Our success with XEmacs has been less than convincing. Code for core
functionality like formatting and syntax highlighting tends to be
different and often older than even @w{Emacs 21.4}, and Unicode support
as delivered is problematic at best, missing on Windows. Both @AUCTeX{}
and XEmacs developers don't hear much from active users of the
combination. Partly for that reason, problems tend to go unnoticed for
long amounts of time and are often found, if at all, after releases. No
experiences or recommendations can be given for beta or developer
versions of XEmacs.
@item
What should I do when @code{./configure} does not find programs like latex?
This is problem often encountered on Windows. Make sure that the
@env{PATH} environment variable includes the directories containing the
relevant programs, as described in
@ifset rawfile
the file @file{INSTALL.windows}
@end ifset
@ifclear rawfile
@ref{Installation under MS Windows,,,auctex,the @AUCTeX{} manual}.
@end ifclear
@item
Why doesn't the completion, style file, or multi-file stuff work?
It must be enabled first, insert this in your init file:
@lisp
(setq-default TeX-master nil)
(setq TeX-parse-self t)
(setq TeX-auto-save t)
@end lisp
Read also the chapters about parsing and multifile documents in the
manual.
@item
Why doesn't @code{TeX-save-document} work?
@code{TeX-check-path} has to contain "./" somewhere.
@item
Why is the information in @file{foo.tex} forgotten when I save
@file{foo.bib}?
For various reasons, @AUCTeX{} ignores the extension when it stores
information about a file, so you should use unique base names for your
files. E.g. rename @file{foo.bib} to @file{foob.bib}.
@item
Why doesn't @AUCTeX{} signal when processing a document is done?
If the message in the minibuffer stays "Type `C-c C-l' to display
results of compilation.", you probably have a misconfiguration in your
init file (@file{.emacs}, @file{init.el} or similar). To track this
down either search in the @samp{*Messages*} buffer for an error message
or put @code{(setq debug-on-error t)} as the first line into your init
file, restart Emacs and open a @LaTeX{} file. Emacs will complain
loudly by opening a debugging buffer as soon as an error occurs. The
information in the debugging buffer can help you find the cause of the
error in your init file.
@item
Why does @code{TeX-next-error} (@kbd{C-c `}) fail?
If @code{TeX-file-line-error} is set to nil (not the default), these
sort of failures might be related to the the fact that when writing the
log file, @TeX{} puts information related to a file, including error
messages, between a pair of parentheses. In this scenario @AUCTeX{}
determines the file where the error happened by parsing the log file and
counting the parentheses. This can fail when there are other,
unbalanced parentheses present.
Activating so-called file:line:error messages for the log file usually
solves this issue, as these kind of messages are are easier to parse;
however, they may lack some details. Activation can be done either in
the configuration of your @TeX{} system (consult its manual to see where
this is) or by simply keeping the variable @code{TeX-file-line-error} to
the default value of non-nil.
@item
What does AUC stand for?
@AUCTeX{} came into being at Aalborg University in Denmark. Back then
the Danish name of the university was Aalborg Universitetscenter; AUC
for short.
@end enumerate

View File

@@ -0,0 +1,506 @@
@node GNU Free Documentation License
@appendixsec GNU Free Documentation License
@cindex FDL, GNU Free Documentation License
@center Version 1.3, 3 November 2008
@display
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software
Foundation, Inc. @uref{http://fsf.org/}
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@end display
@enumerate 0
@item
PREAMBLE
The purpose of this License is to make a manual, textbook, or other
functional and useful document @dfn{free} in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of ``copyleft'', which means that derivative
works of the document must themselves be free in the same sense. It
complements the GNU General Public License, which is a copyleft
license designed for free software.
We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free
program should come with manuals providing the same freedoms that the
software does. But this License is not limited to software manuals;
it can be used for any textual work, regardless of subject matter or
whether it is published as a printed book. We recommend this License
principally for works whose purpose is instruction or reference.
@item
APPLICABILITY AND DEFINITIONS
This License applies to any manual or other work, in any medium, that
contains a notice placed by the copyright holder saying it can be
distributed under the terms of this License. Such a notice grants a
world-wide, royalty-free license, unlimited in duration, to use that
work under the conditions stated herein. The ``Document'', below,
refers to any such manual or work. Any member of the public is a
licensee, and is addressed as ``you''. You accept the license if you
copy, modify or distribute the work in a way requiring permission
under copyright law.
A ``Modified Version'' of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A ``Secondary Section'' is a named appendix or a front-matter section
of the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall
subject (or to related matters) and contains nothing that could fall
directly within that overall subject. (Thus, if the Document is in
part a textbook of mathematics, a Secondary Section may not explain
any mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The ``Invariant Sections'' are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
that says that the Document is released under this License. If a
section does not fit the above definition of Secondary then it is not
allowed to be designated as Invariant. The Document may contain zero
Invariant Sections. If the Document does not identify any Invariant
Sections then there are none.
The ``Cover Texts'' are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
the Document is released under this License. A Front-Cover Text may
be at most 5 words, and a Back-Cover Text may be at most 25 words.
A ``Transparent'' copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
format whose markup, or absence of markup, has been arranged to thwart
or discourage subsequent modification by readers is not Transparent.
An image format is not Transparent if used for any substantial amount
of text. A copy that is not ``Transparent'' is called ``Opaque''.
Examples of suitable formats for Transparent copies include plain
@sc{ascii} without markup, Texinfo input format, La@TeX{} input
format, @acronym{SGML} or @acronym{XML} using a publicly available
@acronym{DTD}, and standard-conforming simple @acronym{HTML},
PostScript or @acronym{PDF} designed for human modification. Examples
of transparent image formats include @acronym{PNG}, @acronym{XCF} and
@acronym{JPG}. Opaque formats include proprietary formats that can be
read and edited only by proprietary word processors, @acronym{SGML} or
@acronym{XML} for which the @acronym{DTD} and/or processing tools are
not generally available, and the machine-generated @acronym{HTML},
PostScript or @acronym{PDF} produced by some word processors for
output purposes only.
The ``Title Page'' means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
this License requires to appear in the title page. For works in
formats which do not have any title page as such, ``Title Page'' means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
The ``publisher'' means any person or entity that distributes copies
of the Document to the public.
A section ``Entitled XYZ'' means a named subunit of the Document whose
title either is precisely XYZ or contains XYZ in parentheses following
text that translates XYZ in another language. (Here XYZ stands for a
specific section name mentioned below, such as ``Acknowledgements'',
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
of such a section when you modify the Document means that it remains a
section ``Entitled XYZ'' according to this definition.
The Document may include Warranty Disclaimers next to the notice which
states that this License applies to the Document. These Warranty
Disclaimers are considered to be included by reference in this
License, but only as regards disclaiming warranties: any other
implication that these Warranty Disclaimers may have is void and has
no effect on the meaning of this License.
@item
VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
to the Document are reproduced in all copies, and that you add no other
conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
number of copies you must also follow the conditions in section 3.
You may also lend copies, under the same conditions stated above, and
you may publicly display copies.
@item
COPYING IN QUANTITY
If you publish printed copies (or copies in media that commonly have
printed covers) of the Document, numbering more than 100, and the
Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
the full title with all words of the title equally prominent and
visible. You may add other material on the covers in addition.
Copying with changes limited to the covers, as long as they preserve
the title of the Document and satisfy these conditions, can be treated
as verbatim copying in other respects.
If the required texts for either cover are too voluminous to fit
legibly, you should put the first ones listed (as many as fit
reasonably) on the actual cover, and continue the rest onto adjacent
pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
a computer-network location from which the general network-using
public has access to download using public-standard network protocols
a complete Transparent copy of the Document, free of added material.
If you use the latter option, you must take reasonably prudent steps,
when you begin distribution of Opaque copies in quantity, to ensure
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
@item
MODIFICATIONS
You may copy and distribute a Modified Version of the Document under
the conditions of sections 2 and 3 above, provided that you release
the Modified Version under precisely this License, with the Modified
Version filling the role of the Document, thus licensing distribution
and modification of the Modified Version to whoever possesses a copy
of it. In addition, you must do these things in the Modified Version:
@enumerate A
@item
Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
@item
List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
@item
State on the Title page the name of the publisher of the
Modified Version, as the publisher.
@item
Preserve all the copyright notices of the Document.
@item
Add an appropriate copyright notice for your modifications
adjacent to the other copyright notices.
@item
Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the
terms of this License, in the form shown in the Addendum below.
@item
Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
@item
Include an unaltered copy of this License.
@item
Preserve the section Entitled ``History'', Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled ``History'' in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
@item
Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
it was based on. These may be placed in the ``History'' section.
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
@item
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
the Title of the section, and preserve in the section all the
substance and tone of each of the contributor acknowledgements and/or
dedications given therein.
@item
Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
@item
Delete any section Entitled ``Endorsements''. Such a section
may not be included in the Modified Version.
@item
Do not retitle any existing section to be Entitled ``Endorsements'' or
to conflict in title with any Invariant Section.
@item
Preserve any Warranty Disclaimers.
@end enumerate
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
copied from the Document, you may at your option designate some or all
of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
You may add a section Entitled ``Endorsements'', provided it contains
nothing but endorsements of your Modified Version by various
parties---for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
Front-Cover Text and one of Back-Cover Text may be added by (or
through arrangements made by) any one entity. If the Document already
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
@item
COMBINING DOCUMENTS
You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled ``History''
in the various original documents, forming one section Entitled
``History''; likewise combine any sections Entitled ``Acknowledgements'',
and any sections Entitled ``Dedications''. You must delete all
sections Entitled ``Endorsements.''
@item
COLLECTIONS OF DOCUMENTS
You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in
the collection, provided that you follow the rules of this License for
verbatim copying of each of the documents in all other respects.
You may extract a single document from such a collection, and distribute
it individually under this License, provided you insert a copy of this
License into the extracted document, and follow this License in all
other respects regarding verbatim copying of that document.
@item
AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
distribution medium, is called an ``aggregate'' if the copyright
resulting from the compilation is not used to limit the legal rights
of the compilation's users beyond what the individual works permit.
When the Document is included in an aggregate, this License does not
apply to the other works in the aggregate which are not themselves
derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
copies of the Document, then if the Document is less than one half of
the entire aggregate, the Document's Cover Texts may be placed on
covers that bracket the Document within the aggregate, or the
electronic equivalent of covers if the Document is in electronic form.
Otherwise they must appear on printed covers that bracket the whole
aggregate.
@item
TRANSLATION
Translation is considered a kind of modification, so you may
distribute translations of the Document under the terms of section 4.
Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
translation of this License, and all the license notices in the
Document, and any Warranty Disclaimers, provided that you also include
the original English version of this License and the original versions
of those notices and disclaimers. In case of a disagreement between
the translation and the original version of this License or a notice
or disclaimer, the original version will prevail.
If a section in the Document is Entitled ``Acknowledgements'',
``Dedications'', or ``History'', the requirement (section 4) to Preserve
its Title (section 1) will typically require changing the actual
title.
@item
TERMINATION
You may not copy, modify, sublicense, or distribute the Document
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense, or distribute it is void, and
will automatically terminate your rights under this License.
However, if you cease all violation of this License, then your license
from a particular copyright holder is reinstated (a) provisionally,
unless and until the copyright holder explicitly and finally
terminates your license, and (b) permanently, if the copyright holder
fails to notify you of the violation by some reasonable means prior to
60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, receipt of a copy of some or all of the same material does
not give you any rights to use it.
@item
FUTURE REVISIONS OF THIS LICENSE
The Free Software Foundation may publish new, revised versions
of the GNU Free Documentation License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns. See
@uref{http://www.gnu.org/copyleft/}.
Each version of the License is given a distinguishing version number.
If the Document specifies that a particular numbered version of this
License ``or any later version'' applies to it, you have the option of
following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
as a draft) by the Free Software Foundation. If the Document
specifies that a proxy can decide which future versions of this
License can be used, that proxy's public statement of acceptance of a
version permanently authorizes you to choose that version for the
Document.
@item
RELICENSING
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
World Wide Web server that publishes copyrightable works and also
provides prominent facilities for anybody to edit those works. A
public wiki that anybody can edit is an example of such a server. A
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
site means any set of copyrightable works thus published on the MMC
site.
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
license published by Creative Commons Corporation, a not-for-profit
corporation with a principal place of business in San Francisco,
California, as well as future copyleft versions of that license
published by that same organization.
``Incorporate'' means to publish or republish a Document, in whole or
in part, as part of another Document.
An MMC is ``eligible for relicensing'' if it is licensed under this
License, and if all works that were first published under this License
somewhere other than this MMC, and subsequently incorporated in whole
or in part into the MMC, (1) had no cover texts or invariant sections,
and (2) were thus incorporated prior to November 1, 2008.
The operator of an MMC Site may republish an MMC contained in the site
under CC-BY-SA on the same site at any time before August 1, 2009,
provided the MMC is eligible for relicensing.
@end enumerate
@page
@heading ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
@smallexample
@group
Copyright (C) @var{year} @var{your name}.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''.
@end group
@end smallexample
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the ``with@dots{}Texts.'' line with this:
@smallexample
@group
with the Invariant Sections being @var{list their titles}, with
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
being @var{list}.
@end group
@end smallexample
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
@c Local Variables:
@c ispell-local-pdict: "ispell-dict"
@c End:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,603 @@
@c This is part of the AUCTeX Manual.
@c Copyright (C) 1994, 1996, 2003-2007, 2012 Free Software Foundation, Inc.
@c See the file auctex.texi for copying conditions.
@ifset rawfile
@include macros.texi
@node Installation,,(dir),(dir)
@top Installing @AUCTeX{}
@end ifset
@ifclear rawfile
@node Installation
@chapter Installing @AUCTeX{}
@end ifclear
The modern and strongly recommended way of installing @AUCTeX{} is by
using the Emacs package manager integrated in Emacs 24 and greater
(@acronym{ELPA}). Simply do @kbd{M-x list-packages RET}, mark the
auctex package for installation with @kbd{i}, and hit @kbd{x} to execute
the installation procedure. That's all. This installation procedure
has several advantages. Besides being platform and @acronym{OS}
independent, you will receive intermediate releases between major
@AUCTeX{} releases conveniently. For past @acronym{ELPA} releases, see
@url{https://elpa.gnu.org/packages/auctex.html}.
@ifclear rawfile
Once the installation is completed, you can skip the rest of this
section and proceed to @ref{Quick Start}.
@end ifclear
The remainder of this section is about installing @AUCTeX{} from a
release tarball or from a checkout of the @AUCTeX{} repository.
Installing @AUCTeX{} should be simple: merely @command{./configure},
@command{make}, and @code{make install} for a standard site-wide
installation (most other installations can be done by specifying a
@option{--prefix=@dots{}} option).
On many systems, this will already activate the package, making its
modes the default instead of the built-in modes of Emacs. If this is
not the case, consult @ref{Loading the package}. Please read through
this document fully before installing anything. The installation
procedure has changed as compared to earlier versions. Users of @w{MS
Windows} are asked to consult
@ifset rawfile
the file @file{INSTALL.windows}.
@end ifset
@ifclear rawfile
@xref{Installation under MS Windows}.
@end ifclear
@ifclear rawfile
@menu
* Prerequisites::
* Configure::
* Build/install and uninstall::
* Loading the package::
* Advice for package providers::
* Advice for non-privileged users::
* Installation under MS Windows::
* Customizing::
@end menu
@end ifclear
@ifset rawfile
@menu
* Prerequisites::
* Configure::
* Build/install and uninstall::
* Loading the package::
* Advice for package providers::
* Advice for non-privileged users::
* Customizing::
@end menu
@end ifset
@ifset rawfile
@node Prerequisites
@chapter Prerequisites
@raisesections
@end ifset
@ifclear rawfile
@node Prerequisites
@section Prerequisites
@end ifclear
@itemize @bullet
@item A recent version of Emacs, alternatively XEmacs
@w{Emacs 20} is no longer supported, and neither is XEmacs with a
version of @code{xemacs-base} older than 1.84 (released in sumo from
02/02/2004). Using @previewlatex{} requires a version of Emacs compiled
with image support. While the X11 version of @w{Emacs 21} will likely
work, @w{Emacs 22} and later is preferred.
@table @b
@item Windows
Precompiled versions are available from
@uref{ftp://ftp.gnu.org/gnu/emacs/windows/}.
@item Mac OS X
For an overview of precompiled versions of Emacs for Mac OS X see for
example @uref{http://www.emacswiki.org/cgi-bin/wiki/EmacsForMacOS}.
@item GNU/Linux
Most GNU/Linux distributions nowadays provide a recent variant of Emacs
via their package repositories.
@item Self-compiled
Compiling Emacs yourself requires a C compiler and a number of tools and
development libraries. Details are beyond the scope of this manual.
Instructions for checking out the source code can be found at
@uref{https://savannah.gnu.org/bzr/?group=emacs}.
@end table
If you really need to use @w{Emacs 21} on platforms where this implies
missing image support, you should disable the installation of
@previewlatex{} (see below).
While XEmacs (version 21.4.15, 21.4.17 or later) is supported, doing
this in a satisfactory manner has proven to be difficult. This is
mostly due to technical shortcomings and differing API's which are hard
to come by. If @AUCTeX{} is your main application for XEmacs, you are
likely to get better results and support by switching to Emacs. Of
course, you can improve support for your favorite editor by giving
feedback in case you encounter bugs.
@item A working @TeX{} installation
Well, @AUCTeX{} would be pointless without that. Processing
documentation requires @TeX{}, @LaTeX{} and Texinfo during installation.
@previewlatex{} requires Dvips for its operation in @acronym{DVI} mode.
The default configuration of @AUCTeX{} is tailored for te@TeX{} or
@TeX{}live-based distributions, but can be adapted easily.
@item A recent Ghostscript
This is needed for operation of @previewlatex{} in both @acronym{DVI}
and @acronym{PDF} mode. Most versions of Ghostscript nowadays in use
should work fine (version 7.0 and newer).
@item The @code{texinfo} package
Strictly speaking, you can get away without it if you are building
from the distribution tarball, have not modified any files and don't
need a printed version of the manual: the pregenerated info file is
included in the tarball. At least @w{version 4.0} is required.
@end itemize
For some known issues with various software, see
@ifset rawfile
the @file{PROBLEMS} file.
@end ifset
@ifclear rawfile
@ref{Known problems,,,preview-latex,the @previewlatex{} manual}.
@end ifclear
@node Configure
@section Configure
The first step is to configure the source code, telling it where
various files will be. To do so, run
@example
./configure @var{options}
@end example
(Note: if you have fetched @AUCTeX{} from @acronym{Git} rather than
a regular release, you will have to first follow the instructions in
@file{README.GIT}).
On many machines, you will not need to specify any options, but if
@command{configure} cannot determine something on its own, you'll need to
help it out with one of these options:
@table @code
@item --prefix=@file{/usr/local}
All automatic placements for package components will be chosen from
sensible existing hierarchies below this: directories like @file{man},
@file{share} and @file{bin} are supposed to be directly below
@var{prefix}.
Only if no workable placement can be found there, in some cases an
alternative search will be made in a prefix deduced from a suitable
binary.
@file{/usr/local} is the default @var{prefix}, intended to be suitable
for a site-wide installation. If you are packaging this as an
operating system component for distribution, the setting @file{/usr}
will probably be the right choice. If you are planning to install the
package as a single non-priviledged user, you will typically set
@var{prefix} to your home directory.
@item --with-emacs[=@var{/path/to/emacs}]
If you are using a pretest which isn't in your @code{$PATH}, or
@command{configure} is not finding the right Emacs executable, you can
specify it with this option.
@item --with-xemacs[=@var{/path/to/xemacs}]
Configure for generation under XEmacs (Emacs is the default). Again,
the name of the right XEmacs executable can be specified, complete with
path if necessary.
@item --with-packagedir=@var{/dir}
This XEmacs-only option configures the directory for XEmacs packages. A
typical user-local setting would be @file{~/.xemacs/xemacs-packages}.
If this directory exists and is below @var{prefix}, it should be
detected automatically. This will install and activate the package.
@item --without-packagedir
This XEmacs-only option switches the detection of a package directory
and corresponding installation off. Consequently, the Emacs
installation scheme will be used. This might be appropriate if you are
using a different package system/installer than the XEmacs one and want
to avoid conflicts.
The Emacs installation scheme has the following options:
@item --with-lispdir=@var{/dir}
This Emacs-only option specifies the location of the @file{site-lisp}
directory within @samp{load-path} under which the files will get
installed (the bulk will get installed in a subdirectory).
@file{./configure} should figure this out by itself.
@item --with-auctexstartfile=@file{auctex.el}
@itemx --with-previewstartfile=@file{preview-latex.el}
This is the name of the respective startup files. If @var{lispdir}
contains a subdirectory @file{site-start.d}, the start files are
placed there, and @file{site-start.el} should
load them automatically. Please be aware that you must not move the
start files after installation since other files are found
@emph{relative} to them.
@item --with-packagelispdir=@file{auctex}
This is the directory where the bulk of the package gets located. The
startfile adds this into @var{load-path}.
@item --with-auto-dir=@var{/dir}
You can use this option to specify the directory containing
automatically generated information. It is not necessary for most
@TeX{} installs, but may be used if you don't like the directory that
configure is suggesting.
@item --help
This is not an option specific to @AUCTeX{}. A number of standard
options to @command{configure} exist, and we do not have the room to
describe them here; a short description of each is available, using
@code{--help}. If you use @samp{--help=recursive}, then also
@previewlatex{}-specific options will get listed.
@item --disable-preview
This disables configuration and installation of @previewlatex{}. This
option is not actually recommended. If your Emacs does not support
images, you should really upgrade to a newer version. Distributors
should, if possible, refrain from distributing @AUCTeX{} and
@previewlatex{} separately in order to avoid confusion and upgrade
hassles if users install partial packages on their own.
@item --with-texmf-dir=@var{/dir}@*--without-texmf-dir
@cindex preview-install-styles
This option is used for specifying a @acronym{TDS}-compliant directory
hierarchy. Using @code{--with-texmf-dir=@var{/dir}} you can specify
where the @TeX{} @acronym{TDS} directory hierarchy resides, and the
@TeX{} files will get installed in
@file{@var{/dir}/tex/latex/preview/}.
If you use the @code{--without-texmf-dir} option, the @TeX{}-related
files will be kept in the Emacs Lisp tree, and at runtime the
@env{TEXINPUTS} environment variable will be made to point there. You
can install those files into your own @TeX{} tree at some later time
with @kbd{M-x preview-install-styles RET}.
@item --with-tex-dir=@var{/dir}
If you want to specify an exact directory for the preview @TeX{} files,
use @code{--with-tex-dir=@var{/dir}}. In this case, the files will be
placed in @file{@var{/dir}}, and you'll also need the following option:
@item --with-doc-dir=@var{/dir}
This option may be used to specify where the @TeX{} documentation goes.
It is to be used when you are using @code{--with-tex-dir=@var{/dir}},
but is normally not necessary otherwise.
@end table
@node Build/install and uninstall
@section Build/install and uninstall
@cindex Installation
@cindex Make
@cindex Uninstallation
Once @command{configure} has been run, simply enter
@example
make
@end example
@noindent
at the prompt to byte-compile the lisp files, extract the @TeX{} files
and build the documentation files. To install the files into the
locations chosen earlier, type
@example
make install
@end example
@noindent
You may need special privileges to install, e.g., if you are installing
into system directories.
Should you want to completely remove the installed package, in the same
directory you built @AUCTeX{} run
@example
make uninstall
@end example
@noindent
You will need administration privileges if you installed the package
into system directories.
@node Loading the package
@section Loading the package
@cindex @file{.emacs}
You can detect the successful activation of @AUCTeX{} and
@previewlatex{} in the menus after loading a @LaTeX{} file like
@file{preview/circ.tex}: @AUCTeX{} then gives you a @samp{Command} menu,
and @previewlatex{} gives you a @samp{Preview} menu.
For XEmacs, if the installation occured into a valid package directory
(which is the default), then this should work out of the box.
@cindex @file{auctex.el}
@cindex @file{tex-site.el}
With Emacs (or if you explicitly disabled use of the package system),
the startup files @file{auctex.el} and @file{preview-latex.el} may
already be in a directory of the @file{site-start.d/} variety if your
Emacs installation provides it. In that case they should be
automatically loaded on startup and nothing else needs to be done. If
not, they should at least have been placed somewhere in your
@code{load-path}. You can then load them by placing the lines
@example
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
@end example
into your init file.
If you explicitly used @code{--with-lispdir}, you may need to add the
specified directory into Emacs' @code{load-path} variable by adding
something like
@example
(add-to-list 'load-path "~/elisp")
@end example
before the above lines into your Emacs startup file.
For site-wide activation in GNU Emacs, see
@ifset rawfile
below.
@end ifset
@ifclear rawfile
@xref{Advice for package providers}.
@end ifclear
Once activated, the modes provided by @AUCTeX{} are used per default for
all supported file types. If you want to change the modes for which it
is operative instead of the default, use
@example
@kbd{M-x customize-variable @key{RET} TeX-modes @key{RET}}
@end example
If you want to remove a preinstalled @AUCTeX{} completely before any of
its modes have been used,
@example
(unload-feature 'tex-site)
@end example
should accomplish that.
@node Advice for package providers
@section Providing @AUCTeX{} as a package
As a package provider, you should make sure that your users will be
served best according to their intentions, and keep in mind that a
system might be used by more than one user, with different
preferences.
There are people that prefer the built-in Emacs modes for editing
@TeX{} files, in particular plain @TeX{} users. There are various
ways to tell @AUCTeX{} even after auto-activation that it should
not get used, and they are described in
@ifset rawfile
the @file{README} file.
@end ifset
@ifclear rawfile
@ref{Introduction,,Introduction to @AUCTeX{}}.
@end ifclear
So if you have users that don't want to use the preinstalled @AUCTeX{},
they can easily get rid of it. Activating @AUCTeX{} by default is
therefore a good choice.
If the installation procedure did not achieve this already by placing
@file{auctex.el} and @file{preview-latex.el} into a possibly existing
@file{site-start.d} directory, you can do this by placing
@example
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
@end example
@noindent in the system-wide @file{site-start.el}.
If your package is intended as an XEmacs package or to accompany a
precompiled version of Emacs, you might not know which @TeX{} system
will be available when @previewlatex{} gets used. In this case you
should build using the @code{--without-texmf-dir} option described
previously. This can also be convenient for systems that are intended
to support more than a single TeX distribution. Since more often than
not @TeX{} packages for operating system distributions are either much
more outdated or much less complete than separately provided systems
like @w{@TeX{} Live}, this method may be generally preferable when
providing packages.
The following package structure would be adequate for a typical fully
supported Unix-like installation:
@table @samp
@item preview-tetex
Style files and documentation for @file{preview.sty}, placed into a
@TeX{} tree where it is accessible from the te@TeX{} executables usually
delivered with a system. If there are other commonly used @TeX{} system
packages, it might be appropriate to provide separate packages for
those.
@item auctex-emacs-tetex
This package will require the installation of @samp{preview-tetex} and
will record in @samp{TeX-macro-global} where to find the @TeX{} tree.
It is also a good idea to run
@example
emacs -batch -f TeX-auto-generate-global
@end example
when either @AUCTeX{} or te@TeX{} get installed or upgraded. If your
users might want to work with a different @TeX{} distribution (nowadays
pretty common), instead consider the following:
@item auctex-emacs
This package will be compiled with @samp{--without-texmf-dir} and will
consequently contain the @samp{preview} style files in its private
directory. It will probably not be possible to initialize
@samp{TeX-macro-global} to a sensible value, so running
@samp{TeX-auto-generate-global} does not appear useful. This package
would neither conflict with nor provide @samp{preview-tetex}.
@item auctex-xemacs-tetex
@itemx auctex-xemacs
Those are the obvious XEmacs equivalents. For XEmacs, there is the
additional problem that the XEmacs sumo package tree already possibly
provides its own version of @AUCTeX{}, and the user might even have used
the XEmacs package manager to updating this package, or even installing
a private @AUCTeX{} version. So you should make sure that such a
package will not conflict with existing XEmacs packages and will be
at an appropriate place in the load order (after site-wide and
user-specific locations, but before a distribution-specific sumo package
tree). Using the @code{--without-packagedir} option might be one idea
to avoid conflicts. Another might be to refrain from providing an
XEmacs package and just rely on the user or system administrator to
instead use the XEmacs package system.
@end table
@node Advice for non-privileged users
@section Installation for non-privileged users
Often people without system administration privileges want to install
software for their private use. In that case you need to pass more
options to the @command{configure} script. For XEmacs users, this is
fairly easy, because the XEmacs package system has been designed to make
this sort of thing practical: but GNU Emacs users (and XEmacs users for
whom the package system is for some reason misbehaving) may need to do a
little more work.
The main expedient is using the @option{--prefix} option to the
@file{configure} script, and let it point to the personal home
directory. In that way, resulting binaries will be installed under the
@file{bin} subdirectory of your home directory, manual pages under
@file{man} and so on. It is reasonably easy to maintain a bunch of
personal software, since the prefix argument is supported by most
@file{configure} scripts.
You'll have to add something like
@file{/home/myself/share/emacs/site-lisp} to your @code{load-path}
variable, if it isn't there already.
XEmacs users can achieve the same end by pointing @command{configure} at an
appropriate package directory (normally
@option{--with-packagedir=~/.xemacs/xemacs-packages} will serve). The
package directory stands a good chance at being detected automatically
as long as it is in a subtree of the specified @var{prefix}.
Now here is another thing to ponder: perhaps you want to make it easy
for other users to share parts of your personal Emacs configuration. In
general, you can do this by writing @samp{~myself/} anywhere where you
specify paths to something installed in your personal subdirectories,
not merely @samp{~/}, since the latter, when used by other users, will
point to non-existent files.
For yourself, it will do to manipulate environment variables in your
@file{.profile} resp.@: @file{.login} files. But if people will be
copying just Elisp files, their copies will not work. While it would
in general be preferable if the added components where available from
a shell level, too (like when you call the standalone info reader, or
try using @file{preview.sty} for functionality besides of Emacs
previews), it will be a big help already if things work from inside
of Emacs.
Here is how to do the various parts:
@subheading Making the Elisp available
In GNU Emacs, it should be sufficient if people just do
@lisp
(load "~myself/share/emacs/site-lisp/auctex.el" nil t t)
(load "~myself/share/emacs/site-lisp/preview-latex.el" nil t t)
@end lisp
where the path points to your personal installation. The rest of the
package should be found relative from there without further ado.
In XEmacs, you should ask the other users to add symbolic links in the
subdirectories @file{lisp}, @file{info} and @file{etc} of their
@file{~/.xemacs/xemacs-packages/} directory. (Alas, there is presently
no easy programmatic way to do this, except to have a script do the
symlinking for them.)
@subheading Making the Info files available
For making the info files accessible from within Elisp, something like
the following might be convenient to add into your or other people's
startup files:
@lisp
(eval-after-load 'info
'(add-to-list 'Info-directory-list "~myself/info"))
@end lisp
In XEmacs, as long as XEmacs can see the package, there should be no
need to do anything at all; the info files should be immediately
visible. However, you might want to set @env{INFOPATH} anyway, for the
sake of standalone readers outside of XEmacs. (The info files in XEmacs
are normally in @file{~/.xemacs/xemacs-packages/info}.)
@subheading Making the @LaTeX{} style available
If you want others to be able to share your installation, you should
configure it using @samp{--without-texmf-dir}, in which case things
should work as well for them as for you.
@ifclear rawfile
@node Installation under MS Windows
@section Installation under MS Windows
@include wininstall.texi
@end ifclear
@node Customizing
@section Customizing
@cindex Site initialization
@cindex Initialization
@cindex @file{tex-site.el}
@cindex Personal customization
@cindex Site customization
@cindex Customization
@cindex Customization, personal
@cindex Customization, site
Most of the site-specific customization should already have happened
during configuration of @AUCTeX{}. Any further customization can be
done with customization buffers directly in Emacs. Just type @kbd{M-x
customize-group RET AUCTeX RET} to open the customization group for
@AUCTeX{} or use the menu entries provided in the mode menus. Editing
the file @file{tex-site.el} as suggested in former versions of @AUCTeX{}
should not be done anymore because the installation routine will
overwrite those changes.
You might check some variables with a special significance. They are
accessible directly by typing @kbd{M-x customize-variable RET <variable>
RET}.
@defopt TeX-macro-global
Directories containing the site's @TeX{} style files.
@end defopt
Normally, @AUCTeX{} will only allow you to complete macros and
environments which are built-in, specified in @AUCTeX{} style files or
defined by yourself. If you issue the @kbd{M-x
TeX-auto-generate-global} command after loading @AUCTeX{}, you will be
able to complete on all macros available in the standard style files
used by your document. To do this, you must set this variable to a list
of directories where the standard style files are located. The
directories will be searched recursively, so there is no reason to list
subdirectories explicitly. Automatic configuration will already have
set the variable for you if it could use the program @samp{kpsewhich}.
In this case you normally don't have to alter anything.
@c Local Variables:
@c mode: texinfo
@c TeX-master: "auctex"
@c End:

View File

@@ -0,0 +1,106 @@
@include macros.texi
@ifset rawfile
@paragraphindent none
This is the README file for the AUCTeX distribution.
@quotation
Copyright (C) 2008 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification, are
permitted in any medium without royalty provided the copyright notice
and this notice are preserved.
@end quotation
@chapheading Introduction to @AUCTeX{}
@end ifset
@ifclear rawfile
@node Summary
@chapter Overview of @AUCTeX{}
@end ifclear
@ifset rawfile
This file gives a brief overview of what @AUCTeX{} is. It is
@strong{not} an attempt to document @AUCTeX{}. Real documentation for
@AUCTeX{} is available in the manual, which should be available as an
info file after installation.
@end ifset
@AUCTeX{} is a comprehensive customizable integrated environment for
writing input files for @TeX{}, @LaTeX{}, @ConTeXt{}, Texinfo, and
doc@TeX{} using Emacs or XEmacs.
It supports you in the insertion of macros, environments, and sectioning
commands by providing completion alternatives and prompting for
parameters. It automatically indents your text as you type it and lets
you format a whole file at once. The outlining and folding facilities
provide you with a focused and clean view of your text.
@AUCTeX{} lets you process your source files by running @TeX{} and
related tools (such as output filters, post processors for generating
indices and bibliographies, and viewers) from inside Emacs. @AUCTeX{}
lets you browse through the errors @TeX{} reported, while it moves the
cursor directly to the reported error, and displays some documentation
for that particular error. This will even work when the document is
spread over several files.
One component of @AUCTeX{} that @LaTeX{} users will find attractive is
@previewlatex{}, a combination of folding and in-source previewing
that provides true ``What You See Is What You Get'' experience in your
sourcebuffer, while letting you retain full control.
@ifset rawfile
For more information, see further below.
@end ifset
More detailed information about the features and usage of @AUCTeX{} can
be found in the
@ifset rawfile
@AUCTeX{} manual. You can access it from within Emacs by typing
@kbd{C-h i d m auctex @key{RET}}. If you prefer the standalone info
reader, issue the command @code{info auctex} in a terminal.
@end ifset
@ifclear rawfile
remainder of this manual.
@end ifclear
@AUCTeX{} is written entirely in Emacs Lisp, and hence you can easily
add new features for your own needs. It is a GNU project and
distributed under the `GNU General Public License Version 3'.
The most recent version is always available at
@url{http://ftp.gnu.org/pub/gnu/auctex/}.
WWW users may want to check out the @AUCTeX{} page at
@url{http://www.gnu.org/software/auctex/}.
For comprehensive information about how to install @AUCTeX{}
@ifset rawfile
read the file @file{INSTALL} or @file{INSTALL.windows}, respectively.
@end ifset
@ifclear rawfile
@xref{Installation}, or @ref{Installation under MS Windows},
respectively.
@end ifclear
If you are considering upgrading @AUCTeX{}, the recent changes are
described in
@ifset rawfile
the @file{CHANGES} file.
@end ifset
@ifclear rawfile
@ref{Changes}.
@end ifclear
If you want to discuss @AUCTeX{} with other users or its developers,
there are several mailing lists you can use.
Send a mail with the subject ``subscribe'' to
@email{auctex-request@@gnu.org} in order to join the general discussion
list for @AUCTeX{}. Articles should be sent to @email{auctex@@gnu.org}.
In a similar way, you can subscribe to the @email{info-auctex@@gnu.org}
list for just getting important announcements about @AUCTeX{}. The list
@email{bug-auctex@@gnu.org} is for bug reports which you should usually
file with the @kbd{M-x TeX-submit-bug-report @key{RET}} command. If you
want to address the developers of @AUCTeX{} themselves with technical
issues, they can be found on the discussion list
@email{auctex-devel@@gnu.org}.

View File

@@ -0,0 +1,89 @@
@ifclear macros
@set macros
@ifnottex
@macro AUCTeX {}
AUC@TeX{}
@end macro
@macro ConTeXt {}
Con@TeX{}t
@end macro
@macro previewlatex {}
preview-latex
@end macro
@macro fontlatex {}
font-latex
@end macro
@ifset no-acronym
@clear no-acronym
@macro acronym {text}
@sc{\text\}
@end macro
@end ifset
@ifset no-env
@clear no-env
@macro env {text}
@code{\text\}
@end macro
@end ifset
@ifset no-option
@clear no-option
@macro option {text}
@samp{\text\}
@end macro
@end ifset
@ifset no-command
@clear no-command
@macro command {text}
@samp{\text\}
@end macro
@end ifset
@end ifnottex
@ifset no-sansserif
@macro sansserif {text}@c
@iftex
{@textsf \text\}@c
@end iftex
@ifnottex
\text\@c
@end ifnottex
@end macro
@end ifset
@tex
\global\let\savedTeX\TeX
\gdef\TeX#1{\savedTeX#1}
\gdef\LaTeX{%
L\kern-.36em\raise.3ex\hbox{\sc{a}}\kern-.15em\TeX}
\gdef\previewlatex#1{%
{\sf preview-latex}#1}
\gdef\fontlatex#1{%
{\sf font-latex}#1}
\gdef\AUCTeX{AUC\TeX}
\gdef\ConTeXt#1{%
Con\TeX t#1}
\toks0\expandafter{\indexnofonts
\def\TeX#1{TeX#1}%
\def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
\xdef\indexnofonts{\the\toks0}
\ifx\commondummies\undefined \else
\toks0\expandafter{\commondummies
\def\TeX#1{TeX#1}%
\def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
\xdef\commondummies{\the\toks0}
\fi
\ifx\definedummies\undefined \else
\toks0\expandafter{\definedummies
\def\TeX#1{TeX#1}%
\def\LaTeX#1{LaTeX#1}\def\previewlatex#1{preview-latex#1}}
\xdef\definedummies{\the\toks0}
\fi
\ifx\acronym\undefined \gdef\acronym#1{{\smallcaps \lowercase{#1}}} \fi
\ifx\env\undefined \global\let\env=\code \fi
\ifx\option\undefined \global\let\option=\samp \fi
\ifx\command\undefined \global\let\command=\samp \fi
%Bug fix for texinfo.tex:
\gdef\cslet#1#2{%
\expandafter\let
\csname#1\expandafter\endcsname
\csname#2\endcsname}
@end tex
@end ifclear

View File

@@ -0,0 +1,152 @@
#!/usr/bin/perl
# Autoconverter from preview.dtx to preview-dtxdoc.texi
# Author: Jan-<2D>ke Larsson <jalar@mai.liu.se>
# Maintainer: auctex-devel@gnu.org
# Copyright (C) 2002, 2005 Free Software Foundation, Inc.
# This file is part of AUCTeX.
# AUCTeX 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 3, or (at your option)
# any later version.
# AUCTeX 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 AUCTeX; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
# Commentary:
# Simpleminded autoconverter from preview.dtx to preview-dtxdoc.texi
# run as 'perl preview-dtxdoc.pl ../latex/preview.dtx preview-dtxdoc.texi'
die "Usage: perl preview-dtxdoc.pl infile outfile" unless ($#ARGV == 1);
open(STDIN, $ARGV[0]) || die "Can't open $ARGV[0] for reading";
open(STDOUT, "> $ARGV[1]") || die "Can't open $ARGV[1] for writing";
# Eat header
MUNGE: while (<STDIN>) {
last MUNGE if /^% *.section/;
}
# Fish out possible CR characters.
/(\r*)$/;
$cr = $1;
# Noindent is used sometimes after \end{quote} (see below)
$noindent="";
# Quote environments is translated into @example _without_
# @code{..} inside (see below)
$quote="";
MAIN: while (<STDIN>) {
s/^%//;
s/\\%/%/g;
# Text-substitution macros
s/\@/\@\@/g;
s/\\#/#/g;
s/AUC~?\\TeX[\\ ]?/\@AUCTeX{}/g;
s/\\LaTeX[\\ ]?/\@LaTeX{}/g;
s/\\TeX[\\ ]?/\@TeX{}/g;
s/\\previewlatex[\\ ]?/\@previewlatex{}/g;
s/EPS/\@acronym{EPS}/g;
s/DVI/\@acronym{DVI}/g;
s/~/\@w{ }/g;
s/^ *//;
# Environments
if (s/\\begin\{quote\}/$cr\n\@example/) {
$quote="yes" }
if (/^\w/) {
print $noindent }
$noindent = "";
if (s/\\end\{quote\}/\@end example$cr\n/) {
$quote="";
$noindent="\@noindent$cr\n" }
s/\\begin\{description\}/$cr\n\@table \@w/;
# Convoluted pattern: handle
# \item[|...|], \item[\meta{..}] and \item[{|[]|}]
s/\\item\[\{?(.+?[\|\}])\}?\] ?/\@item $1$cr\n/;
s/\\end\{description\}/\@end table$cr\n/;
s/\\begin\{enumerate\}/$cr\n\@enumerate/;
s/\\item /\@item /;
s/\\end\{enumerate\}/\@end enumerate$cr\n/;
# Formatting (\cmd is special within {quote})
s/\\texttt/\@option/g;
s/\\marg\{([^}]+)\}/\@{\@var{$1}\@}/g;
s/\\meta/\@var/g;
s/\\emph/\@emph/g;
s/\\cmd(\\[\(\)\w]+)/|$1|/g;
s/\\cmd\{(.*?)\}/|$1|/g;
s/\\oarg\{([^}]+?)\}/\[\@var{$1}\]/g;
s/\\char.//g;
s/\\raggedright$cr\n//g;
s/\\DescribeEnv\{(.*?)\} /\@item \\begin\@{$1\@}\@dots{}\\end\@{$1\@}$cr\n/;
if (s/\\DescribeMacro\{(.*?)\}( |$cr\n)/\@item $1$cr\n/) {
# Index entries for two important macros
if (/(\\Preview(Macro|Environment))( |$cr\n)/) {
$_ .= "\@findex $1$cr\n";
}
}
# ||||||| Hell... I hate bars
# Braces WITHIN bars should be escaped like so: @{ @}
# and |..| translates to @code{..} or @file{..} depending on content
# and to .. if in {quote}
@chunks = split /\|/;
$odd=0;
COMMAND: foreach (@chunks) {
if ($odd==0) {
$odd=1;
} else {
s/\{/\@\{/g;
s/\}/\@\}/g;
if (! $quote) {
if (/[.\/]/) {
$_="\@file\{".$_."\}";
} else {
$_="\@code\{".$_."\}";
}
}
$odd=0;
}
}
$_=join("",@chunks);
# Argh! mixed types occurs in @code{...}@var{..}@file{..}
# Should be @file{...@var{..}..}
s/\@code(\S*?)\}(\S*)\@file\{/\@file$1$2/g;
# Texinfo @node-ification
if (s/\\section\{(.*)\}/\@subsection $1/) {
if (s/[Oo]ptions/options/) {
$_="\@menu$cr\n" .
"* Package options::$cr\n" .
"* Provided commands::$cr\n" .
"\@end menu$cr\n$cr\n" .
"\@node Package options, Provided commands, The LaTeX style file, The LaTeX style file$cr\n" . $_;
} elsif (s/[Cc]ommands/commands/) {
# \Describe... needs @table
$_= "\@node Provided commands, ,Package options, The LaTeX style file$cr\n" .
$_ . "$cr\n\@table \@code$cr\n";
}
}
# Stop here
# \Describe.... needs @end table
if (/^.StopEventually/) {
print "\@end table$cr\n";
last MAIN;
}
print $_;
}

View File

@@ -0,0 +1,340 @@
@c This is part of the preview-latex manual.
@c Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009 Free Software
@c Foundation, Inc.
@c See file preview-latex.texi for copying conditions.
@ifset rawfile
@include macros.texi
@node Frequently Asked Questions, Introduction to FAQ, (dir), (dir)
@top Frequently Asked Questions about @previewlatex{}
@contents
@end ifset
@menu
* Introduction to FAQ::
* Requirements::
* Installation Trouble::
* Customization::
* Troubleshooting::
* Other formats::
@end menu
@comment we need at least one chapter, or the numbers disappear in the
@comment plain version of the FAQ.
@ifset rawfile
@node Introduction to FAQ, Requirements, Frequently Asked Questions, Frequently Asked Questions
@chapter Introduction
@raisesections
@end ifset
@ifclear rawfile
@node Introduction to FAQ, Requirements, Frequently Asked Questions, Frequently Asked Questions
@section Introduction
@end ifclear
@subsection How can I contribute to the FAQ?
Send an email with the subject:
@example
Preview FAQ
@end example
to @email{auctex-devel@@gnu.org}.
@node Requirements, Installation Trouble, Introduction to FAQ, Frequently Asked Questions
@section Requirements
@subsection Which version of (X)Emacs is needed?
See also the table at the end of the section.
@previewlatex{} nominally requires @w{GNU Emacs} with a version of at
least 21.1. However, @w{Emacs 22} (currently under development) offers
superior performance and wider platform support, and is even now the
recommended platform to use.
While recent versions of @w{XEmacs 21.4} are supported, doing this in a
satisfactory manner has proven to be difficult due to technical
shortcomings and differing API's which are hard to come by. If
@previewlatex{} is an important part of your editing workflow, you are
likely to get better results and support by switching to Emacs. Of
course, you can improve support for your favorite editor by giving
feedback in case you encounter bugs.
@subsection Which versions of Ghostscript and @AUCTeX{} are needed?
We recommend to use GNU or AFPL Ghostscript with a version of at least
7.07.
@previewlatex{} has been distributed as part of @AUCTeX{} since version
11.80. If your version of @AUCTeX{} is older than that, or if it does
not contain a working copy of @previewlatex{}, complain to wherever you
got it from.
@subsection I have trouble with the display format...
We recommend keeping the variable @code{preview-image-type} set to
@code{dvipng} (if you have it installed) or @code{png}. This is the
default and can be set via the Preview/Customize menu.
All other formats are known to have inconveniences, either in file size
or quality. There are some Emacs versions around not supporting
@acronym{PNG}; the proper way to deal with that is to complain to your
Emacs provider. Short of that, checking out @acronym{PNM} or
@acronym{JPEG} formats might be a good way to find out whether the lack
of @acronym{PNG} format support might be the only problem with your
Emacs.
@subsection For which OS does preview work?
It is known to work under the X Window System for Linux and for several
flavors of Unix: we have reports for HP and Solaris.
There are several development versions of Emacs around for native MacOS
Carbon, and @previewlatex{} is working with them, too.
With Windows, Cygwin and native ports of XEmacs should work.
@previewlatex{} will not work with any native version 21 of Emacs under
Windows: you need to get a hold of @w{Emacs 22} which is at the time of
this writing not released but available as a developer snapshot.
The entry "X11/Unix" currently means Linux, Solaris or HP/UX, as well as
the X-specific version for Mac/OSX.
@multitable {Win9x native} {Emacs version} {XEmacs version}
@item OS @tab Emacs version @tab XEmacs version
@item X11/Unix @tab 21.1 @tab 21.4.9
@item Win9x cygwin @tab 21.3.50? @tab 21.4.8
@item Win9x native @tab 22.1 @tab 21.4.8
@item MacOSX native @tab 22.1 @tab --
@end multitable
@node Installation Trouble, Customization, Requirements, Frequently Asked Questions
@section Installation Trouble
@subsection I just get @samp{LaTeX found no preview images}.
The reason for this is that @LaTeX{} found no preview images in the
document in question.
One reason might be that there are no previews to be seen. If you have
not used @previewlatex{} before, you might not know its manner of
operation. One sure-fire way to test if you just have a document where
no previews are to be found is to use the provided example document
@file{circ.tex} (you will have to copy it to some directory where you
have write permissions). If the symptom persists, you have a problem,
and the problem is most likely a @LaTeX{} problem. Here are possible
reasons:
@table @asis
@item Filename database not updated
Various @TeX{} distributions have their own ways of knowing where the
files are without actually searching directories. The normal
@previewlatex{} installation should detect common tools for that purpose
and use them. If this goes wrong, or if the files get installed into a
place where they are not looked for, the @LaTeX{} run will fail.
@item An incomplete manual installation
This should not happen if you followed installation instructions.
Unfortunately, people know better all the time. If only
@file{preview.sty} gets installed without a set of supplementary files
also in the @file{latex} subdirectory, @previewlatex{} runs will not
generate any errors, but they will not produce any previews, either.
@item An outdated @file{preview} installation
The @file{preview.sty} package is useful for more than just
@previewlatex{}. For example, it is part of @TeX{}live. So you have
to make sure that @previewlatex{} does not get to work with outdated
style and configuration files: some newer features will not work with
older @TeX{} style files, and really old files will make
@previewlatex{} fail completely. There usual is a local @file{texmf}
tree, or even a user-specific tree that are searched before the default
tree. Make sure that the first version of those files that gets found
is the correct one.
@end table
@subsection I have problems with the XEmacs installation
Please note that the XEmacs installation is different, since XEmacs has
a package system that gets used here. Please make sure that you read
and follow the installation instructions for XEmacs.
@node Customization, Troubleshooting, Installation Trouble, Frequently Asked Questions
@section Customization
@subsection Why don't I get balloon help like in the screen shots?
Some users have reported problems with their XEmacs version, so balloon
help is no longer switched on by default. Use the Preview/Customize
menu or @kbd{@key{M-x} customize-variable} in order to customize
@code{preview-use-balloon-help} to `On'. This only concerns XEmacs:
tooltips under @w{GNU Emacs} are enabled by default and unproblematic.
@subsection How to include additional environments like @code{enumerate}
By default, @previewlatex{} is intended mainly for displaying
mathematical formulas, so environments like @code{enumerate} or
@code{tabular} (except where contained in a float) are not included.
You can include them however manually by adding the lines:
@example
\usepackage[displaymath,textmath,sections,graphics,floats]@{preview@}
\PreviewEnvironment@{enumerate@}
@end example
in your document header, that is before
@example
\begin@{document@}
@end example
@noindent
In general, @file{preview} should be loaded as the last thing before
the start of document.
Be aware that
@example
\PreviewEnvironment@{...@}
@end example
does not accept a comma separated
list! Also note that by putting more and more
@example
\PreviewEnvironment@{...@}
@end example
in your document, it will look more and more like a @acronym{DVI} file
preview when running @previewlatex{}. Since each preview is treated as
one large monolithic block by Emacs, one should really restrict
previews to those elements where the improvement in visual
representation more than makes up for the decreased editability.
@subsection What if I don't want to change the document?
The easiest way is to generate a configuration file in the current
directory. You can basically either create @file{prdefault.cfg} which
is used for any use of the @samp{preview} package, or you can use
@file{prauctex.cfg} which only applies to the use from with Emacs. Let
us assume you use the latter. In that case you should write something like
@example
\InputIfFileExists@{preview/prauctex.cfg@}@{@}@{@}
\PreviewEnvironment@{enumerate@}
@end example
in it. The first line inputs the system-wide default configuration
(the file name should match that, but not your own
@file{prauctex.cfg}), then you add your own stuff.
@subsection Suddenly I get gazillions of ridiculous pages?!?
When @previewlatex{} works on extracting its stuff, it typesets each
single preview on a page of its own. This only happens when actual
previews get generated. Now if you want to configure @previewlatex{} in
your document, you need to add your own @code{\usepackage} call to
@samp{preview} so that it will be able to interpret its various
definition commands. It is an error to add the @code{active} option to
this invocation: you don't want the package to be active unless
@previewlatex{} itself enables the previewing operation (which it will).
@subsection Does @previewlatex{} work with presentation classes?
@previewlatex{} should work with most presentation classes. However,
since those classes often have macros or pseudo environments
encompassing a complete slide, you will need to use the customization
facilities of @file{preview.sty} to tell it how to resolve this, whether
you want no previews, previews of whole slides or previews of inner
material.
@node Troubleshooting, Other formats, Customization, Frequently Asked Questions
@section Troubleshooting
@subsection Preview causes all sort of strange error messages
When running @previewlatex{} and taking a look at either log file or
terminal output, lots of messages like
@example
! Preview: Snippet 3 started.
<-><->
l.52 \item Sie lassen sich als Funktion $
y = f(x)$ darstellen.
! Preview: Snippet 3 ended.(491520+163840x2494310).
<-><->
l.52 \item Sie lassen sich als Funktion $y = f(x)$
darstellen.
@end example
appear (previous versions generated messages looking even more like
errors). Those are not real errors (as will be noted in the log
file). Or rather, while they @strong{are} really @TeX{} error
messages, they are intentional. This currently is the only reliable
way to pass the information from the @LaTeX{} run of @previewlatex{} to
its Emacs part about where the previews originated in the source text.
Since they are actual errors, you will also get @AUCTeX{} to state
@example
Preview-LaTeX exited as expected with code 1 at Wed Sep 4 17:03:30
@end example
after the @LaTeX{} run in the run buffer. This merely indicates that
errors were present, and errors will always be present when
@previewlatex{} is operating. There might be also real errors, so in
case of doubt, look for them explicitly in either run buffer or the
resulting @file{.log} file.
@subsection Why do my @acronym{DVI} and @acronym{PDF} output files vanish?
In order to produce the preview images @previewlatex{} runs @LaTeX{} on
the master or region file. The resulting @acronym{DVI} or @acronym{PDF}
file can happen to have the same name as the output file of a regular
@LaTeX{} run. So the regular output file gets overwritten and is
subsequently deleted by @previewlatex{}.
@subsection My output file suddenly only contains preview images?!
As mentioned in the previews @acronym{FAQ} entry, @previewlatex{} might
use the file name of the original output file for the creation of
preview images. If the original output file is being displayed with a
viewer when this happens, you might see strange effects depending on the
viewer, e.g. a message about the file being corrupted or the display of
all the preview images instead of your typeset document. (Also
@xref{Customization}.)
@node Other formats, , Troubleshooting, Frequently Asked Questions
@section @previewlatex{} when not using @LaTeX{}
@subsection Does @previewlatex{} work with PDF@LaTeX{}?
Yes, as long as you use @AUCTeX{}'s own PDF@LaTeX{} mode and have not
messed with @samp{TeX-command-list}.
@subsection Does @previewlatex{} work with @samp{elatex}?
No problem here. If you configure your @AUCTeX{} to use @samp{elatex},
or simply have @samp{latex} point to @samp{elatex}, this will work fine.
Modern @TeX{} distributions use e@TeX{} for @LaTeX{}, anyway.
@subsection Does @previewlatex{} work with @ConTeXt{}?
In short, no. The @samp{preview} package is
@LaTeX{}-dependent. Adding support for other formats requires
volunteers.
@subsection Does @previewlatex{} work with plain TeX?
Again, no. Restructuring the @samp{preview} package for @samp{plain}
operation would be required. Volunteers welcome.
In some cases you might get around by making a wrapper pseudo-Master
file looking like the following:
@example
\documentclass@{article@}
\usepackage@{plain@}
\begin@{document@}
\begin@{plain@}
\input myplainfile
\end@{plain@}
\end@{document@}
@end example

View File

@@ -0,0 +1,841 @@
\input texinfo
@comment %**start of header
@setfilename preview-latex.info
@include version.texi
@settitle preview-latex @value{VERSION}
@comment %**end of header
@include macros.texi
@copying
This manual is for preview-latex, a @LaTeX{} preview mode for @AUCTeX{}
(version @value{VERSION} from @value{UPDATED}).
Copyright @copyright{} 2001, 2002, 2003,
2004, 2005, 2006 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A
copy of the license is included in the section entitled ``GNU Free
Documentation License.''
@end quotation
@end copying
@dircategory Emacs
@direntry
* preview-latex: (preview-latex). Preview LaTeX fragments in Emacs
@end direntry
@dircategory TeX
@direntry
* preview-latex: (preview-latex). Preview LaTeX fragments in Emacs
@end direntry
@c footnotestyle separate
@c paragraphindent 2
@syncodeindex vr cp
@syncodeindex ky cp
@syncodeindex fn cp
@iftex
@tolerance 10000 @emergencystretch 3em
@end iftex
@finalout
@titlepage
@title @previewlatex{}
@subtitle A @LaTeX{} preview mode for @AUCTeX{} in Emacs.
@subtitle Version @value{VERSION}, @value{UPDATED}
@author Jan-@AA{}ke Larsson
@author David Kastrup and others
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage
@c @summarycontents
@contents
@c Use @ifinfo _and_ @ifhtml here because Texinfo 3 cannot cope with
@c @ifnottex around a top node.
@ifinfo
@node top, , (dir), (dir)
@top @previewlatex{}
This manual may be copied under the conditions spelled out in
@ref{Copying this Manual}.
@end ifinfo
@ifhtml
@node top, Copying, (dir), (dir)
@top @previewlatex{}
@insertcopying
@end ifhtml
@contents
@iftex
@unnumbered @previewlatex{}
@end iftex
@previewlatex{} is a package embedding preview fragments into Emacs
source buffers under the @AUCTeX{} editing environment for @LaTeX{}. It
uses @file{preview.sty} for the extraction of certain environments (most
notably displayed formulas). Other applications of this style file are
possible and exist.
The name of the package is really @samp{preview-latex}, all in
lowercase letters, with a hyphen. If you typeset it, you can use a
sans-serif font to visually offset it.
@menu
* Copying:: Copying
* Introduction:: Getting started.
* Installation:: Make Install.
* Keys and lisp:: Key bindings and user-level lisp functions.
* Simple customization:: To make it fit in.
* Known problems:: When things go wrong.
* For advanced users:: Internals and more customizations.
* ToDo:: Future development.
* Frequently Asked Questions:: All about @previewlatex{}
* Copying this Manual:: GNU Free Documentation License
* Index:: A menu of many topics.
@end menu
@node Copying, Introduction, top, top
@unnumbered Copying
@cindex Copying
@cindex Copyright
@cindex GPL
@cindex General Public License
@cindex License
@cindex Free
@cindex Free software
@cindex Distribution
@cindex Right
@cindex Warranty
For the conditions for copying parts of @previewlatex{}, see the General
Public Licenses referres to in the copyright notices of the files, the
General Public Licenses accompanying them and the explanatory section in
@ref{Copying,,,auctex,the @AUCTeX{} manual}.
This manual specifically is covered by the GNU Free Documentation
License (@pxref{Copying this Manual}).
@node Introduction, Installation, Copying, top
@c Used as @file{README} as well: in separate file
@chapter Introduction
@include preview-readme.texi
@node Installation, Keys and lisp, Introduction, top
@chapter Installation
Installation is now being covered in
@ref{Installation,,,auctex,the @AUCTeX{} manual}.
@node Keys and lisp, Simple customization, Installation, top
@chapter Key bindings and user-level lisp functions
@cindex Menu entries
@previewlatex{} adds key bindings starting with @kbd{C-c C-p} to the
supported modes of @AUCTeX{} (@inforef{Key Index,,auctex}). It will
also add its own @samp{Preview} menu in the menu bar, as well as an icon
in the toolbar.
The following only describes the interactive use: view the documentation
strings with @kbd{C-h f} if you need the Lisp information.
@table @w
@item @kbd{C-c C-p C-p}
@itemx @code{preview-at-point}
@itemx Preview/Generate previews (or toggle) at point
If the cursor is positioned on or inside of a preview area, this
toggles its visibility, regenerating the preview if necessary. If not,
it will run the surroundings through preview. The surroundings include
all areas up to the next valid preview, unless invalid previews occur
before, in which case the area will include the last such preview in
either direction. And overriding any other
action, if a region is active (@code{transient-mark-mode} or
@code{zmacs-regions}), it is run through @code{preview-region}.
@kindex @kbd{C-c C-p C-p}
@findex preview-at-point
@item @kbd{<mouse-2>}
The middle mouse button has a similar action bound to it as
@code{preview-at-point}, only that it knows which preview to apply it to
according to the position of the click. You can click either anywhere
on a previewed image, or when the preview is opened and showing the
source text, you can click on the icon preceding the source text. In
other areas, the usual mouse key action (typically: paste) is not
affected.
@item @kbd{<mouse-3>}
The right mouse key pops up a context menu with several options:
toggling the preview, regenerating it, removing it (leaving the
unpreviewed text), copying the text inside of the preview, and copying
it in a form suitable for copying as an image into a mail or news
article. This is a one-image variant of the following command:
@item @kbd{C-c C-p C-w}
@itemx @code{preview-copy-region-as-mml}
@itemx Copy a region as MML
@kindex @kbd{C-c C-p C-w}
@findex preview-copy-region-as-mml
This command is also available as a variant in the context menu on the
right mouse button (where the region is the preview that has been
clicked on). It copies the current region into the kill buffer in a
form suitable for copying as a text including images into a mail or news
article using mml-mode (@pxref{Composing,,Composing,emacs-mime,Emacs
MIME}).
If you regenerate or otherwise kill the preview in its source buffer
before the mail or news gets posted, this will fail. Also you should
generate images you want to send with @code{preview-transparent-border}
@vindex preview-transparent-border
set to @code{nil}, or the images will have an ugly border.
@previewlatex{} detects this condition and asks whether to regenerate
the region with borders switched off. As this is an asynchronous
operation running in the background, you'll need to call this command
explicitly again to get the newly generated images into the kill ring.
Preview your articles with @code{mml-preview} (on @kbd{M-m P}, or
@kbd{C-c C-m P} in @w{Emacs 22})
@kindex @kbd{M-m P}
@kindex @kbd{C-c C-m P}
to make sure they look fine.
@item @kbd{C-c C-p C-e}
@itemx @code{preview-environment}
@itemx Preview/Generate previews for environment
Run preview on @LaTeX{} environment. The environments in
@code{preview-inner-environments} are treated as inner levels so that
for instance, the @code{split} environment in
@code{\begin@{equation@}\begin@{split@}@dots{}\end@{split@}\end@{equation@}}
is properly displayed. If called with a numeric argument, the
corresponding number of outward nested environments is treated as inner
levels.
@kindex @kbd{C-c C-p C-e}
@findex preview-environment
@item @kbd{C-c C-p C-s}
@itemx @code{preview-section}
@itemx Preview/Generate previews for section
Run preview on this @LaTeX{} section.
@kindex @kbd{C-c C-p C-s}
@findex preview-section
@item @kbd{C-c C-p C-r}
@itemx @code{preview-region}
@itemx Preview/Generate previews for region
Run preview on current region.
@kindex @kbd{C-c C-p C-r}
@findex preview-region
@item @kbd{C-c C-p C-b}
@itemx @code{preview-buffer}
@itemx Preview/Generate previews for buffer
Run preview on the current buffer.
@kindex @kbd{C-c C-p C-b}
@findex preview-buffer
@item @kbd{C-c C-p C-d}
@itemx @code{preview-document}
@itemx Preview/Generate previews for document
Run preview on the current document.
@kindex @kbd{C-c C-p C-d}
@findex preview-document
@item @kbd{C-c C-p C-c C-p}
@itemx @code{preview-clearout-at-point}
@itemx Preview/Remove previews at point
@kindex @kbd{C-c C-p C-c C-p}
@findex preview-clearout-at-point
Clear out (remove) the previews that are immediately adjacent to point.
@item @kbd{C-c C-p C-c C-s}
@itemx @code{preview-clearout-section}
@itemx Preview/Remove previews from section
@kindex @kbd{C-c C-p C-c C-s}
@findex preview-clearout-document
Clear out all previews in current section.
@item @kbd{C-c C-p C-c C-r}
@itemx @code{preview-clearout}
@itemx Preview/Remove previews from region
@kindex @kbd{C-c C-p C-c C-r}
@findex preview-clearout
Clear out all previews in the current region.
@item @kbd{C-c C-p C-c C-b}
@itemx @code{preview-clearout-buffer}
@itemx Preview/Remove previews from buffer
@kindex @kbd{C-c C-p C-c C-b}
@findex preview-clearout-buffer
Clear out all previews in current buffer. This makes the current buffer
lose all previews.
@item @kbd{C-c C-p C-c C-d}
@itemx @code{preview-clearout-document}
@itemx Preview/Remove previews from document
@kindex @kbd{C-c C-p C-c C-d}
@findex preview-clearout-document
Clear out all previews in current document. The document consists of
all buffers that have the same master file as the current buffer. This
makes the current document lose all previews.
@item @kbd{C-c C-p C-f}
@itemx @code{preview-cache-preamble}
@itemx Preview/Turn preamble cache on
@kindex @kbd{C-c C-p C-f}
@findex preview-cache-preamble
Dump a pregenerated format file. For the rest of the session, this file
is used when running on the same master file. Use this if you know your
@LaTeX{} takes a long time to start up, the speedup will be most
noticeable when generating single or few previews. If you change your
preamble, do this again. @previewlatex{} will try to detect the
necessity of that automatically when editing changes to the preamble are
done from within Emacs, but it will not notice if the preamble
effectively changes because some included file or style file is
tampered with.
@item @kbd{C-c C-p C-c C-f}
@itemx @code{preview-cache-preamble-off}
@itemx Preview/Turn preamble cache off
@kindex @kbd{C-u C-c C-p C-f}
@findex preview-cache-preamble-off
Clear the pregenerated format file and stop using preambles for the
current document. If the caching gives you problems, use this.
@item @kbd{C-c C-p C-i}
@itemx @code{preview-goto-info-page}
@itemx Preview/Read Documentation
@kindex @kbd{C-c C-p C-i}
@findex preview-goto-info-page
Read
@ifinfo
this
@end ifinfo
@ifnotinfo
the
@end ifnotinfo
info manual.
@item @kbd{M-x preview-report-bug @key{RET}}
@itemx @code{preview-report-bug}
@itemx Preview/Report Bug
@kindex @kbd{M-x preview-report-bug @key{RET}}
@findex preview-report-bug
@cindex Report a bug
This is the preferred way of reporting bugs as it will fill in what
version of @previewlatex{} you are using as well as versions of
relevant other software, and also some of the more important
settings. Please use this method of reporting, if at all possible and
before reporting a bug, have a look at @ref{Known problems}.
@item @kbd{C-c C-k}
@itemx LaTeX/TeX Output/Kill Job
@kindex @kbd{C-c C-k}
@cindex Kill preview-generating process
Kills the preview-generating process. This is really an @AUCTeX{}
keybinding, but it is included here as a hint. If you are generating
a preview and then make a change to the buffer, @previewlatex{} may be
confused and place the previews wrong.
@end table
@node Simple customization, Known problems, Keys and lisp, top
@chapter Simple customization
Customization options can be found by typing @kbd{M-x customize-group
@key{RET} preview @key{RET}}. Remember to set the option when you have
changed it. The list of suggestions can be made very long (and is
covered in detail in @ref{For advanced users}), but some are:
@itemize @bullet
@item Change the color of the preview background
If you use a non-white background in Emacs, you might have color
artifacts at the edges of your previews. Playing around with the option
@code{preview-transparent-color} in the @code{Preview Appearance} group
might improve things. With some settings, the cursor may cover the
whole background of a preview, however.
This option is specific to the display engine in use. Its default is
different in @w{Emacs 21} and @w{Emacs 22}, and it is not available in
XEmacs.
@item Showing @code{\label}s
@cindex Showing @code{\label}s
When using @previewlatex{}, the @code{\label}s are hidden by the
previews. It is possible to make them visible in the output
by using the @LaTeX{} package @code{showkeys} alternatively
@code{showlabels}. However, the boxes of these labels will be outside
the region @previewlatex{} considers as the preview image. To enable a
similar mechanism internal to @previewlatex{}, enable the
@code{showlabels} option in the variable
@code{preview-default-option-list} in the @code{Preview Latex} group.
It must be noted, however, that a much better idea may be to use the
Ref@TeX{} package for managing references. @xref{RefTeX in a
Nutshell,,RefTeX in a Nutshell,reftex,The Ref@TeX{} Manual}.
@item Open previews automatically
The current default is to open previews automatically when you enter
them with cursor left/right motions. Auto-opened previews will close
again once the cursor leaves them again (this is also done when doing
incremental search, or query-replace operations), unless you changed
anything in it. In that case, you will have to regenerate the preview
(via e.g., @kbd{C-c C-p C-p}). Other options for
@code{preview-auto-reveal} are available via @code{customize}.
@item Automatically cache preambles
Currently @previewlatex{} asks you whether you want to cache the
document preamble (everything before @code{\begin@{document@}}) before
it generates previews for a buffer the first time. Caching the preamble
will significantly speed up regeneration of previews. The larger your
preamble is, the more this will be apparent. Once a preamble is cached,
@previewlatex{} will try to keep track of when it is changed, and dump
a fresh format in that case. If you experience problems with this, or
if you want it to happen without asking you the first time, you can
customize the variable @code{preview-auto-cache-preamble}.
@vindex preview-auto-cache-preamble
@cindex Caching a preamble
@item Attempt to keep counters accurate when editing
@vindex preview-preserve-counters
@vindex preview-required-option-list
Since @previewlatex{} frequently runs only small regions through
@LaTeX{}, values like equation counters are not consistent from run to
run. If this bothers you, customize the variable
@code{preview-preserve-counters} to @code{t} (this is consulted by
@code{preview-required-option-list}). @LaTeX{} will then output a load
of counter information during compilation, and this information will be
used on subsequent updates to keep counters set to useful values. The
additional information takes additional time to analyze, but this is
relevant mostly only when you are regenerating all previews at once, and
maybe you will be less tempted to do so when counters appear more or
less correct.
@item Preview your favourite @LaTeX{} constructs
If you have a certain macro or environment that you want to preview,
first check if it can be chosen by cutomizing
@code{preview-default-options-list} in the @code{Preview Latex} group.
If it is not available there, you can add it to
@code{preview-default-preamble} also in the @code{Preview Latex} group,
by adding a @code{\PreviewMacro} or @code{\PreviewEnvironment} entry
(@pxref{Provided commands}) @emph{after} the @code{\RequirePackage}
line. For example, if you want to preview the @code{center}
environment, press the @key{Show} button and the last @key{INS} button,
then add
@example
\PreviewEnvironment@{center@}
@end example
@noindent
in the space that just opened. Note that since @code{center} is a
generic formatting construct of @LaTeX{}, a general configuration like
that is not quite prudent. You better to do this on a per-document
base so that it is easy to disable this behavior when you find this
particular entry gives you trouble.
One possibility is to save such settings in the corresponding file-local
variable instead of your global configuration (@pxref{File
Variables,,Local Variables in Files,emacs,GNU Emacs Manual}). A perhaps
more convenient place for such options would be in a configuration file
in the same directory with your project (@pxref{Package options}).
The usual file for @previewlatex{} preconfiguration is
@file{prauctex.cfg}. If you also want to keep the systemwide defaults,
you should add a line
@example
\InputIfFileExists@{preview/prauctex.cfg@}@{@}@{@}
@end example
@noindent
to your own version of @file{prauctex.cfg} (this is assuming that
global files relating to the @code{preview} package are installed in a
subdirectory @file{preview}, the default behavior).
@item Don't preview inline math
@cindex Inline math
If you have performance problems because your document is full of inline
math (@code{$@dots{}$}), or if your usage of @code{$} conflicts with
@previewlatex{}'s, you can turn off inline math previews. In the
@code{Preview Latex} group, remove @code{textmath} from
@code{preview-default-option-list} by customizing this variable.
@end itemize
@node Known problems, For advanced users, Simple customization, top
@chapter Known problems
@c also used as PROBLEMS file
@include preview-problems.texi
@node For advanced users, ToDo, Known problems, top
@chapter For advanced users
This package consists of two parts: a @LaTeX{} style that splits the
output into appropriate parts with one preview object on each page, and
an Emacs-lisp part integrating the thing into Emacs (aided by
@AUCTeX{}).
@menu
* The LaTeX style file::
* The Emacs interface::
* The preview images::
* Misplaced previews::
@end menu
@node The LaTeX style file, The Emacs interface, For advanced users, For advanced users
@section The @LaTeX{} style file
@c Autogenerated from ../preview.dtx
@include preview-dtxdoc.texi
@node The Emacs interface, The preview images, The LaTeX style file, For advanced users
@section The Emacs interface
You can use @kbd{M-x customize-group @key{RET} preview-latex @key{RET}}
in order to customize these variables, or use the menus for it. We
explain the various available options together with explaining how they
work together in making @previewlatex{} work as intended.
@vtable @code
@item preview-LaTeX-command
When you generate previews on a buffer or a region, the command in
@code{preview-LaTeX-command} gets run (that variable should only be
changed with Customize since its structure is somewhat peculiar, though
expressive). As usual with @AUCTeX{}, you can continue working while
this is going on. It is not a good idea to change the file until after
@previewlatex{} has established where to place the previews which it can
only do after the @LaTeX{} run completes. This run produces a host of
pseudo-error messages that get parsed by @previewlatex{} at the end of
the @LaTeX{} run and give it the necessary information about where in
the source file the @LaTeX{} code for the various previews is located
exactly. The parsing takes a moment and will render Emacs busy.
@item preview-LaTeX-command-replacements
This variable specifies transformations to be used before calling the
configured command. One possibility is to have @samp{\pdfoutput=0 }
appended to every command starting with @samp{pdf}. This particular
setting is available as the shortcut
@samp{preview-LaTeX-disable-pdfoutput}. Since @previewlatex{} can work
with @acronym{PDF} files by now, there is little incentive for using
this option, anymore (for projects not requiring @acronym{PDF} output,
the added speed of @samp{dvipng} might make this somewhat attractive).
@item preview-required-option-list
@code{preview-LaTeX-command} uses @code{preview-required-option-list} in
order to pass options such as @option{auctex}, @option{active} and
@option{dvips} to the @file{preview} package. This means that the user
need (and should) not supply these in the document itself in case he
wants to be able to still compile his document without it turning into
an incoherent mass of little pictures. These options even get passed
in when the user loads @file{preview} explicitly in his document.
The default includes an option @code{counters} that is controlled by the
boolean variable
@item preview-preserve-counters
This option will cause the @file{preview} package to emit information
that will assist in keeping things like equation counters and section
numbers reasonably correct even when you are regenerating only single
previews.
@item preview-default-option-list
@itemx preview-default-preamble
If the document does not call in the package @code{preview} itself (via
@code{\usepackage}) in the preamble, the preview package is loaded using
default options from @code{preview-default-option-list} and additional
commands specified in @code{preview-default-preamble}.
@item preview-fast-conversion
This is relevant only for @acronym{DVI} mode. It defaults to `On' and
results in the whole document being processed as one large PostScript
file from which the single images are extracted with the help of parsing
the PostScript for use of so-called @acronym{DSC} comments. The
bounding boxes are extracted with the help of @TeX{} instead of getting
them from Dvips. If you are experiencing bounding box problems, try
setting this option to `Off'.
@item preview-prefer-TeX-bb
If this option is `On', it tells @previewlatex{} never to try to extract
bounding boxes from the bounding box comments of @acronym{EPS} files,
but rather rely on the boxes it gets from @TeX{}. If you activated
@code{preview-fast-conversion}, this is done, anyhow, since there are no
@acronym{EPS} files from which to read this information. The option
defaults to `Off', simply because about the only conceivable reason to
switch off @code{preview-fast-conversion} would be that you have some
bounding box problem and want to get Dvips' angle on that matter.
@item preview-scale-function
@itemx preview-reference-face
@itemx preview-document-pt-list
@itemx preview-default-document-pt
@code{preview-scale-function} determines by what factor
images should be scaled when appearing on the screen. If you specify a
numerical value here, the physical size on the screen will be that of
the original paper output scaled by the specified factor, at least if
Emacs' information about screen size and resolution are correct. The
default is to let @code{preview-scale-from-face} determine the scale
function. This function determines the scale factor by making the
size of the default font in the document match that of the on-screen
fonts.
The size of the screen fonts is deduced from the font
@code{preview-reference-face} (usually the default face used for
display), the size of the default font for the document is determined
by calling @code{preview-document-pt}.
@findex preview-document-pt
This function consults the members of @code{preview-document-pt-list} in
turn until it gets the desired information. The default consults first
@code{preview-parsed-font-size},
@vindex preview-parsed-font-size
then calls @code{preview-auctex-font-size}
@findex preview-auctex-font-size
which asks @AUCTeX{} about any size specification like @option{12pt} to
the documentclass that it might have detected when parsing the document, and
finally reverts to just assuming @code{preview-default-document-pt} as
the size used in the document (defaulting to 10pt).
If you find that the size of previews and the other Emacs display
clashes, something goes wrong. @code{preview-parsed-font-size} is
determined at @code{\begin@{document@}} time; if the default font size
changes after that, it will not get reported. If you have an outdated
version of @file{preview.sty} in your path, the size might not be
reported at all. If in this case @AUCTeX{} is unable to find a size
specification, and if you are using a document class with a different
default value (like KomaScript), the default fallback assumption will
probably be wrong and @previewlatex{} will scale up things too large.
So better specify those size options even when you know that @LaTeX{}
does not need them: @previewlatex{} might benefit from them. Another
possibility for error is that you have not enabled @AUCTeX{}'s document
parsing options. The fallback method of asking @AUCTeX{} about the size
might be disabled in future versions of @previewlatex{} since in
general it is more reliable to get this information from the @LaTeX{}
run itself.
@item preview-fast-dvips-command
@itemx preview-dvips-command
The regular command for turning a @acronym{DVI} file into a single
PostScript file is @code{preview-fast-dvips-command}, while
@code{preview-dvips-command} is used for cranking out a @acronym{DVI}
file where every preview is in a separate @acronym{EPS} file. Which of
the two commands gets used depends on the setting of
@code{preview-fast-conversion}. The printer specified here by default
is @option{-Pwww} by default, which will usually get you scalable fonts
where available. If you are experiencing problems, you might want to try
playing around with Dvips options (@inforef{Command-line options,,dvips}).
The conversion of the previews into PostScript or @acronym{EPS} files
gets started after the @LaTeX{} run completes when Emacs recognizes the
first image while parsing the error messages. When Emacs has finished
parsing the error messages, it activates all detected previews. This
entails throwing away any previous previews covering the same areas, and
then replacing the text in its visual appearance by a placeholder
looking like a roadworks sign.
@item preview-nonready-icon-specs
This is the roadworks sign displayed while previews are being prepared.
You may want to customize the font sizes at which @previewlatex{}
switches over between different icon sizes, and the ascent ratio which
determines how high above the base line the icon gets placed.
@item preview-error-icon-specs
@itemx preview-icon-specs
Those are icons placed before the source code of an opened preview and,
respectively, the image specs to be used for PostScript errors, and a
normal open preview in text representation.
@item preview-inner-environments
This is a list of environments that are regarded as inner levels of an
outer environment when doing @code{preview-environment}. One example
when this is needed is in
@code{\begin@{equation@}\begin@{split@}@dots{}\end@{split@}\end@{equation@}}, and
accordingly @code{split} is one entry in
@code{preview-inner-environments}.
@item preview-use-balloon-help
If you turn this XEmacs-only option `on', then moving the mouse over
previews and icons will show appropriate help texts. This works by
switching on @code{balloon-help-mode} in the buffer if it is not already
enabled. The default now is `off' since some users reported problems
with their version of XEmacs. @w{GNU Emacs} has its corresponding
@code{tooltip-mode} enabled by default and in usable condition.
@end vtable
@node The preview images, Misplaced previews, The Emacs interface, For advanced users
@section The preview images
@vtable @code
@item preview-image-type
@itemx preview-image-creators
@itemx preview-gs-image-type-alist
What happens when @LaTeX{} is finished depends on the configuration of
@code{preview-image-type}. What to do for each of the various settings
is specified in the variable @code{preview-image-creators}. The options
to pass into Ghostscript and what Emacs image type to use is specified
in @code{preview-gs-image-type-alist}.
@code{preview-image-type} defaults to @code{png}. For this to work,
your version of Ghostscript needs to support the @option{png16m} device.
If you are experiencing problems here, you might want to reconfigure
@code{gs-image-type-alist} or @code{preview-image-type}. Reconfiguring
@code{preview-image-creators} is only necessary for adding additional
image types.
Most devices make @previewlatex{} start up a single Ghostscript process
for the entire preview run (as opposed to one per image) and feed it
either sections of a @acronym{PDF} file (if PDF@LaTeX{} was used), or
(after running Dvips) sections of a single PostScript file or separate
@acronym{EPS} files in sequence for conversion into @acronym{PNG} format
which can be displayed much faster by Emacs. Actually, not in sequence
but backwards since you are most likely editing at the end of the
document. And as an added convenience, any preview that happens to be
on-screen is given higher priority so that @previewlatex{} will first
cater for the images that are displayed. There are various options
customizable concerning aspects of that operation, see the customization
group @code{Preview Gs} for this.
Another noteworthy setting of @code{preview-image-type} is
@samp{dvipng}: in this case, the @samp{dvipng}
@pindex dvipng
program will get run on @acronym{DVI} output (see below for @acronym{PDF}).
This is in general much faster than Dvips and Ghostscript. In that
case, the option
@item preview-dvipng-command
will get run for doing the conversion, and it is expected that
@item preview-dvipng-image-type
images get produced (@samp{dvipng} might be configured for other image
types as well). You will notice that @code{preview-gs-image-type-alist}
contains an entry for @code{dvipng}: this actually has nothing to with
@samp{dvipng} itself but specifies the image type and Ghostscript device
option to use when @samp{dvipng} can't be used. This will obviously be
the case for @acronym{PDF} output by PDF@LaTeX{}, but it will also happen
if the @acronym{DVI} file contains PostScript specials in which case the
affected images will get run through Dvips and Ghostscript once
@samp{dvipng} finishes.
@item preview-gs-options
Most interesting to the user perhaps is the setting of this variable.
It contains the default antialiasing settings @option{-dTextAlphaBits=4}
and @option{-dGraphicsAlphaBits=4}. Decreasing those values to 2 @w{or
1} might increase Ghostscript's performance if you find it lacking.
@end vtable
Running and feeding Ghostscript from @previewlatex{} happens
asynchronously again: you can resume editing while the images arrive.
While those pretty pictures filling in the blanks on screen tend to
make one marvel instead of work, rendering the non-displayed images
afterwards will not take away your attention and will eventually
guarantee that jumping around in the document will encounter only
prerendered images.
@node Misplaced previews, , The preview images, For advanced users
@section Misplaced previews
If you are reading this section, the first thing is to check that your
problem is not caused by x-symbol in connection with an installation not
supporting 8-bit characters (@pxref{x-symbol interoperation}). If not,
here's the beef:
As explained previously, Emacs uses pseudo-error messages generated by
the @samp{preview} package in order to pinpoint the exact source
location where a preview originated. This works in running text, but
fails when preview material happens to lie in macro arguments, like the
contents of @code{\emph}. Those macros first read in their entire
argument, munge it through, perhaps transform it somehow, process it and
perhaps then typeset something. When they finally typeset something,
where is the location where the stuff originated? @TeX{}, having read in
the entire argument before, does not know and actually there would be no
sane way of defining it.
For previews contained inside such a macro argument, the default
behaviour of @previewlatex{} is to use a position immediately after the
closing brace of the argument. All the previews get placed there, all at
a zero-width position, which means that Emacs displays it in an order
that @previewlatex{} cannot influence (currently in Emacs it is even
possible that the order changes between runs). And since the placement
of those previews is goofed up, you will not be able to regenerate them
by clicking on them. The default behaviour is thus somewhat undesirable.
The solution (like with other preview problems) is to tell the @LaTeX{}
@samp{preview} package how to tackle this problem (@pxref{The LaTeX
style file}). Simply, you don't need @code{\emph} do anything at all
during previews! You only want the text math previewed, so the solution
is to use @code{\PreviewMacro*\emph} in the preamble of your document
which will make @LaTeX{} ignore @code{\emph} completely as long as it is
not part of a larger preview (in which case it gets typeset as
usual). Its argument thus becomes ordinary text and gets treated like
ordinary text.
Note that it would be a bad idea to declare
@code{\PreviewMacro*[@{@{@}@}]\emph} since then both @code{\emph} as
well as its argument would be ignored instead of previewed. For
user-level macros, this is almost never wanted, but there may be
internal macros where you might want to ignore internal arguments.
The same mechanism can be used for a number of other text-formatting
commands like @code{\textrm}, @code{\textit} and the like. While they
all use the same internal macro @code{\text@@command}, it will not do to
redefine just that, since they call it only after having read their
argument in, and then it already is too late. So you need to disable
every of those commands by hand in your document preamble.
Actually, we wrote all of the above just to scare you. At least all of
the above mentioned macros and a few more are already catered for by a
configuration file @file{prauctex.cfg} that gets loaded by default
unless the @samp{preview} package gets loaded with the @option{noconfig}
option. You can make your own copy of this file in a local directory
and edit it in case of need. You can also add loading of a file of your
liking to @code{preview-default-preamble},
@vindex preview-default-preamble
or alternatively do the
manual disabling of your favorite macro in
@code{preview-default-preamble},
@vindex preview-default-preamble
which is customizable in the Preview Latex group.
@node ToDo, Frequently Asked Questions, For advanced users, top
@c Also used as TODO: in separate file
@appendix ToDo
@include preview-todo.texi
@node Frequently Asked Questions, Copying this Manual, ToDo, top
@c Also used as TODO: in separate file
@appendix Frequently Asked Questions
@include preview-faq.texi
@node Copying this Manual, Index, Frequently Asked Questions, top
@c Not to be changed often, I think: in separate file.
@appendix Copying this Manual
@ifinfo
The copyright notice for this manual is:
@insertcopying
@end ifinfo
The full license text can be read here:
@menu
* GNU Free Documentation License:: License for copying this manual.
@end menu
@include fdl.texi
@c @node Credits, Index, Internals, top
@c @appendix Credits
@node Index, , Copying this Manual, top
@unnumbered Index
@printindex cp
@bye

View File

@@ -0,0 +1,144 @@
@include macros.texi
@ifset rawfile
@c documentencoding is used by makeinfo in our --no-headers output.
@documentencoding ISO-8859-1
@node Known problems,,(dir),(dir)
@top Known problems with preview-latex
@end ifset
@c -----------------------
@c @cindex @kbd{M-x preview-report-bug @key{RET}}
@c @cindex @code{preview-report-bug}
@c @cindex Report a bug
A number of issues are known concerning the interoperation with various
other software. Some of the known problems can be solved by moving to
newer versions of the problematic software or by simple patches.
@menu
* Font problems with Dvips::
* Too small bounding boxes::
* x-symbol interoperation::
* Middle-clicks paste instead of toggling::
@end menu
If you find something not mentioned here, please send a bug report using
@kbd{M-x preview-report-bug @key{RET}}, which will fill in a lot of
information interesting to us and send it to the
@email{bug-auctex@@gnu.org} list. Please use the bug reporting commands
if at all possible.
@ifset rawfile
@node Font problems with Dvips
@chapter Font problems with Dvips
@raisesections
@end ifset
@ifclear rawfile
@node Font problems with Dvips
@section Font problems with Dvips
@end ifclear
Some fonts have been reported to produce wrong characters with
@previewlatex{}. @previewlatex{} calls Dvips by default with the option
@option{-Pwww} in order to get scalable fonts for nice results. If you
are using antialiasing, however, the results might be sufficiently nice
with bitmapped fonts, anyway. You might try @option{-Ppdf} for another
stab at scalable fonts, or other printer definitions. Use
@display
@kbd{M-x customize-variable @key{RET} preview-fast-dvips-command @key{RET}}
@end display
@noindent
and
@display
@kbd{M-x customize-variable @key{RET} preview-dvips-command @key{RET}}
@end display
@noindent
in order to customize this.
One particular problem is that several printer setup files (typically in
a file called @file{/usr/share/texmf/dvips/config/config.pdf} if you are
using the @option{-Ppdf} switch) contain the @option{G} option for
`character shifting'. This option will result in @samp{fi} being
rendered as @samp{@pounds{}} (British Pounds sign) in several fonts,
unless your version of Dvips has a long-standing bug in its
implementation fixed (only very recent versions of Dvips have).
@node Too small bounding boxes
@section Too small bounding boxes
The bounding box of a preview is determined by the @LaTeX{} package
using the pure @TeX{} bounding boxes. If there is material extending
outside of the @TeX{} box, that material will be missing from the
preview image. This happens for the label-showing boxes from
the @code{showkeys} package. This particular problem can be
circumvented by using the @code{showlabels} option of the preview
package.
In general, you should try to fix the problem in the @TeX{} code, like
avoiding drawing outside of the picture with PSTricks.
One possible remedy is to set
@code{preview-fast-conversion} to `Off'
@ifset rawfile
(see the manual).
@end ifset
@ifclear rawfile
(@pxref{The Emacs interface}).
@end ifclear
The conversion will take more time, but will then use the bounding boxes
from @acronym{EPS} files generated by Dvips.
Dvips generally does not miss things, but it does not understand
PostScript constructs like @code{\resizebox} or @code{\rotate} commands,
so will generate rather wrong boxes for those. Dvips can be helped with
the @code{psfixbb} package option to preview
@ifset rawfile
(see the manual),
@end ifset
@ifclear rawfile
(@pxref{The LaTeX style file}),
@end ifclear
which will tag the corners of the included @TeX{} box. This will mostly
be convenient for @emph{pure} PostScript stuff like that created by
PSTricks, which Dvips would otherwise reserve no space for.
@node x-symbol interoperation
@section x-symbol interoperation
Thanks to the work of Christoph Wedler, starting with version
@samp{4.0h/beta} of x-symbol, the line parsing of @AUCTeX{} and
@previewlatex{} is fully supported. Earlier versions exhibit problems.
However, versions before 4.2.2 will cause a drastic slowdown of
@previewlatex{}'s parsing pass, so we don't recommend to use versions
earlier than that.
If you wonder what x-symbol is, it is a package that transforms various
tokens and subscripts to a more readable form while editing and offers a
few input methods handy especially for dealing with math. Take a look at
@uref{http://x-symbol.sourceforge.net}.
x-symbol versions up to 4.5.1-beta at least require an 8bit-clean @TeX{}
implementation (meaning that its terminal output should not use
@samp{^^}-started escape sequences) for cooperation with
@previewlatex{}. Later versions may get along without it, like
@previewlatex{} does now.
If you experience problems with @file{circ.tex} in connection with both
x-symbol and Latin-1 characters, you may need to change your language
environment or, as a last resort, customize the variable
@code{LaTeX-command-style} by replacing the command @code{latex} with
@code{latex -translate-file=cp8bit}.
@node Middle-clicks paste instead of toggling
@section Middle-clicks paste instead of toggling
This is probably the fault of your favorite package. @file{flyspell.el}
and @file{mouse-drag.el} are known to be affected in versions before
@w{Emacs 21.3}. Upgrade to the most recent version. What version of
XEmacs might contain the fixes is unknown.
@file{isearch.el} also shows this effect while searches are in progress,
but the code is such a complicated mess that no patch is in sight.
Better just end the search with @kbd{@key{RET}} before toggling and
resume with @kbd{C-s C-s} or similar afterwards. Since previews over
the current match will auto-open, anyway, this should not be much of a
problem in practice.

View File

@@ -0,0 +1,230 @@
@include macros.texi
@ifset rawfile
@node Introduction, What use is it?, (dir), (dir)
@top @previewlatex{} in a nutshell
@paragraphindent none
@end ifset
@c -----------------------
@cindex Readme
Does your neck hurt from turning between previewer windows and the
source too often? This @AUCTeX{} component will render your displayed
@LaTeX{} equations right into the editing window where they belong.
The purpose of @previewlatex{} is to embed @LaTeX{} environments such as
display math or figures into the source buffers and switch conveniently
between source and image representation.
@menu
* What use is it?::
* Activating preview-latex::
* Getting started::
* Basic modes of operation::
* More documentation::
* Availability::
* Contacts::
@end menu
@ifset rawfile
@node What use is it?, Activating preview-latex, Introduction, Introduction
@chapter What use is it?
@raisesections
@end ifset
@ifclear rawfile
@node What use is it?, Activating preview-latex, Introduction, Introduction
@section What use is it?
@end ifclear
@cindex Philosophy of @previewlatex{}
@acronym{WYSIWYG} (what you see is what you get) sometimes is considered
all the rage, sometimes frowned upon. Do we really want it? Wrong
question. The right question is @emph{what} we want from it. Except
when finetuning the layout, we don't want to use printer fonts for
on-screen text editing. The low resolution and contrast of a computer
screen render all but the coarsest printer fonts (those for low-quality
newsprint) unappealing, and the margins and pagination of the print are
not wanted on the screen, either. On the other hand, more complex
visual compositions like math formulas and tables can't easily be taken
in when seen only in the source. @previewlatex{} strikes a balance: it
only uses graphic renditions of the output for certain, configurable
constructs, does this only when told, and then right in the source code.
Switching back and forth between the source and preview is easy and
natural and can be done for each image independently. Behind the scenes
of @previewlatex{}, a sophisticated framework of other programs like
@samp{dvipng}, Dvips and Ghostscript are employed together with a
special @LaTeX{} style file for extracting the material of interest in
the background and providing fast interactive response.
@node Activating preview-latex, Getting started, What use is it?, Introduction
@section Activating @previewlatex{}
@cindex Activation
After installation, the package may need to be activated (and remember
to activate @AUCTeX{} too). In XEmacs, and in any prepackaged versions
worth their salt, activation should be automatic upon installation. If
this seems not the case, complain to your installation provider.
The usual activation (if it is not done automatically) would be
@example
(load "preview-latex.el" nil t t)
@end example
If you still don't get a ``Preview'' menu in @LaTeX{} mode in spite
of @AUCTeX{} showing its ``Command'', your installation is broken. One
possible cause are duplicate Lisp files that might be detectable with
@kbd{@key{M-x} list-load-path-shadows @key{RET}}.
@node Getting started, Basic modes of operation, Activating preview-latex, Introduction
@section Getting started
Once activated, @previewlatex{} and its documentation will be accessible
via its menus (note that @previewlatex{} requires @AUCTeX{} to be
loaded). When you have loaded a @LaTeX{} document (a
sample document @file{circ.tex} is included in the distribution, but
most documents including math and/or figures should do), you can use
its menu or @kbd{C-c C-p C-d} (for @samp{Preview/Document}).
Previews will now be generated for various objects in your document.
You can use the time to take a short look at the other menu entries and
key bindings in the @samp{Preview} menu. You'll see the previewed
objects change into a roadworks sign when @previewlatex{} has determined
just what it is going to preview. Note that you can freely navigate the
buffer while this is going on. When the process is finished you will
see the objects typeset in your buffer.
It is a bad idea, however, to edit the buffer before the roadworks signs
appear, since that is the moment when the correlation between the
original text and the buffer locations gets established. If the buffer
changes before that point of time, the previews will not be placed where
they belong. If you do want to change some obvious error you just
spotted, we recommend you stop the background process by pressing
@kbd{C-c C-k}.
To see/edit the @LaTeX{} code for a specific object, put the point (the
cursor) on it and press @kbd{C-c C-p C-p} (for @samp{Preview/at point}).
It will also do to click with the middle mouse button on the preview.
Now you can edit the code, and generate a new preview by again pressing
@kbd{C-c C-p C-p} (or by clicking with the middle mouse button on the
icon before the edited text).
If you are using the @code{desktop} package, previews will remain from
one session to the next as long as you don't kill your buffer. If you
are using XEmacs, you will probably need to upgrade the package to
the newest one; things are being fixed just as I am writing this.
@node Basic modes of operation, More documentation, Getting started, Introduction
@section Basic modes of operation
@previewlatex{} has a number of methods for generating its graphics.
Its default operation is equivalent to using the `@LaTeX{}' command from
@AUCTeX{}. If this happens to be a call of PDF@LaTeX{} generating
@acronym{PDF} output (you need at least @w{@AUCTeX{} 11.51} for this),
then Ghostscript will be called directly on the resulting @acronym{PDF}
file. If a @acronym{DVI} file gets produced, first Dvips and then
Ghostscript get called by default.
The image type to be generated by Ghostscript can be configured with
@example
@kbd{M-x} customize-variable @kbd{RET} preview-image-type @kbd{RET}
@end example
@vindex preview-image-type
@noindent
The default is @samp{png} (the most efficient image type). A special
setting is @samp{dvipng} in case you have the @samp{dvipng}
@cindex Using dvipng
@pindex dvipng
program installed. In this case, @samp{dvipng} will be used for
converting @acronym{DVI} files and Ghostscript (with a @samp{PNG}
device) for converting @acronym{PDF} files. @samp{dvipng} is much
faster than the combination of Dvips and Ghostscript. You can get
downloads, access to its @acronym{CVS} archive and further information
from its @uref{http://savannah.nongnu.org/projects/dvipng, project
site}.
@node More documentation, Availability, Basic modes of operation, Introduction
@section More documentation
After the installation, documentation in the form of
@ifinfo
@ifclear rawfile
this
@end ifclear
@ifset rawfile
an
@end ifset
@end ifinfo
@ifnotinfo
an
@end ifnotinfo
info manual will be available. You can access it with the standalone
info reader with
@example
info preview-latex
@end example
@noindent
or by pressing @kbd{C-h i d m preview-latex @key{RET}} in Emacs. Once
@previewlatex{} is activated, you can instead use @kbd{C-c C-p
@key{TAB}} (or the menu entry @samp{Preview/Read documentation}).
Depending on your installation,
@ifnottex
a printable
@end ifnottex
@iftex
this printed
@end iftex
manual may also be available in the form of @file{preview-latex.dvi} or
@file{preview-latex.ps}.
Detailed documentation for the @LaTeX{} style used for extracting the
preview images is placed in @file{preview.dvi} in a suitable directory
during installation; on typical teTeX-based systems,
@example
texdoc preview
@end example
@noindent
will display it.
@node Availability, Contacts, More documentation, Introduction
@section Availability
@cindex Download
@cindex @sc{git} access
The @previewlatex{} project is now part of @AUCTeX{} and accessible as
part of the @uref{http://savannah.gnu.org/projects/auctex,@AUCTeX{}
project page}. You can get its files from the
@uref{ftp://ftp.gnu.org/pub/gnu/auctex,@AUCTeX{} download area}. As of
@w{@AUCTeX{} 11.81}, @previewlatex{} should already be integrated into
@AUCTeX{}, so no separate download will be necessary.
You will also find @file{.rpm} files there for Fedora and possibly
SuSE. Anonymous @acronym{Git} is available as well.
@node Contacts, , Availability, Introduction
@section Contacts
@cindex Contacts
@cindex Mailing list
Bug reports should be sent by using @kbd{M-x preview-report-bug
@key{RET}}, as this will fill in a lot of information interesting to
us. If the installation fails (but this should be a rare event), report
bugs to @email{bug-auctex@@gnu.org}.
There is a general discussion list for @AUCTeX{} which also
covers @previewlatex{}, look at
@uref{http://lists.gnu.org/mailman/listinfo/auctex}. For more
information on the mailing list, send a message with just the word
``help'' as subject or body to @email{auctex-request@@gnu.org}. For the
developers, there is the @email{auctex-devel@@gnu.org} list; it would
probably make sense to direct feature requests and questions about
internal details there. There is a low-volume read-only announcement
list available to which you can subscribe by sending a mail with
``subscribe'' in the subject to @email{info-auctex-request@@gnu.org}.
Offers to support further development will be appreciated. If you want
to show your appreciation with a donation to the main developer, you can
do so via PayPal to @email{dak@@gnu.org}, and of course you can arrange
for service contracts or for added functionality. Take a look at the
@file{TODO} list for suggestions in that area.

View File

@@ -0,0 +1,118 @@
@ifset rawfile
@include macros.texi
@chapheading Future Development of @previewlatex{}
@end ifset
@itemize @bullet
@item Support other formats than just @LaTeX{}
plain @TeX{} users and Con@TeX{}t users should not have to feel left
out. While Con@TeX{}t is not supported yet by released versions of
@AUCTeX{}, at least supporting plain would help people, and be a start
for Con@TeX{}t as well. There are plain-based formats like MusiX@TeX{}
that could benefit a lot from @previewlatex{}. The main part of the
difficulties here is to adapt @file{preview.dtx} to produce stuff not
requiring @LaTeX{}.
@item Support nested snippets
Currently you can't have both a footnote (which gets displayed as just
its footnote number) and math inside of a footnote rendered as an image:
such nesting might be achieved by rerunning @previewlatex{} on the
footnote contents when one opens the footnote for editing.
@item Support other text properties than just images
Macros like @samp{\textit} can be rendered as images, but the resulting
humungous blob is not suitable for editing, in particular since the
line filling from LaTeX does not coincide with that of Emacs. It would
be much more useful if text properties just switched the relevant font
to italics rather than replacing the whole text with an image. It
would also make editing quite easier. Then there are things like
footnotes that are currently just replaced by their footnote number.
While editing is not a concern here (the number is not in the original
text, anyway), it would save a lot of conversion time if no images were
generated, but Emacs just displayed a properly fontified version of the
footnote number. Also, this might make @previewlatex{} useful even on
text terminals.
@item Find a way to facilitate Source Specials
Probably in connection with adding appropriate support to
@code{dvipng}, it would be nice if clicking on an image from a larger
piece of source code would place the cursor at the respective source
code location.
@item Make @file{preview.dtx} look reasonable in @AUCTeX{}
It is a bit embarrassing that @file{preview.dtx} is written in a manner
that will not give either good syntax highlighting or good indentation
when employing @AUCTeX{}.
@item Web page work
Currently, @previewlatex{}'s web page is not structured at all. Better
navigation would be desirable, as well as separate News and Errata eye
catchers.
@item Manual improvements
@itemize @minus
@item Pepper the manual with screen shots and graphics
This will be of interest for the @acronym{HTML} and @TeX{} renditions
of the texinfo manual. Since Texinfo now supports images as well, this
could well be nice to have.
@item Fix duplicates
Various stuff appears several times.
@end itemize
@item Implement rendering pipelines for Emacs
The current @file{gs.el} interface is fundamentally flawed, not only
because of a broken implementation. A general batchable and
daemonizable rendering infrastructure that can work on all kinds of
preview images for embedding into buffers is warranted. The current
implementation has a rather adhoc flavor and is not easily extended.
It will not work outside of AUCTeX, either.
@item Integrate into Ref@TeX{}
When referencing to equations and the like, the preview-images of the
source rather than plain text should be displayed. If the preview in
question covers labels, those should appear in the bubble help and/or a
context menu. Apropos:
@item Implement @LaTeX{} error indicators
Previews on erroneous @LaTeX{} passages might gain a red border or similar.
@item Pop up relevant online documentation for frequent errors
A lot of errors are of the "badly configured" variety. Perhaps the
relevant info pages should be delivered in addition to the error
message.
@item Implement a table editing mode where every table cell gets output
as a separate preview. Alternatively, output the complete table
metrics in a way that lets people click on individual cells for editing
purposes.
@item Benchmark and kill Emacs inefficiencies
Both the @LaTeX{} run under Emacs control as well as actual image
insertion in Emacs could be faster. CVS Emacs has improved in that
respect, but it still is slower than desirable.
@item Improve image support under Emacs
The general image and color handling in Emacs is inefficient and partly
defective. This is still the case in CVS. One option would be to
replace the whole color and image handling with @acronym{GDK} routines
when this library is available, since it has been optimized for it.
@end itemize

View File

@@ -0,0 +1,328 @@
@include macros.texi
@node Quick Start
@chapter Quick Start
@AUCTeX{} is a powerful program offering many features and configuration
options. If you are new to @AUCTeX{} this might be deterrent.
Fortunately you do not have to learn everything at once. This Quick
Start Guide will give you the knowledge of the most important commands
and enable you to prepare your first @LaTeX{} document with @AUCTeX{}
after only a few minutes of reading.
In this introduction, we assume that @AUCTeX{} is already installed on
your system. If this is not the case, you should read the file
@file{INSTALL} in the base directory of the unpacked distribution
tarball. These installation instructions are available in this manual
as well, @ref{Installation}. We also assume that you are familiar with
the way keystrokes are written in Emacs manuals. If not, have a look at
the Emacs Tutorial in the Help menu.
If @AUCTeX{} is installed in any other way than from the Emacs package
manager (@acronym{ELPA}), you might still need to activate it, by
inserting
@lisp
(load "auctex.el" nil t t)
@end lisp
in your user init file.@footnote{This usually is a file in your home
directory called @file{.emacs} if you are utilizing GNU Emacs or
@file{.xemacs/init.el} if you are using XEmacs.}
If @AUCTeX{} is installed from @acronym{ELPA}, the installation
procedure already cares about loading @AUCTeX{} correctly and you
@strong{must not} have the line above in your init file. Note that this
also applies if you have the following line in your init file
@lisp
(package-initialize)
@end lisp
In order to get support for many of the @LaTeX{} packages you will use
in your documents, you should enable document parsing as well, which can
be achieved by putting
@lisp
(setq TeX-auto-save t)
(setq TeX-parse-self t)
@end lisp
into your init file. Finally, if you often use @code{\include} or
@code{\input}, you should make @AUCTeX{} aware of the multi-file
document structure. You can do this by inserting
@lisp
(setq-default TeX-master nil)
@end lisp
into your init file. Each time you open a new file, @AUCTeX{} will then
ask you for a master file.
@menu
* Editing Facilities:: Functions for editing TeX files
* Processing Facilities:: Creating and viewing output, debugging
@end menu
@iftex
This Quick Start Guide covers two main topics: First we explain how
@AUCTeX{} helps you in editing your input file for @TeX{}, @LaTeX{}, and
some other formats. Then we describe the functions that @AUCTeX{}
provides for processing the input files with @LaTeX{}, Bib@TeX{}, etc.,
and for viewing and debugging.
@end iftex
@node Editing Facilities
@section Functions for editing TeX files
@subsection Making your @TeX{} code more readable
@AUCTeX{} can do syntax highlighting of your source code, that means
commands will get special colors or fonts. You can enable it locally by
typing @kbd{M-x font-lock-mode RET}. If you want to have font locking
activated generally, enable @code{global-font-lock-mode}, e.g. with
@kbd{M-x customize-variable RET global-font-lock-mode RET}.
@AUCTeX{} will indent new lines to indicate their syntactical
relationship to the surrounding text. For example, the text of a
@code{\footnote} or text inside of an environment will be indented
relative to the text around it. If the indenting has gotten wrong after
adding or deleting some characters, use @key{TAB} to reindent the line,
@kbd{M-q} for the whole paragraph, or @kbd{M-x LaTeX-fill-buffer RET}
for the whole buffer.
@subsection Entering sectioning commands
@cindex Sectioning
@cindex Sections
@cindex Chapters
@cindex @code{\chapter}
@cindex @code{\section}
@cindex @code{\subsection}
@cindex @code{\label}
Insertion of sectioning macros, that is @samp{\chapter},
@samp{\section}, @samp{\subsection}, etc. and accompanying @samp{\label}
commands may be eased by using @kbd{C-c C-s}. You will be asked for the
section level. As nearly everywhere in @AUCTeX{}, you can use the
@key{TAB} or @key{SPC} key to get a list of available level names, and
to auto-complete what you started typing. Next, you will be asked for
the printed title of the section, and last you will be asked for a label
to be associated with the section.
@subsection Inserting environments
Similarly, you can insert environments, that is
@samp{\begin@{@}}--@samp{\end@{@}} pairs: Type @kbd{C-c C-e}, and select
an environment type. Again, you can use @key{TAB} or @key{SPC} to get a
list, and to complete what you type. Actually, the list will not only
provide standard @LaTeX{} environments, but also take your
@samp{\documentclass} and @samp{\usepackage} commands into account if
you have parsing enabled by setting @code{TeX-parse-self} to @code{t}.
If you use a couple of environments frequently, you can use the up and
down arrow keys (or @kbd{M-p} and @kbd{M-n}) in the minibuffer to get
back to the previously inserted commands.
Some environments need additional arguments. Often, @AUCTeX{} knows about
this and asks you to enter a value.
@subsection Inserting macros
@kbd{C-c C-m}, or simply @kbd{C-c RET} will give you a prompt that asks
you for a @LaTeX{} macro. You can use @key{TAB} for completion, or the
up/down arrow keys (or @kbd{M-p} and @kbd{M-n}) to browse the command
history. In many cases, @AUCTeX{} knows which arguments a macro needs
and will ask you for that. It even can differentiate between mandatory
and optional arguments---for details, see @ref{Completion}.
An additional help for inserting macros is provided by the possibility
to complete macros right in the buffer. With point at the end of a
partially written macro, you can complete it by typing @kbd{M-TAB}.
@subsection Changing the font
@AUCTeX{} provides convenient keyboard shortcuts for inserting macros
which specify the font to be used for typesetting certain parts of the
text. They start with @kbd{C-c C-f}, and the last @kbd{C-} combination
tells @AUCTeX{} which font you want:
@table @kbd
@item C-c C-f C-b
@kindex C-c C-f C-b
@cindex @code{\textbf}
Insert @b{bold face} @samp{\textbf@{@point{}@}} text.
@item C-c C-f C-i
@kindex C-c C-f C-i
@cindex @code{\textit}
Insert @i{italics} @samp{\textit@{@point{}@}} text.
@item C-c C-f C-e
@kindex C-c C-f C-e
@cindex @code{\emph}
Insert @i{emphasized} @samp{\emph@{@point{}@}} text.
@item C-c C-f C-s
@kindex C-c C-f C-s
@cindex @code{\textsl}
Insert @i{slanted} @samp{\textsl@{@point{}@}} text.
@item C-c C-f C-r
@kindex C-c C-f C-r
@cindex @code{\textrm}
Insert roman @r{\textrm@{@point{}@}} text.
@item C-c C-f C-f
@kindex C-c C-f C-f
@cindex @code{\textsf}
Insert @sansserif{sans serif} @samp{\textsf@{@point{}@}} text.
@item C-c C-f C-t
@kindex C-c C-f C-t
@cindex @code{\texttt}
Insert @t{typewriter} @samp{\texttt@{@point{}@}} text.
@item C-c C-f C-c
@kindex C-c C-f C-c
@cindex @code{\textsc}
Insert @sc{small caps} @samp{\textsc@{@point{}@}} text.
@item C-c C-f C-d
@kindex C-c C-f C-c
@cindex Deleting fonts
Delete the innermost font specification containing point.
@end table
If you want to change font attributes of existing text, mark it as an
active region, and then invoke the commands. If no region is selected,
the command will be inserted with empty braces, and you can start typing
the changed text.
Most of those commands will also work in math mode, but then macros like
@code{\mathbf} will be inserted.
@subsection Other useful features
@AUCTeX{} also tries to help you when inserting the right ``quote''
signs for your language, dollar signs to typeset math, or pairs of
braces. It offers shortcuts for commenting out text (@kbd{C-c ;} for
the current region or @kbd{C-c %} for the paragraph you are in). The
same keystrokes will remove the % signs, if the region or paragraph is
commented out yet. With @code{TeX-fold-mode}, you can hide certain
parts (like footnotes, references etc.) that you do not edit currently.
Support for Emacs' outline mode is provided as well. And there's more,
but this is beyond the scope of this Quick Start Guide.
@node Processing Facilities
@section Creating and viewing output, debugging
@subsection One Command for @LaTeX{}, helpers, viewers, and printing
If you have typed some text and want to run @LaTeX{} (or @TeX{}, or
other programs---see below) on it, type @kbd{C-c C-c}. If applicable,
you will be asked whether you want to save changes, and which program
you want to invoke. In many cases, the choice that @AUCTeX{} suggests
will be just what you want: first @command{latex}, then a viewer. If a
@command{latex} run produces or changes input files for
@command{makeindex}, the next suggestion will be to run that program,
and @AUCTeX{} knows that you need to run @command{latex} again
afterwards---the same holds for Bib@TeX{}.
When no processor invocation is necessary anymore, @AUCTeX{} will
suggest to run a viewer, or you can chose to create a PostScript file
using @command{dvips}, or to directly print it.
Actually, there is another command which comes in handy to compile
documents: type @kbd{C-c C-a} (@code{TeX-command-run-all}) and @AUCTeX{}
will compile the document for you until it is ready and then run the
viewer. This is the same as issuing repeatedly @kbd{C-c C-c} and
letting @AUCTeX{} guess the next command to run.
At this place, a warning needs to be given: First, although @AUCTeX{} is
really good in detecting the standard situations when an additional
@command{latex} run is necessary, it cannot detect it always. Second,
the creation of PostScript files or direct printing currently only works
when your output file is a @acronym{DVI} file, not a @acronym{PDF} file.
Ah, you didn't know you can do both? That brings us to the next topic.
@subsection Choosing an output format
From a @LaTeX{} file, you can produce @acronym{DVI} output, or a
@acronym{PDF} file directly @i{via} @command{pdflatex}. You can switch
on source specials for easier navigation in the output file, or tell
@command{latex} to stop after an error (usually @code{\noninteractive}
is used, to allow you to detect all errors in a single run).
These options are controlled by toggles, the keystrokes should be easy
to memorize:
@table @kbd
@item @kbd{C-c C-t C-p}
This command toggles between @acronym{DVI} and @acronym{PDF} output
@item @kbd{C-c C-t C-i}
toggles interactive mode
@item @kbd{C-c C-t C-s}
toggles source specials support
@item @kbd{C-c C-t C-o}
toggles usage of Omega/lambda.
@end table
There is also another possibility: compile the document with
@command{tex} (or @command{latex}) and then convert the resulting
@acronym{DVI} file to @acronym{PDF} using
@command{dvips}--@command{ps2pdf} sequence. If you want to go by this
route, when @code{TeX-PDF-via-dvips-ps2pdf} variable is non-nil,
@AUCTeX{} will suggest you to run the appropriate command when you type
@kbd{C-C C-c}. For details, see @ref{Processor Options}.
@subsection Debugging @LaTeX{}
When @AUCTeX{} runs a program, it creates an output buffer in which it
displays the output of the command. If there is a syntactical error in
your file, @command{latex} will not complete successfully. @AUCTeX{}
will tell you that, and you can get to the place where the first error
occured by pressing @kbd{C-c `} (the last character is a backtick). The
view will be split in two windows, the output will be displayed in the
lower buffer, and both buffers will be centered around the place where
the error ocurred. You can then try to fix it in the document buffer,
and use the same keystrokes to get to the next error. This procedure
may be repeated until all errors have been dealt with. By pressing
@kbd{C-c C-w} (@code{TeX-toggle-debug-boxes}) you can toggle whether
@AUCTeX{} should notify you of overfull and underfull boxes in addition
to regular errors.
If you have a recent version of GNU Emacs (24 or later), issue @kbd{M-x
TeX-error-overview RET} to see a nicely formatted list of all errors and
warnings reported by the compiler.
If a command got stuck in a seemingly infinite loop, or you want to stop
execution for other reasons, you can use @kbd{C-c C-k} (for ``kill'').
Similar to @kbd{C-l}, which centers the buffer you are in around your
current position, @kbd{C-c C-l} centers the output buffer so that the
last lines added at the bottom become visible.
@subsection Running @LaTeX{} on parts of your document
If you want to check how some part of your text looks like, and do not
want to wait until the whole document has been typeset, then mark it as
a region and use @kbd{C-c C-r}. It behaves just like @kbd{C-c C-c}, but
it only uses the document preamble and the region you marked.
If you are using @code{\include} or @code{\input} to structure your
document, try @kbd{C-c C-b} while you are editing one of the included
files. It will run @command{latex} only on the current buffer, using the
preamble from the master file.
@c does this also work with input? why not?
@c Local Variables:
@c mode: texinfo
@c TeX-master: "auctex"
@c End:

View File

@@ -0,0 +1,681 @@
% Reference Card for AUCTeX version 11.91
%**start of header
\newcount\columnsperpage
% This file has only been checked with 3 columns per page. But it
% should print fine either via DVI or PDFTeX.
\columnsperpage=3
% Papersize stuff. Use default paper size for PDF, but switch
% orientation. Use papersize special for dvips.
\ifx\pdfoutput\undefined
\csname newcount\endcsname\pdfoutput
\pdfoutput=0
\fi
\ifnum\pdfoutput=0
% \special{papersize 8.5in,11in}%
\special{papersize 297mm,210mm}%
\else
\dimen0\pdfpagewidth
\pdfpagewidth\pdfpageheight
\pdfpageheight\dimen0
\fi
% This file is intended to be processed by plain TeX (TeX82).
% compile-command: "tex tex-ref" or "pdftex tex-ref"
%
% Original author of Auc-TeX Reference Card:
%
% Terrence Brannon, PO Box 5027, Bethlehem, PA 18015 , USA
% internet: tb06@pl118f.cc.lehigh.edu (215) 758-1720 (215) 758-2104
%
% Kresten Krab Thorup updated the reference card to 6.
% Per Abrahamsen updated the reference card to 7, 8, and 9.
% Ralf Angeli updated it to 11.50.
% And David Kastrup messed around with it, too, merging the math reference.
%
% Thanks to Stephen Gildea
% Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
% for creating the GNU Emacs Reference Card from which this was mutated
\def\versionnumber{11.91}
\def\year{2017}
\def\version{July \year\ v\versionnumber}
\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
\centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
Permissions on back. v\versionnumber}}
\def\copyrightnotice{%
\vskip 1ex plus 2 fill\begingroup\small
\centerline{Copyright \copyright\ 1987, 1992-1994, 2004-2006, 2008, 2010,}
\centerline{2012, 2014, 2015 Free Software Foundation, Inc.}
\centerline{for AUC\TeX\ version \versionnumber}
Permission is granted to make and distribute copies of
this card provided the copyright notice and this permission notice
are preserved on all copies.
\endgroup}
% make \bye not \outer so that the \def\bye in the \else clause below
% can be scanned without complaint.
\def\bye{\par\vfill\supereject\end}
\newdimen\intercolumnskip
\newbox\columna
\newbox\columnb
\edef\ncolumns{\the\columnsperpage}
\message{[\ncolumns\space
column\if 1\ncolumns\else s\fi\space per page]}
\def\scaledmag#1{ scaled \magstep #1}
% This multi-way format was designed by Stephen Gildea
% October 1986.
\if 1\ncolumns
\hsize 4in
\vsize 10in
\voffset -.7in
\font\titlefont=\fontname\tenbf \scaledmag3
\font\headingfont=\fontname\tenbf \scaledmag2
\font\smallfont=\fontname\sevenrm
\font\smallsy=\fontname\sevensy
\footline{\hss\folio}
\def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
\else
\hsize 3.2in
\vsize 7.6in
\hoffset -.75in
\voffset -.8in
\font\titlefont=cmbx10 \scaledmag2
\font\headingfont=cmbx10 \scaledmag1
\font\smallfont=cmr6
\font\smallsy=cmsy6
\font\eightrm=cmr8
\font\eightbf=cmbx8
\font\eightit=cmti8
\font\eighttt=cmtt8
\font\eightsl=cmsl8
\font\eightsc=cmcsc8
\font\eightsy=cmsy8
\textfont0=\eightrm
\textfont2=\eightsy
\def\rm{\fam0 \eightrm}
\def\bf{\eightbf}
\def\it{\eightit}
\def\tt{\eighttt}
\def\sl{\eightsl}
\def\sc{\eightsc}
\normalbaselineskip=.8\normalbaselineskip
\ht\strutbox.8\ht\strutbox
\dp\strutbox.8\dp\strutbox
\normallineskip=.8\normallineskip
\normallineskiplimit=.8\normallineskiplimit
\normalbaselines\rm %make definitions take effect
\if 2\ncolumns
\let\maxcolumn=b
\footline{\hss\rm\folio\hss}
\def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
\else \if 3\ncolumns
\let\maxcolumn=c
\nopagenumbers
\else
\errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
\errmessage{Illegal number of columns per page}
\fi\fi
\intercolumnskip=.46in
\def\abc{a}
\output={%
% This next line is useful when designing the layout.
%\immediate\write16{Column \folio\abc\space starts with \firstmark}
\if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
\else\if a\abc
\global\setbox\columna\columnbox \global\def\abc{b}
%% in case we never use \columnb (two-column mode)
\global\setbox\columnb\hbox to -\intercolumnskip{}
\else
\global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
\def\multicolumnformat{\shipout\vbox{\makeheadline
\hbox{\box\columna\hskip\intercolumnskip
\box\columnb\hskip\intercolumnskip\columnbox}
\makefootline}\advancepageno}
\def\columnbox{\leftline{\pagebody}}
\def\bye{\par\vfill\supereject
\if a\abc \else\null\vfill\eject\fi
\if a\abc \else\null\vfill\eject\fi
\end}
\fi
% we won't be using math mode much, so redefine some of the characters
% we might want to talk about
\catcode`\^=12
\catcode`\_=12
\chardef\\=`\\
\chardef\{=`\{
\chardef\}=`\}
\hyphenation{mini-buf-fer}
\parindent 0pt
\parskip 1ex plus .5ex minus .5ex
\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
\def\newcolumn{\vfill\eject}
\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}
\def\section#1{\par\vskip 0pt plus 0.2\vsize \penalty-3000
\vskip 0pt plus -0.2\vsize
\vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}%
\vskip 2ex plus 1ex minus 1.5ex}
\newdimen\keyindent
\def\beginindentedkeys{\keyindent=1em}
\def\endindentedkeys{\keyindent=0em}
\endindentedkeys
\def\paralign{\vskip\parskip\halign}
\def\<#1>{$\langle${\rm #1}$\rangle$}
\def\kbd#1{{\tt#1}\null} %\null so not an abbrev even if period follows
\def\beginexample{\par\leavevmode\begingroup
\obeylines\obeyspaces\parskip0pt\tt}
{\obeyspaces\global\let =\ }
\def\endexample{\endgroup}
\def\key#1#2{\leavevmode\hbox to \hsize{\vtop
{\hsize=.68\hsize\rightskip=1em
\hskip\keyindent\relax#1}\kbd{#2}\hfil}}
\newbox\metaxbox
\setbox\metaxbox\hbox{\kbd{M-x }}
\newdimen\metaxwidth
\metaxwidth=\wd\metaxbox
\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
{\hskip\keyindent\relax#1\hfil}%
\hskip -\metaxwidth minus 1fil
\kbd{#2}\hfil}}
\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\quad
&\kbd{#3}\quad\cr}
\def\LaTeX{%
L\kern-.36em\raise.3ex\hbox{\sc{a}}\kern-.15em\TeX}
%**end of header
\title{AUC\TeX\ Reference Card}
\centerline{(for version \versionnumber)}
\section{Conventions Used}
\key{Carriage Return or \kbd{C-m}}{RET}
\key{Tabular or \kbd{C-i}}{TAB}
\key{Linefeed or \kbd{C-j}}{LFD}
\section{Shell Interaction}
\key{Run a command on the master file}{C-c C-c}
\key{Run a command on the buffer}{C-c C-b}
\key{Run a command on the region}{C-c C-r}
\key{Fix the region}{C-c C-t C-r}
\key{Kill job}{C-c C-k}
\key{Recenter output buffer}{C-c C-l}
\key{Next error in \TeX/\LaTeX\ session}{C-c `}
\key{Previous error in \TeX/\LaTeX\ session}{M-g p}
\key{Toggle debug of bad boxes}{C-c C-t C-b}
\key{Toggle debug of warnings}{C-c C-t C-w}
\key{View output file}{C-c C-v}
\key{Compile all and view output file}{C-c C-a}
Commands you can run on the master file (with \kbd{C-c C-c}) or the
region (with \kbd{C-c C-r}) include the following (starred versions
are not available in all modes):
\def\star{\llap{\rm*}}
\key{\TeX}{\star TeX}
\key{\LaTeX}{\star LaTeX}
\key{Con\TeX{}t (once)}{\star ConTeXt}
\key{Con\TeX{}t Full}{\star ConTeXt Full}
\key{Makeinfo}{\star Makeinfo}
\key{Makeinfo with HTML output}{\star Makeinfo HTML}
\key{Appropriate previewer}{View}
\key{Print the output}{Print}
\key{Bib\TeX}{BibTeX}
\key{Biber}{Biber}
\key{MakeIndex}{Index}
\key{LaCheck}{Check}
\key{Make (PostScript) File}{File}
\key{Ispell}{Spell}
\key{Delete intermediate files}{Clean}
\key{Delete all output files}{Clean All}
\section{\TeX ing options}
\TeX\ runs can come in various types, which may be toggled and are
indicated in the mode line.
\key{PDF/DVI mode}{C-c C-t C-p}
\key{Stop on errors (Interactive mode)}{C-c C-t C-i}
\key{I/O correlation (S. Specials, Sync\TeX)}{C-c C-t C-s}
\section{Miscellaneous}
\key{Read AUC\TeX\ manual}{C-c TAB}
\key{Find documentation}{C-c ?}
\key{Math Mode}{C-c \string~}
\key{Reset Buffer}{C-c C-n}
\key{Reset AUC\TeX}{C-u C-c C-n}
\section{Multifile Handling}
\key{Save Document}{C-c C-d}
\key{Switch to master file or active buffer}{C-c ^}
\key{Query for a master file}{C-c \_}
\section{Command Insertion}
\key{Insert Section}{C-c C-s}
\key{Insert \LaTeX\ environment}{C-c C-e}
\key{Insert item}{C-c LFD}
\key{Insert item (alias)}{M-RET}
\key{Close \LaTeX\ environment}{C-c ]}
\key{Insert \TeX\ macro \kbd{\{\}} }{C-c C-m}
\key{Insert double brace}{C-c \{}
\key{Complete \TeX\ macro}{M-TAB}
\key{Smart ``quote''}{"}
\key{Smart ``dollar''}{\$}
\section{Font Selection}
\key{Insert {\bf bold\/} text}{C-c C-f C-b}
\key{Insert {\it italics\/} text}{C-c C-f C-i}
\key{Insert {\rm roman} text}{C-c C-f C-r}
\key{Insert {\it emphasized\/} text}{C-c C-f C-e}
\key{Insert {\tt typewriter\/} text}{C-c C-f C-t}
\key{Insert {\sl slanted\/} text}{C-c C-f C-s}
\key{Insert {\sc Small Caps\/} text}{C-c C-f C-c}
\key{Delete font}{C-c C-f C-d}
\key{Replace font}{C-u C-c C-f \<key>}
\section{Source Formatting}
\key{Indent current line}{TAB}
\key{Indent next line}{LFD}
\key{Format a paragraph}{M-q}
\key{Format a region}{C-c C-q C-r}
\key{Format a section}{C-c C-q C-s}
\key{Format an environment}{C-c C-q C-e}
\key{Mark an environment}{C-c .}
\key{Mark a section}{C-c *}
\key{Comment or uncomment region}{C-c ;}
\key{Comment or uncomment paragraph}{C-c \%}
\copyrightnotice
\newcolumn
\title{Math Mode}
\section{Variables}
All math mode commands are under the prefix key specified by
LaTeX-math-abbrev-prefix, default is "`".
You can define your own math mode commands by setting the variable
LaTeX-math-list before loading LaTeX-math-mode.
\section{Greek Letters}
\def\disp#1{\hbox to 6ex{$#1$\hfill}}
\def\twocol#1\par{{%
\def\key##1##2{##1&##2\cr}%
\setbox0\vbox{\halign to 0.45\hsize{\tabskip0ptplus1fil\relax
##\hfil&\kbd{##}\hfil\cr\vrule width0ptheight\ht\strutbox#1}}%
\line{%
\splittopskip=\ht\strutbox
\dimen0\ht0
\advance\dimen0\baselineskip
\setbox2\vsplit0to0.5\dimen0
\vtop{\unvbox2}\hfill\raise \ht\strutbox \vtop {\unvbox0}}}}
\def\keycs#1#2#{\keycsii#1{#2}}
\def\keycsii#1#2#3{\key{\disp{#1#2} ({\tt\string#1})}{#3}}
\twocol
\keycs\alpha{a}
\keycs\beta{b}
\keycs\gamma{g}
\keycs\delta{d}
\keycs\epsilon{e}
\keycs\zeta{z}
\keycs\eta{h}
\keycs\theta{j}
\keycs\kappa{k}
\keycs\lambda{l}
\keycs\mu{m}
\keycs\nu{n}
\keycs\xi{x}
\keycs\pi{p}
\keycs\rho{r}
\keycs\sigma{s}
\keycs\tau{t}
\keycs\upsilon{u}
\keycs\phi{f}
\keycs\chi{q}
\keycs\psi{y}
\keycs\omega{w}
\keycs\Delta{D}
\keycs\Gamma{G}
\keycs\Theta{J}
\keycs\Lambda{L}
\keycs\Xi{X}
\keycs\Pi{P}
\keycs\Sigma{S}
\keycs\Upsilon{U}
\keycs\Phi{F}
\keycs\Psi{Y}
\keycs\Omega{W}
\section{Symbols}
\twocol
\keycs\rightarrow{C-f}
\keycs\leftarrow{C-b}
\keycs\uparrow{C-p}
\keycs\downarrow{C-n}
\keycs\leq{<}
\keycs\geq{>}
\keycs\tilde x{\string~}
\keycs\hat x{^}
\keycs\nabla{N}
\keycs\infty{I}
\keycs\forall{A}
\keycs\exists{E}
\keycs\not \ {/}
\keycs\in{i}
\keycs\times{*}
\keycs\cdot{.}
\keycs\colon{:}
\keycs\subset{\{}
\keycs\supset{\}}
\keycs\subseteq{[}
\keycs\supseteq{]}
\keycs\emptyset{0}
\keycs\setminus{\\}
\keycs\cup{+}
\keycs\cap{-}
\keycs\langle{(}
\keycs\rangle{)}
\keycs\exp{C-e}
\keycs\sin{C-s}
\keycs\cos{C-c}
\keycs\sup{C-^}
\keycs\inf{C-_}
\keycs\det{C-d}
\keycs\lim{C-l}
\keycs\tan{C-t}
\keycs\vee{|}
\keycs\wedge{\&}
\section{Miscellaneous}
\key{cal letters}{c \<letter>}
\newcolumn
\def\previewlatex{{preview-latex}}
\title{\previewlatex}
\section{Activation}
\previewlatex\ is part of AUC\TeX. If it is active, you should see an
entry ``Preview'' in the menu bar when editing \LaTeX{} files. If you
have a ``LaTeX'', but no ``Preview'' menu, add the following to your
{\tt .emacs} file:
\beginexample
(load "preview-latex.el" nil t t)
\endexample
\section{Usage and keybindings}
\previewlatex\ operation only affects the display of the buffer, not
its contents. It runs only on demand, using the target {\sc dvi} or
{\sc PDF} files in the process. The first command in the following
list (also on the toolbar button) will (as applicable) repreview an
active region or a single modified preview, toggle the visibility of
an unmodified preview or generate previews for a surrounding buffer
area up to the next preview.
\key{Preview at point}{C-c C-p C-p}
\key{Preview environment}{C-c C-p C-e}
\key{Preview region}{C-c C-p C-r}
\key{Preview buffer}{C-c C-p C-b}
\key{Preview document}{C-c C-p C-d}
\key{Remove previews at point}{C-c C-p C-c C-p}
\key{Remove previews from region}{C-c C-p C-c C-r}
\key{Remove previews from buffer}{C-c C-p C-c C-b}
\key{Remove previews from document}{C-c C-p C-c C-d}
\key{Cache preamble}{C-c C-p C-f}
\key{Switch off preamble cache}{C-c C-p C-c C-f}
\key{Read Texinfo manual}{C-c C-p TAB}
\key{Copy region as MML}{C-c C-p C-w}
The last keysequence will copy a region with previews into the kill
buffer in a form fit for sending in Emacs' message-mode.
\section{Customization within Emacs}
You can use \kbd{M-x customize-variable RET} or the ``Preview\slash
Customize'' menu for customization. Worthwhile settings:
\halign to \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr
\noalign{\medskip If you have dvipng available:}
Set to \kbd{dvipng}&preview-image-type\cr
\noalign{\medskip \vbox{Keep counter values when regenerating
single previews:}}
Set to \kbd{t}&preview-preserve-counters\cr
\noalign{\medskip \vbox{Cache/Don't cache preamble without query
(preamble caching is done using {\tt mylatex.ltx} and might not always
work. Use the appropriate key sequences for overriding the following
setting):}}
Set to \kbd{t}/\kbd{nil}&preview-auto-cache-preamble\cr}
\section{Customization from \LaTeX{}}
Customization is done in the document preamble (you need to load {\tt
preview.sty} explicitly) or in {\tt prauctex.cfg} (which should load
the system {prauctex.cfg} first). Commands:
\halign to \hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr
Preview macro&\string\PreviewMacro[\{\<args>\}]\{\<macro>\}\cr
Preview env&\string\PreviewEnvironment[\{\<args>\}]\{\<env>\}\cr
Skip macro&\string\PreviewMacro*[\{\<args>\}]\{\<macro>\}\cr
Skip env&\string\PreviewEnvironment*[\{\<args>\}]\{\<env>\}\cr
\noalign{\smallskip Diverting material from float environments}
Snarf stuff&\string\PreviewSnarfEnvironment[\{\<args>\}]\{\<env>\}\cr
}
Values to be used within \<args>:
\halign to
\hsize{\tabskip=1ptplus1fil\relax#\hfil&\hfil\kbd{#}\tabskip0pt\cr
Optional argument&[]\cr
Mandatory argument&\{\}\cr
Optional star&*\cr
Conditionals&?\<token>\{\<if found>\}\{\<if not found>\}\cr
Skip next token&-\cr
Transformation&\#\{\<macro args>\}\{\<replacement>\}\cr
}
More options and explanations can be found in {\tt preview.dvi} or the
Texinfo manual.
\vskip 5ex plus 6ex minus 1ex
\title{Folding Source Display}
\key{Toggle folding mode}{C-c C-o C-f}
\key{Hide all items in buffer}{C-c C-o C-b}
\key{Hide all items in region}{C-c C-o C-r}
\key{Hide all items in paragraph}{C-c C-o C-p}
\key{Hide current macro}{C-c C-o C-m}
\key{Hide current environment}{C-c C-o C-e}
\key{Show all items in buffer}{C-c C-o b}
\key{Show all items in region}{C-c C-o r}
\key{Show all items in paragraph}{C-c C-o p}
\key{Show current item}{C-c C-o i}
\key{Hide or show current item}{C-c C-o C-o}
\vskip 5ex plus 6ex minus 1ex
\title{Outlining \TeX\ Documents}
AUC\TeX\ supports outline mode by defining section, subsection,
etc. as heading levels. You can use \kbd{M-x outline-minor-mode RET}
to toggle outline minor mode. All outline minor mode commands are
under the prefix key specified by outline-minor-mode-prefix, default
is ``C-c @''.
\key{Hide all of buffer except headings}{C-c @ C-t}
\key{Show all text in buffer}{C-c @ C-a}
\key{Hide body following this heading}{C-c @ C-c}
\key{Show body following this heading}{C-c @ C-e}
\key{Hide subtree}{C-c @ C-d}
\key{Show subtree}{C-c @ C-s}
\key{All subheadings visible}{C-c @ C-k}
\key{next visible heading}{C-c @ C-n}
\key{previous visible heading}{C-c @ C-p}
\key{forward to next subheading}{C-c @ C-f}
\key{backward to next subheading}{C-c @ C-b}
\key{up one heading level}{C-c @ C-u}
\newcolumn
\iftrue % RefTeX long version
\title{RefTeX}
\section{Activation}
RefTeX is part of [X]Emacs. To activate and make it interact with
AUCTeX, insert the following lines in .emacs.
\vskip-3mm
\beginexample
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-auctex t)
\endexample
\section{Table of Contents}
The table of contents is a structured view of the entire document. It
contains the sections, and optionally labels, index entries, and file
boundaries.
\key{Show the table of contents$\sp1$}{C-c =}
\key{Recenter *toc* buffer to here$\sp1$}{C-c -}
\section{Crossreferences, Citations, Index}
\key{Insert unique label$\sp1$}{C-c (}
\key{Reference a label$\sp1$}{C-c )}
\key{Insert citation with key selection}{C-c [}
\key{\dots\ prompt for optional arguments}{C-u C-c [}
\key{Index word at point with default macro}{C-c /}
\key{Insert an index entry}{C-c <}
\key{Add word to index phrases}{C-c \\}
\key{Visit index phrases buffer}{C-c |}
\key{Compile and display index}{C-c >}
\key{View cross reference$\sp1$}{C-c \&}
\key{View cross reference with mouse}{S-mouse-2}
\key{View cross reference from BibTeX file}{C-c \&}
\section{Standard keys in special buffers}
RefTeX's special buffers have many active keys. The common ones are:
\key{Display summary of active keys}{?}
\key{Select this item}{RET}
\key{Rescan the document}{r}
\key{Display location in other window}{SPC}
\key{Follow mode}{f}
\section{Multifile actions}
Since RefTeX scans the entire (multifile) document, it can provide
commands that act on all files of a document. Check the {\tt
Ref->Global Actions} menu for these commands.
\section{Variables}
To tell reftex about your own macro definitions, customize the
variables
\vskip-3mm
\beginexample
reftex-label-alist
reftex-section-levels
reftex-index-macros
reftex-cite-format
\endexample
\vskip2mm\hrule
$\sp1$ An argument of \kbd{C-u} triggers a document scan first. This can
be necessary if file content and RefTeX's knowledge are no longer
consistent.
\else % RefTeX compact version
\csname title\endcsname{RefTeX}
\section{Activation in .emacs}
\vskip-4mm
\beginexample
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(setq reftex-plug-into-auctex t)
\endexample
\section{Table of Contents}
\key{Show the table of contents$\sp1$}{C-c =}
\key{Recenter *toc* buffer to here$\sp1$}{C-c -}
\section{Crossreferences, Citations, Index}
\key{Insert unique label$\sp1$}{C-c (}
\key{Reference a label$\sp1$}{C-c )}
\key{Insert citation with key selection}{C-c [}
\key{... prompt for optional arguments}{C-u C-c [}
\key{Index word at point with default macro}{C-c /}
\key{Insert an index entry}{C-c <}
\key{Add word to index phrases}{C-c \\}
\key{Visit index phrases buffer}{C-c |}
\key{Compile and display index}{C-c >}
\key{View cross reference$\sp1$}{C-c \&}
\key{View cross reference with mouse}{S-mouse-2}
\key{View cross reference from BibTeX file}{C-c \&}
\vskip2mm\hrule
$\sp1$ An argument of \kbd{C-u} triggers a document scan first.
\fi
\bye
%%% Local Variables:
%%% mode: plain-TeX
%%% TeX-master: t
%%% End:

View File

@@ -0,0 +1,300 @@
@c This is part of the AUCTeX Manual.
@c Copyright (C) 2004-2006, 2008, 2009, 2013-2015 Free Software
@c Foundation, Inc.
@c See the file auctex.texi for copying conditions.
@ifset rawfile
@include macros.texi
@node Development,,(dir),(dir)
@top Future Development of @AUCTeX{}
@end ifset
The following sections describe future development of @AUCTeX{}.
Besides mid-term goals, bug reports and requests we cannot fix or honor
right away are being gathered here. If you have some time for Emacs
Lisp hacking, you are encouraged to try to provide a solution to one of
the following problems. If you don't know Lisp, you may help us to
improve the documentation. It might be a good idea to discuss proposed
changes on the mailing list of @AUCTeX{} first.
@menu
* Mid-term Goals::
* Wishlist::
* Bugs::
@end menu
@ifset rawfile
@node Mid-term Goals
@chapter Mid-term Goals
@raisesections
@end ifset
@ifclear rawfile
@node Mid-term Goals
@section Mid-term Goals
@end ifclear
@itemize @bullet
@item Integration of @previewlatex{} into @AUCTeX{}
As of @AUCTeX{} 11.81 @previewlatex{} is a part of @AUCTeX{} in the
sense that the installation routines were merged and @previewlatex{} is
being packaged with @AUCTeX{}.
Further integration will happen at the backend. This involves folding
of error parsing and task management of both packages which will ease
development efforts and avoid redundant work.
@item Error help catalogs
Currently, the help for errors is more or less hardwired into
@file{tex.el}. For supporting error help in other languages, it would
be sensible to instead arrange error messages in language-specific
files, make a common info file from all such catalogs in a given
language and look the error texts up in an appropriate index. The user
would then specify a preference list of languages, and the errors would
be looked up in the catalogs in sequence until they were identified.
@item Combining @samp{docTeX} with RefTeX
Macro cross references should also be usable for document navigation
using RefTeX.
@end itemize
@node Wishlist
@section Wishlist
@itemize @bullet
@item Documentation lookup for macros
A parser could gather information about which macros are defined in
which @LaTeX{} packages and store the information in a hashtable which
can be used in a backend for @code{TeX-doc} in order to open the
matching documentation for a given macro. The information could also be
used to insert an appropriate @samp{\usepackage} statement if the user
tries to insert a macro for which the respective package has not been
requested yet.
@item Improvements to error reporting
Fringe indicators for errors in the main text would be nice.
@item A math entry grid
A separate frame with a table of math character graphics to click on in
order to insert the respective sequence into the buffer (cf. the
``grid'' of x-symbol).
@item Crossreferencing support
It would be nice if you could index process your favorite collection of
@file{.dtx} files (such as the LaTeX source), just call a command on
arbitrary control sequence, and get either the DVI viewer opened right
at the definition of that macro (using Source Specials), or the source
code of the @file{.dtx} file.
@item Better plain TeX support
For starters, @code{LaTeX-math-mode} is not very @LaTeX{}-specific in
the first place, and similar holds for indentation and formatting.
@item
Page count when compiling should (optionally) go to modeline of the
window where the compilation command was invoked, instead of the output
window. Suggested by Karsten Tinnefeld
<tinnefeld@@irb.informatik.uni-dortmund.de>.
@item
Command to insert a macrodefinition in the preamble, without moving
point from the current location. Suggested by
"Jeffrey C. Ely" <ely@@nwu.edu>.
@item
A database of all commands defined in all stylefiles. When a command or
environment gets entered that is provided in one of the styles, insert
the appropriate @code{\usepackage} in the preamble.
@item
A way to add and overwrite math mode entries in style files, and to
decide where they should be. Suggested by Remo Badii <Remo.Badii@@psi.ch>.
@item
Create template for (first) line of tabular environment.
@item
@c Already fixed?
I think prompting for the master is the intended behaviour. It
corresponds to a `shared' value for TeX-master.
There should probably be a `none' value which wouldn't query for the
master, but instead disable all features that relies on TeX-master.
This default value for TeX-master could then be controled with mapping
based on the extension.
@item
Use index files (when available) to speed up @kbd{C-c C-m include
@key{RET}}.
@item
Option not to calculate very slow completions like for
@kbd{C-c C-m include @key{RET}}.
@item
Font menu should be created from @code{TeX-font-list}.
@item
Installation procedure written purely in emacs lisp.
@item
Included PostScript files should also be counted as part of the
document.
@item
A nice hierarchical by-topic organization of all officially documented
LaTeX macros, available from the menu bar.
@item
@code{TeX-command-default} should be set from the master file, if not
set locally. Suggested by Peter Whaite @samp{<peta@@cim.mcgill.ca>}.
@item
Make @AUCTeX{} work with @samp{crypt++}. Suggested by Chris Moore
@samp{<Chris.Moore@@src.bae.co.uk>}.
@item
Make @AUCTeX{} work with @samp{longlines}. This would also apply to
@previewlatex{}, though it might make sense to unify error processing
before attempting this.
@item
The @samp{Spell} command should apply to all files in a document. Maybe
it could try to restrict to files that have been modified since last
spell check? Suggested by Ravinder Bhumbla @samp{<rbhumbla@@ucsd.edu>}.
@item
Make @key{.} check for abbreviations and sentences ending with capital
letters.
@item
Use Emacs 19 minibuffer history to choose between previewers, and other
stuff. Suggested by John Interrante
@samp{<interran@@uluru.Stanford.EDU>}.
@item
Documentation of variables that can be set in a style hook.
We need a list of what can safely be done in an ordinary style hook.
You can not set a variable that @AUCTeX{} depends on, unless @AUCTeX{}
knows that it has to run the style hooks first.
Here is the start of such a list.
@table @code
@item LaTeX-add-environments
@item TeX-add-symbols
@item LaTeX-add-labels
@item LaTeX-add-bibliographies
@item LaTeX-largest-level
@end table
@item
Outline should be (better) supported in @TeX{} mode.
At least, support headers, trailers, as well as TeX-outline-extra.
@item
@code{TeX-header-start} and @code{TeX-trailer-end}.
We might want these, just for fun (and outlines)
@item
Plain @TeX{} and @LaTeX{} specific header and trailer expressions.
We should have a way to globally specify the default value of the header
and trailer regexps.
@item
Get closer to original @code{TeX-mode} keybindings.
A third initialization file (@file{tex-mode.el}) containing an emulator
of the standard @code{TeX-mode} would help convince some people to
change to @AUCTeX{}.
@item
Use markers in @code{TeX-error-list} to remember buffer positions in
order to be more robust with regard to line numbers and changed files.
@item
Finish the Texinfo mode. For one thing, many Texinfo mode commands do
not accept braces around their arguments.
@item
Hook up the letter environment with @file{bbdb.el}.
@end itemize
@node Bugs
@section Bugs
@c FIXME: Are those bugs still present?
@itemize @bullet
@item
The style hooks automatically generated by parsing files for
@file{example.dtx}, @file{example.sty}, @file{example.drv} and
@file{example.bib} all clash. Bad. Clash with hand-written style hooks
should be removed by dialect discrimination --- to be checked.
@item
@kbd{C-c `} should always stay in the current window, also when it finds
a new file.
@item
Do not overwrite emacs warnings about existing auto-save files when
loading a new file.
@item
Maybe the regexp for matching a TeX symbol during parsing should be
@samp{"\\\\\\([a-zA-Z]+\\|.\\)"} ---
@samp{<thiemann@@informatik.uni-tuebingen.de>} Peter Thiemann.
@item
@AUCTeX{} should not parse verbatim environments.
@item
Make @samp{`} check for math context in @code{LaTeX-math-mode}. and
simply self insert if not in a math context.
@item
Make @code{TeX-insert-dollar} more robust. Currently it can be fooled
by @samp{\mbox}'es and escaped double dollar for example.
@item
Correct indentation for tabular, tabbing, table, math, and array
environments.
@item
No syntactic font locking of verbatim macros and environments. (XEmacs
only)
@item
Font locking inside of verbatim macros and environments is not
inhibited. This may result in syntax highlighting of unbalanced dollar
signs and the like spilling out of the verbatim content. (XEmacs only)
@item
Folding of @LaTeX{} constructs spanning more than one line may result in
overfull lines. (XEmacs only)
@end itemize
@c Local Variables:
@c mode: texinfo
@c TeX-master: "auctex"
@c End:

View File

@@ -0,0 +1,386 @@
@c This is part of the AUCTeX Manual.
@c Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009
@c Free Software Foundation, Inc.
@c See the file auctex.texi for copying conditions.
@ifset rawfile
@include macros.texi
@end ifset
@subheading In a Nutshell
The following are brief installation instructions for the impatient. In
case you don't understand some of this, run into trouble of some sort,
or need more elaborate information, refer to the detailed instructions
further below.
@enumerate
@item
Install the prerequisites, i.e. Emacs or XEmacs, MSYS or Cygwin, a
@TeX{} system, and Ghostscript.
@item
Open the MSYS shell or a Cygwin shell and change to the directory
containing the unzipped file contents.
@item
Configure @AUCTeX{}:
For Emacs: Many people like to install @AUCTeX{} into the pseudo file
system hierarchy set up by the Emacs installation. Assuming Emacs is
installed in @file{C:/Program Files/Emacs} and the directory for local
additions of your @TeX{} system, e.g. MiK@TeX{}, is
@file{C:/localtexmf}, you can do this by typing the following statement
at the shell prompt:
@example
./configure --prefix='C:/Program Files/Emacs' \
--infodir='C:/Program Files/Emacs/info' \
--with-texmf-dir='C:/localtexmf'
@end example
For XEmacs: You can install @AUCTeX{} as an XEmacs package. Assuming
XEmacs is installed in @file{C:/Program Files/XEmacs} and the directory
for local additions of your @TeX{} system, e.g. MiK@TeX{}, is
@file{C:/localtexmf}, you can do this by typing the following command at
the shell prompt:
@example
./configure --with-xemacs='C:/Program Files/XEmacs/bin/xemacs' \
--with-texmf-dir='C:/localtexmf'
@end example
The commands above are examples for common usage. More on configuration
options can be found in the detailed installation instructions below.
If the configuration script failed to find all required programs, make
sure that these programs are in your system path and add directories
containing the programs to the @env{PATH} environment variable if
necessary. Here is how to do that in W2000/XP:
@enumerate
@cindex Adding to @env{PATH} in Windows
@cindex @env{PATH} in Windows
@item
On the desktop, right click ``My Computer'' and select properties.
@item
Click on ``Advanced'' in the ``System Properties'' window.
@item
Select ``Environment Variables''.
@item
Select ``path'' in ``System Variables'' and click ``edit''. Move to the
front in the line (this might require scrolling) and add the missing
path including drive letter, ended with a semicolon.
@end enumerate
@item
If there were no further error messages, type
@example
make
@end example
In case there were, please refer to the detailed description below.
@item
Finish the installation by typing
@example
make install
@end example
@end enumerate
@subheading Detailed Installation Instructions
Installation of @AUCTeX{} under Windows is in itself not more
complicated than on other platforms. However, meeting the prerequisites
might require more work than on some other platforms, and feel less
natural.
If you are experiencing any problems, even if you think they are of your
own making, be sure to report them to @email{auctex-devel@@gnu.org} so
that we can explain things better in future.
Windows is a problematic platform for installation scripts. The main
problem is that the installation procedure requires consistent file
names in order to find its way in the directory hierarchy, and Windows
path names are a mess.
The installation procedure tries finding stuff in system search paths
and in Emacs paths. For that to succeed, you have to use the same
syntax and spelling and case of paths everywhere: in your system search
paths, in Emacs' @code{load-path} variable, as argument to the scripts.
If your path names contain spaces or other `shell-unfriendly'
characters, most notably backslashes for directory separators, place the
whole path in @samp{"double quote marks"} whenever you specify it on a
command line.
Avoid `helpful' magic file names like @samp{/cygdrive/c} and
@samp{C:\PROGRA~1\} like the plague. It is quite unlikely that the
scripts will be able to identify the actual file names involved. Use
the full paths, making use of normal Windows drive letters like
@samp{ 'C:/Program Files/Emacs' } where required, and using the same
combination of upper- and lowercase letters as in the actual files.
File names containing shell-special characters like spaces or
backslashes (if you prefer that syntax) need to get properly quoted to
the shell: the above example used single quotes for that.
Ok, now here are the steps to perform:
@enumerate
@item
You need to unpack the @AUCTeX{} distribution (which you seemingly have
done since you are reading this). It must be unpacked in a separate
installation directory outside of your Emacs file hierarchy: the
installation will later copy all necessary files to their final
destination, and you can ultimately remove the directory where you
unpacked the files.
Line endings are a problem under Windows. The distribution contains
only text files, and theoretically most of the involved tools should get
along with that. However, the files are processed by various utilities,
and it is conceivable that not all of them will use the same line ending
conventions. If you encounter problems, it might help if you try
unpacking (or checking out) the files in binary mode, if your tools
allow that.
If you don't have a suitable unpacking tool, skip to the next step: this
should provide you with a working @samp{unzip} command.
@item
The installation of @AUCTeX{} will require the MSYS tool set from
@uref{http://www.mingw.org/} or the Cygwin tool set from
@uref{http://cygwin.com/}. The latter is slower and larger (the download
size of the base system is about 15 MB) but comes with a package manager
that allows for updating the tool set and installing additional packages
like, for example, the spell checker @w{aspell}.
If Cygwin specific paths like @samp{/cygdrive/c} crop up in the course
of the installation, using a non-Cygwin Emacs could conceivably cause
trouble. Using Cygwin either for everything or nothing might save
headaches, @emph{if} things don't work out.
@item
Install a current version of XEmacs from @uref{http://www.xemacs.org/}
or @w{Emacs} from @uref{ftp://ftp.gnu.org/gnu/emacs/windows/}.
@w{Emacs} is the recommended choice because it is currently the primary
platform for @AUCTeX{} development.
@item
You need a working @TeX{} installation. One popular installation under
Windows is @uref{http://www.miktex.org,MiK@TeX{}}. Another much more
extensive system is @uref{http://www.tug.org/texlive,@w{@TeX{} Live}}
which is rather close to its Unix cousins.
@item
A working copy of @uref{http://www.cs.wisc.edu/~ghost/,Ghostscript} is
required for @previewlatex{} operation. Examining the output from
@example
gswin32c -h
@end example
on a Windows command line should tell you whether your Ghostscript
supports the @code{png16m} device needed for @acronym{PNG} support.
MiKTeX apparently comes with its own Ghostscript called @samp{mgs.exe}.
@item
@uref{http://www.perl.org,Perl} is needed for rebuilding the
documentation if you are working with a copy from @acronym{Git} or have
touched documentation source files in the @previewlatex{} part. If the
line endings of the file @file{preview/latex/preview.dtx} don't
correspond with what Perl calls @code{\n} when reading text files,
you'll run into trouble.
@item
Now the fun stuff starts. If you have not yet done so, unpack the
@AUCTeX{} distribution into a separate directory after rereading the
instructions for unpacking above.
@item
Ready for takeoff. Start some shell (typically @command{bash}) capable of
running @command{configure}, change into the installation directory and
call @command{./configure} with appropriate options.
Typical options you'll want to specify will be
@table @code
@item --prefix=@var{drive:/path/to/emacs-hierarchy}
which tells @file{configure} where to perform the installation. It may
also make @file{configure} find Emacs or XEmacs automatically; if this
doesn't happen, try one of @samp{--with-emacs} or @samp{--with-xemacs}
as described below. All automatic detection of files and directories
restricts itself to directories below the @var{prefix} or in the same
hierarchy as the program accessing the files. Usually, directories like
@file{man}, @file{share} and @file{bin} will be situated right under
@var{prefix}.
This option also affects the defaults for placing the Texinfo
documentation files (see also @samp{--infodir} below) and automatically
generated style hooks.
If you have a central directory hierarchy (not untypical with Cygwin)
for such stuff, you might want to specify its root here. You stand a
good chance that this will be the only option you need to supply, as
long as your @TeX{}-related executables are in your system path, which
they better be for @AUCTeX{}'s operation, anyway.
@item --with-emacs
if you are installing for a version of Emacs. You can use
@samp{--with-emacs=@var{drive:/path/to/emacs}} to specify the name of the
installed Emacs executable, complete with its path if necessary (if
Emacs is not within a directory specified in your @env{PATH} environment
setting).
@item --with-xemacs
if you are installing for a version of XEmacs. Again, you can use
@samp{--with-xemacs=@var{drive:/path/to/xemacs}} to specify the name of the
installed XEmacs executable complete with its path if necessary. It may
also be necessary to specify this option if a copy of Emacs is found in
your @env{PATH} environment setting, but you still would like to install
a copy of @AUCTeX{} for XEmacs.
@item --with-packagedir=@var{drive:/dir}
is an XEmacs-only option giving the location of the package directory.
This will install and activate the package. Emacs uses a different
installation scheme:
@item --with-lispdir=@var{drive:/path/to/site-lisp}
This Emacs-only option tells a place in @code{load-path} below which the
files are situated. The startup files @file{auctex.el} and
@file{preview-latex.el} will get installed here unless a subdirectory
@file{site-start.d} exists which will then be used instead. The other
files from @AUCTeX{} will be installed in a subdirectory called
@file{auctex}.
If you think that you need a different setup, please refer to the full
installation instructions in
@ifset rawfile
the @file{INSTALL} file.
@end ifset
@ifclear rawfile
@ref{Configure}.
@end ifclear
@item --infodir=@var{drive:/path/to/info/directory}
If you are installing into an Emacs directory, info files have to be put
into the @file{info} folder below that directory. The configuration
script will usually try to install into the folder @file{share/info}, so
you have to override this by specifying something like
@samp{--infodir='C:/Program Files/info'} for the configure call.
@item --with-auto-dir=@var{drive:/dir}
Directory containing automatically generated information. You should
not normally need to set this, as @samp{--prefix} should take care of
this.
@item --disable-preview
Use this option if your Emacs version is unable to support image
display. This will be the case if you are using a native variant of
@w{Emacs 21}.
@item --with-texmf-dir=@var{drive:/dir}
This will specify the directory where your @TeX{} installation sits. If
your @TeX{} installation does not conform to the TDS (@TeX{} directory
standard), you may need to specify more options to get everything in
place.
@end table
For more information about any of the above and additional options, see
@ifset rawfile
the `Configure' section in the @file{INSTALL} file.
@end ifset
@ifclear rawfile
@ref{Configure}.
@end ifclear
Calling
@file{./configure --help=recursive}
will tell about other options, but those are almost never required.
Some executables might not be found in your path. That is not a good
idea, but you can get around by specifying environment variables to
@file{configure}:
@example
GS="@var{drive:/path/to/gswin32c.exe}" ./configure @dots{}
@end example
should work for this purpose. @file{gswin32c.exe} is the usual name for
the required @emph{command line} executable under Windows; in contrast,
@file{gswin32.exe} is likely to fail.
As an alternative to specifying variables for the @file{configure} call
you can add directories containing the required executables to the
@env{PATH} variable of your Windows system. This is especially a good
idea if Emacs has trouble finding the respective programs later during
normal operation.
@item
Run @command{make} in the installation directory.
@item
Run @code{make install} in the installation directory.
@item
With XEmacs, @AUCTeX{} and @previewlatex{} should now be active by
default. With Emacs, activation depends on a working
@file{site-start.d} directory or similar setup, since then the startup
files @file{auctex.el} and @file{preview-latex.el} will have been placed
there. If this has not been done, you should be able to load the
startup files manually with
@example
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
@end example
in either a site-wide @file{site-start.el} or your personal startup file
(usually accessible as @file{~/.emacs} from within Emacs and
@file{~/.xemacs/init.el} from within XEmacs).
@cindex @file{tex-mik.el}
The default configuration of @AUCTeX{} is probably not the best fit for
Windows systems with MiK@TeX{}. You might want to add
@example
(require 'tex-mik)
@end example
after loading @file{auctex.el} and @file{preview-latex.el} in order to
get more appropriate values for some customization options.
You can always use
@example
@kbd{M-x customize-group RET AUCTeX RET}
@end example
in order to customize more stuff, or use the @samp{Customize} menu.
@item
Load @file{preview/circ.tex} into Emacs or XEmacs and see if you get the
@samp{Command} menu. Try using it to @LaTeX{} the file.
@item
Check whether the @samp{Preview} menu is available in this file. Use it
to generate previews for the document.
If this barfs and tells you that image type @samp{png} is not supported,
you can either add @acronym{PNG} support to your Emacs installation or
choose another image format to be used by @previewlatex{}.
Adding support for an image format usually involves the installation of
a library, e.g. from @uref{http://gnuwin32.sf.net/}. If you got your
Emacs from @uref{http://www.gnu.org} you might want to check its
@uref{ftp://ftp.gnu.org/gnu/emacs/windows/README,README file} for
details.
A different image format can be chosen by setting the variable
@code{preview-image-type}. While it is recommended to keep the
@samp{dvipng} or @samp{png} setting, you can temporarily select a
different format like @samp{pnm} to check if the lack of @acronym{PNG}
support is the only problem with your Emacs installation.
Try adding the line
@example
(setq preview-image-type 'pnm)
@end example
to your init file for a quick test. You should remove the line after
the test again, because @acronym{PNM} files take away @strong{vast}
amounts of disk space, and thus also of load/save time.
@end enumerate
Well, that about is all. Have fun!