]> code.delx.au - gnu-emacs-elpa/blob - packages/auctex-11.86/preview-latex.info
(debbugs-emacs): New function and modes for listing the Emacs bugs, reading them...
[gnu-emacs-elpa] / packages / auctex-11.86 / preview-latex.info
1 This is preview-latex.info, produced by makeinfo version 4.13 from
2 preview-latex.texi.
3
4 This manual is for preview-latex, a LaTeX preview mode for AUCTeX
5 (version 11.86 from 2010-02-21).
6
7 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
8 Foundation, Inc.
9
10 Permission is granted to copy, distribute and/or modify this
11 document under the terms of the GNU Free Documentation License,
12 Version 1.3 or any later version published by the Free Software
13 Foundation; with no Invariant Sections, no Front-Cover Texts and
14 no Back-Cover Texts. A copy of the license is included in the
15 section entitled "GNU Free Documentation License."
16
17 INFO-DIR-SECTION Emacs
18 START-INFO-DIR-ENTRY
19 * preview-latex: (preview-latex). Preview LaTeX fragments in Emacs
20 END-INFO-DIR-ENTRY
21 INFO-DIR-SECTION TeX
22 START-INFO-DIR-ENTRY
23 * preview-latex: (preview-latex). Preview LaTeX fragments in Emacs
24 END-INFO-DIR-ENTRY
25
26 \1f
27 File: preview-latex.info, Node: Top, Prev: (dir), Up: (dir)
28
29 preview-latex
30 *************
31
32 This manual may be copied under the conditions spelled out in *note
33 Copying this Manual::.
34
35 preview-latex is a package embedding preview fragments into Emacs
36 source buffers under the AUCTeX editing environment for LaTeX. It uses
37 `preview.sty' for the extraction of certain environments (most notably
38 displayed formulas). Other applications of this style file are
39 possible and exist.
40
41 The name of the package is really `preview-latex', all in lowercase
42 letters, with a hyphen. If you typeset it, you can use a sans-serif
43 font to visually offset it.
44
45 * Menu:
46
47 * Copying:: Copying
48 * Introduction:: Getting started.
49 * Installation:: Make Install.
50 * Keys and lisp:: Key bindings and user-level lisp functions.
51 * Simple customization:: To make it fit in.
52 * Known problems:: When things go wrong.
53 * For advanced users:: Internals and more customizations.
54 * ToDo:: Future development.
55 * Frequently Asked Questions:: All about preview-latex
56 * Copying this Manual:: GNU Free Documentation License
57 * Index:: A menu of many topics.
58
59 \1f
60 File: preview-latex.info, Node: Copying, Next: Introduction, Prev: Top, Up: Top
61
62 Copying
63 *******
64
65 For the conditions for copying parts of preview-latex, see the General
66 Public Licenses referres to in the copyright notices of the files, the
67 General Public Licenses accompanying them and the explanatory section in
68 *note Copying: (auctex)Copying.
69
70 This manual specifically is covered by the GNU Free Documentation
71 License (*note Copying this Manual::).
72
73 \1f
74 File: preview-latex.info, Node: Introduction, Next: Installation, Prev: Copying, Up: Top
75
76 1 Introduction
77 **************
78
79 Does your neck hurt from turning between previewer windows and the
80 source too often? This AUCTeX component will render your displayed
81 LaTeX equations right into the editing window where they belong.
82
83 The purpose of preview-latex is to embed LaTeX environments such as
84 display math or figures into the source buffers and switch conveniently
85 between source and image representation.
86
87 * Menu:
88
89 * What use is it?::
90 * Activating preview-latex::
91 * Getting started::
92 * Basic modes of operation::
93 * More documentation::
94 * Availability::
95 * Contacts::
96
97 \1f
98 File: preview-latex.info, Node: What use is it?, Next: Activating preview-latex, Prev: Introduction, Up: Introduction
99
100 1.1 What use is it?
101 ===================
102
103 WYSIWYG (what you see is what you get) sometimes is considered all
104 the rage, sometimes frowned upon. Do we really want it? Wrong
105 question. The right question is _what_ we want from it. Except when
106 finetuning the layout, we don't want to use printer fonts for on-screen
107 text editing. The low resolution and contrast of a computer screen
108 render all but the coarsest printer fonts (those for low-quality
109 newsprint) unappealing, and the margins and pagination of the print are
110 not wanted on the screen, either. On the other hand, more complex
111 visual compositions like math formulas and tables can't easily be taken
112 in when seen only in the source. preview-latex strikes a balance: it
113 only uses graphic renditions of the output for certain, configurable
114 constructs, does this only when told, and then right in the source code.
115 Switching back and forth between the source and preview is easy and
116 natural and can be done for each image independently. Behind the scenes
117 of preview-latex, a sophisticated framework of other programs like
118 `dvipng', Dvips and Ghostscript are employed together with a special
119 LaTeX style file for extracting the material of interest in the
120 background and providing fast interactive response.
121
122 \1f
123 File: preview-latex.info, Node: Activating preview-latex, Next: Getting started, Prev: What use is it?, Up: Introduction
124
125 1.2 Activating preview-latex
126 ============================
127
128 After installation, the package may need to be activated (and remember
129 to activate AUCTeX too). In XEmacs, and in any prepackaged versions
130 worth their salt, activation should be automatic upon installation. If
131 this seems not the case, complain to your installation provider.
132
133 The usual activation (if it is not done automatically) would be
134
135 (load "preview-latex.el" nil t t)
136
137 If you still don't get a "Preview" menu in LaTeX mode in spite of
138 AUCTeX showing its "Command", your installation is broken. One
139 possible cause are duplicate Lisp files that might be detectable with
140 `<M-x> list-load-path-shadows <RET>'.
141
142 \1f
143 File: preview-latex.info, Node: Getting started, Next: Basic modes of operation, Prev: Activating preview-latex, Up: Introduction
144
145 1.3 Getting started
146 ===================
147
148 Once activated, preview-latex and its documentation will be accessible
149 via its menus (note that preview-latex requires AUCTeX to be loaded).
150 When you have loaded a LaTeX document (a sample document `circ.tex' is
151 included in the distribution, but most documents including math and/or
152 figures should do), you can use its menu or `C-c C-p C-d' (for
153 `Preview/Document'). Previews will now be generated for various
154 objects in your document. You can use the time to take a short look at
155 the other menu entries and key bindings in the `Preview' menu. You'll
156 see the previewed objects change into a roadworks sign when
157 preview-latex has determined just what it is going to preview. Note
158 that you can freely navigate the buffer while this is going on. When
159 the process is finished you will see the objects typeset in your buffer.
160
161 It is a bad idea, however, to edit the buffer before the roadworks
162 signs appear, since that is the moment when the correlation between the
163 original text and the buffer locations gets established. If the buffer
164 changes before that point of time, the previews will not be placed where
165 they belong. If you do want to change some obvious error you just
166 spotted, we recommend you stop the background process by pressing `C-c
167 C-k'.
168
169 To see/edit the LaTeX code for a specific object, put the point (the
170 cursor) on it and press `C-c C-p C-p' (for `Preview/at point'). It
171 will also do to click with the middle mouse button on the preview. Now
172 you can edit the code, and generate a new preview by again pressing
173 `C-c C-p C-p' (or by clicking with the middle mouse button on the icon
174 before the edited text).
175
176 If you are using the `desktop' package, previews will remain from
177 one session to the next as long as you don't kill your buffer. If you
178 are using XEmacs, you will probably need to upgrade the package to the
179 newest one; things are being fixed just as I am writing this.
180
181 \1f
182 File: preview-latex.info, Node: Basic modes of operation, Next: More documentation, Prev: Getting started, Up: Introduction
183
184 1.4 Basic modes of operation
185 ============================
186
187 preview-latex has a number of methods for generating its graphics. Its
188 default operation is equivalent to using the `LaTeX' command from
189 AUCTeX. If this happens to be a call of PDFLaTeX generating PDF output
190 (you need at least AUCTeX 11.51 for this), then Ghostscript will be
191 called directly on the resulting PDF file. If a DVI file gets
192 produced, first Dvips and then Ghostscript get called by default.
193
194 The image type to be generated by Ghostscript can be configured with
195
196 M-x customize-variable RET preview-image-type RET
197
198 The default is `png' (the most efficient image type). A special
199 setting is `dvipng' in case you have the `dvipng' program installed.
200 In this case, `dvipng' will be used for converting DVI files and
201 Ghostscript (with a `PNG' device) for converting PDF files. `dvipng'
202 is much faster than the combination of Dvips and Ghostscript. You can
203 get downloads, access to its CVS archive and further information from
204 its project site (http://savannah.nongnu.org/projects/dvipng).
205
206 \1f
207 File: preview-latex.info, Node: More documentation, Next: Availability, Prev: Basic modes of operation, Up: Introduction
208
209 1.5 More documentation
210 ======================
211
212 After the installation, documentation in the form of this info manual
213 will be available. You can access it with the standalone info reader
214 with
215
216 info preview-latex
217
218 or by pressing `C-h i d m preview-latex <RET>' in Emacs. Once
219 preview-latex is activated, you can instead use `C-c C-p <TAB>' (or the
220 menu entry `Preview/Read documentation').
221
222 Depending on your installation, a printable manual may also be
223 available in the form of `preview-latex.dvi' or `preview-latex.ps'.
224
225 Detailed documentation for the LaTeX style used for extracting the
226 preview images is placed in `preview.dvi' in a suitable directory
227 during installation; on typical teTeX-based systems,
228
229 texdoc preview
230
231 will display it.
232
233 \1f
234 File: preview-latex.info, Node: Availability, Next: Contacts, Prev: More documentation, Up: Introduction
235
236 1.6 Availability
237 ================
238
239 The preview-latex project is now part of AUCTeX and accessible as part
240 of the AUCTeX project page (http://savannah.gnu.org/projects/auctex).
241 You can get its files from the AUCTeX download area
242 (ftp://ftp.gnu.org/pub/gnu/auctex). As of AUCTeX 11.81, preview-latex
243 should already be integrated into AUCTeX, so no separate download will
244 be necessary.
245
246 You will also find `.rpm' files there for Fedora and possibly SuSE.
247 Anonymous CVS is available as well.
248
249 \1f
250 File: preview-latex.info, Node: Contacts, Prev: Availability, Up: Introduction
251
252 1.7 Contacts
253 ============
254
255 Bug reports should be sent by using `M-x preview-report-bug <RET>', as
256 this will fill in a lot of information interesting to us. If the
257 installation fails (but this should be a rare event), report bugs to
258 <bug-auctex@gnu.org>.
259
260 There is a general discussion list for AUCTeX which also covers
261 preview-latex, look at `http://lists.gnu.org/mailman/listinfo/auctex'.
262 For more information on the mailing list, send a message with just the
263 word "help" as subject or body to <auctex-request@gnu.org>. For the
264 developers, there is the <auctex-devel@gnu.org> list; it would probably
265 make sense to direct feature requests and questions about internal
266 details there. There is a low-volume read-only announcement list
267 available to which you can subscribe by sending a mail with "subscribe"
268 in the subject to <info-auctex-request@gnu.org>.
269
270 Offers to support further development will be appreciated. If you
271 want to show your appreciation with a donation to the main developer,
272 you can do so via PayPal to <dak@gnu.org>, and of course you can arrange
273 for service contracts or for added functionality. Take a look at the
274 `TODO' list for suggestions in that area.
275
276 \1f
277 File: preview-latex.info, Node: Installation, Next: Keys and lisp, Prev: Introduction, Up: Top
278
279 2 Installation
280 **************
281
282 Installation is now being covered in *note Installation:
283 (auctex)Installation.
284
285 \1f
286 File: preview-latex.info, Node: Keys and lisp, Next: Simple customization, Prev: Installation, Up: Top
287
288 3 Key bindings and user-level lisp functions
289 ********************************************
290
291 preview-latex adds key bindings starting with `C-c C-p' to the
292 supported modes of AUCTeX (*note (auctex)Key Index::). It will also
293 add its own `Preview' menu in the menu bar, as well as an icon in the
294 toolbar.
295
296 The following only describes the interactive use: view the
297 documentation strings with `C-h f' if you need the Lisp information.
298
299 `C-c C-p C-p'
300 `preview-at-point'
301 Preview/Generate previews (or toggle) at point
302 If the cursor is positioned on or inside of a preview area, this
303 toggles its visibility, regenerating the preview if necessary. If
304 not, it will run the surroundings through preview. The
305 surroundings include all areas up to the next valid preview,
306 unless invalid previews occur before, in which case the area will
307 include the last such preview in either direction. And overriding
308 any other action, if a region is active (`transient-mark-mode' or
309 `zmacs-regions'), it is run through `preview-region'.
310
311 `<mouse-2>'
312 The middle mouse button has a similar action bound to it as
313 `preview-at-point', only that it knows which preview to apply it to
314 according to the position of the click. You can click either
315 anywhere on a previewed image, or when the preview is opened and
316 showing the source text, you can click on the icon preceding the
317 source text. In other areas, the usual mouse key action
318 (typically: paste) is not affected.
319
320 `<mouse-3>'
321 The right mouse key pops up a context menu with several options:
322 toggling the preview, regenerating it, removing it (leaving the
323 unpreviewed text), copying the text inside of the preview, and
324 copying it in a form suitable for copying as an image into a mail
325 or news article. This is a one-image variant of the following
326 command:
327
328 `C-c C-p C-w'
329 `preview-copy-region-as-mml'
330 Copy a region as MML
331 This command is also available as a variant in the context menu on
332 the right mouse button (where the region is the preview that has
333 been clicked on). It copies the current region into the kill
334 buffer in a form suitable for copying as a text including images
335 into a mail or news article using mml-mode (*note Composing:
336 (emacs-mime)Composing.).
337
338 If you regenerate or otherwise kill the preview in its source
339 buffer before the mail or news gets posted, this will fail. Also
340 you should generate images you want to send with
341 `preview-transparent-border' set to `nil', or the images will have
342 an ugly border. preview-latex detects this condition and asks
343 whether to regenerate the region with borders switched off. As
344 this is an asynchronous operation running in the background,
345 you'll need to call this command explicitly again to get the newly
346 generated images into the kill ring.
347
348 Preview your articles with `mml-preview' (on `M-m P', or `C-c C-m
349 P' in Emacs 22) to make sure they look fine.
350
351 `C-c C-p C-e'
352 `preview-environment'
353 Preview/Generate previews for environment
354 Run preview on LaTeX environment. The environments in
355 `preview-inner-environments' are treated as inner levels so that
356 for instance, the `split' environment in
357 `\begin{equation}\begin{split}...\end{split}\end{equation}' is
358 properly displayed. If called with a numeric argument, the
359 corresponding number of outward nested environments is treated as
360 inner levels.
361
362 `C-c C-p C-s'
363 `preview-section'
364 Preview/Generate previews for section
365 Run preview on this LaTeX section.
366
367 `C-c C-p C-r'
368 `preview-region'
369 Preview/Generate previews for region
370 Run preview on current region.
371
372 `C-c C-p C-b'
373 `preview-buffer'
374 Preview/Generate previews for buffer
375 Run preview on the current buffer.
376
377 `C-c C-p C-d'
378 `preview-document'
379 Preview/Generate previews for document
380 Run preview on the current document.
381
382 `C-c C-p C-c C-p'
383 `preview-clearout-at-point'
384 Preview/Remove previews at point
385 Clear out (remove) the previews that are immediately adjacent to
386 point.
387
388 `C-c C-p C-c C-s'
389 `preview-clearout-section'
390 Preview/Remove previews from section
391 Clear out all previews in current section.
392
393 `C-c C-p C-c C-r'
394 `preview-clearout'
395 Preview/Remove previews from region
396 Clear out all previews in the current region.
397
398 `C-c C-p C-c C-b'
399 `preview-clearout-buffer'
400 Preview/Remove previews from buffer
401 Clear out all previews in current buffer. This makes the current
402 buffer lose all previews.
403
404 `C-c C-p C-c C-d'
405 `preview-clearout-document'
406 Preview/Remove previews from document
407 Clear out all previews in current document. The document consists
408 of all buffers that have the same master file as the current
409 buffer. This makes the current document lose all previews.
410
411 `C-c C-p C-f'
412 `preview-cache-preamble'
413 Preview/Turn preamble cache on
414 Dump a pregenerated format file. For the rest of the session,
415 this file is used when running on the same master file. Use this
416 if you know your LaTeX takes a long time to start up, the speedup
417 will be most noticeable when generating single or few previews.
418 If you change your preamble, do this again. preview-latex will
419 try to detect the necessity of that automatically when editing
420 changes to the preamble are done from within Emacs, but it will
421 not notice if the preamble effectively changes because some
422 included file or style file is tampered with.
423
424 `C-c C-p C-c C-f'
425 `preview-cache-preamble-off'
426 Preview/Turn preamble cache off
427 Clear the pregenerated format file and stop using preambles for the
428 current document. If the caching gives you problems, use this.
429
430 `C-c C-p C-i'
431 `preview-goto-info-page'
432 Preview/Read Documentation
433 Read this info manual.
434
435 `M-x preview-report-bug <RET>'
436 `preview-report-bug'
437 Preview/Report Bug
438 This is the preferred way of reporting bugs as it will fill in what
439 version of preview-latex you are using as well as versions of
440 relevant other software, and also some of the more important
441 settings. Please use this method of reporting, if at all possible
442 and before reporting a bug, have a look at *note Known problems::.
443
444 `C-c C-k'
445 LaTeX/TeX Output/Kill Job
446 Kills the preview-generating process. This is really an AUCTeX
447 keybinding, but it is included here as a hint. If you are
448 generating a preview and then make a change to the buffer,
449 preview-latex may be confused and place the previews wrong.
450
451 \1f
452 File: preview-latex.info, Node: Simple customization, Next: Known problems, Prev: Keys and lisp, Up: Top
453
454 4 Simple customization
455 **********************
456
457 Customization options can be found by typing `M-x customize-group <RET>
458 preview <RET>'. Remember to set the option when you have changed it.
459 The list of suggestions can be made very long (and is covered in detail
460 in *note For advanced users::), but some are:
461
462 * Change the color of the preview background
463
464 If you use a non-white background in Emacs, you might have color
465 artifacts at the edges of your previews. Playing around with the
466 option `preview-transparent-color' in the `Preview Appearance'
467 group might improve things. With some settings, the cursor may
468 cover the whole background of a preview, however.
469
470 This option is specific to the display engine in use. Its default
471 is different in Emacs 21 and Emacs 22, and it is not available in
472 XEmacs.
473
474 * Showing `\label's
475
476 When using preview-latex, the `\label's are hidden by the
477 previews. It is possible to make them visible in the output by
478 using the LaTeX package `showkeys' alternatively `showlabels'.
479 However, the boxes of these labels will be outside the region
480 preview-latex considers as the preview image. To enable a similar
481 mechanism internal to preview-latex, enable the `showlabels'
482 option in the variable `preview-default-option-list' in the
483 `Preview Latex' group.
484
485 It must be noted, however, that a much better idea may be to use
486 the RefTeX package for managing references. *Note RefTeX in a
487 Nutshell: (reftex)RefTeX in a Nutshell.
488
489 * Open previews automatically
490
491 The current default is to open previews automatically when you
492 enter them with cursor left/right motions. Auto-opened previews
493 will close again once the cursor leaves them again (this is also
494 done when doing incremental search, or query-replace operations),
495 unless you changed anything in it. In that case, you will have to
496 regenerate the preview (via e.g., `C-c C-p C-p'). Other options
497 for `preview-auto-reveal' are available via `customize'.
498
499 * Automatically cache preambles
500
501 Currently preview-latex asks you whether you want to cache the
502 document preamble (everything before `\begin{document}') before it
503 generates previews for a buffer the first time. Caching the
504 preamble will significantly speed up regeneration of previews.
505 The larger your preamble is, the more this will be apparent. Once
506 a preamble is cached, preview-latex will try to keep track of when
507 it is changed, and dump a fresh format in that case. If you
508 experience problems with this, or if you want it to happen without
509 asking you the first time, you can customize the variable
510 `preview-auto-cache-preamble'.
511
512 * Attempt to keep counters accurate when editing
513
514 Since preview-latex frequently runs only small regions through
515 LaTeX, values like equation counters are not consistent from run to
516 run. If this bothers you, customize the variable
517 `preview-preserve-counters' to `t' (this is consulted by
518 `preview-required-option-list'). LaTeX will then output a load of
519 counter information during compilation, and this information will
520 be used on subsequent updates to keep counters set to useful
521 values. The additional information takes additional time to
522 analyze, but this is relevant mostly only when you are
523 regenerating all previews at once, and maybe you will be less
524 tempted to do so when counters appear more or less correct.
525
526 * Preview your favourite LaTeX constructs
527
528 If you have a certain macro or environment that you want to
529 preview, first check if it can be chosen by cutomizing
530 `preview-default-options-list' in the `Preview Latex' group.
531
532 If it is not available there, you can add it to
533 `preview-default-preamble' also in the `Preview Latex' group, by
534 adding a `\PreviewMacro' or `\PreviewEnvironment' entry (*note
535 Provided commands::) _after_ the `\RequirePackage' line. For
536 example, if you want to preview the `center' environment, press
537 the <Show> button and the last <INS> button, then add
538
539 \PreviewEnvironment{center}
540 in the space that just opened. Note that since `center' is a
541 generic formatting construct of LaTeX, a general configuration like
542 that is not quite prudent. You better to do this on a per-document
543 base so that it is easy to disable this behavior when you find this
544 particular entry gives you trouble.
545
546 One possibility is to save such settings in the corresponding
547 file-local variable instead of your global configuration (*note
548 Local Variables in Files: (emacs)File Variables.). A perhaps more
549 convenient place for such options would be in a configuration file
550 in the same directory with your project (*note Package options::).
551
552 The usual file for preview-latex preconfiguration is
553 `prauctex.cfg'. If you also want to keep the systemwide defaults,
554 you should add a line
555
556 \InputIfFileExists{preview/prauctex.cfg}{}{}
557 to your own version of `prauctex.cfg' (this is assuming that
558 global files relating to the `preview' package are installed in a
559 subdirectory `preview', the default behavior).
560
561 * Don't preview inline math
562
563 If you have performance problems because your document is full of
564 inline math (`$...$'), or if your usage of `$' conflicts with
565 preview-latex's, you can turn off inline math previews. In the
566 `Preview Latex' group, remove `textmath' from
567 `preview-default-option-list' by customizing this variable.
568
569 \1f
570 File: preview-latex.info, Node: Known problems, Next: For advanced users, Prev: Simple customization, Up: Top
571
572 5 Known problems
573 ****************
574
575 A number of issues are known concerning the interoperation with various
576 other software. Some of the known problems can be solved by moving to
577 newer versions of the problematic software or by simple patches.
578
579 * Menu:
580
581 * Problems with Ghostscript::
582 * Font problems with Dvips::
583 * Emacs problems::
584 * Too small bounding boxes::
585 * x-symbol interoperation::
586 * Middle-clicks paste instead of toggling::
587
588 If you find something not mentioned here, please send a bug report
589 using `M-x preview-report-bug <RET>', which will fill in a lot of
590 information interesting to us and send it to the <bug-auctex@gnu.org>
591 list. Please use the bug reporting commands if at all possible.
592
593 \1f
594 File: preview-latex.info, Node: Problems with Ghostscript, Next: Font problems with Dvips, Up: Known problems
595
596 5.1 Problems with Ghostscript
597 =============================
598
599 Most of the problems encountered come from interaction with
600 Ghostscript. It is a good idea to have a fairly recent version of
601 Ghostscript installed. One problem occurs if you have specified the
602 wrong executable under Windows: the command line version of Ghostscript
603 is called `GSWIN32C.EXE', not `GSWIN32.EXE'.
604
605 When Ghostscript fails, the necessary information and messages from
606 Ghostscript go somewhere. If Ghostscript fails before starting to
607 process images, you'll find the information at the end of the process
608 buffer you can see with `C-c C-l'. If Ghostscript fails while
609 processing a particular image, this image will be tagged with clickable
610 buttons for the error description and for the corresponding source file.
611
612 The default options configurable with
613
614 `M-x customize-variable <RET> preview-gs-options <RET>'
615 include the options `-dTextAlphaBits=4' and `-dGraphicsAlphaBits=4'.
616 These options have been reported to make Ghostscript 5.50 fail, but
617 should work under Ghostscript 6.51 and later. If you are experiencing
618 problems, it might help to customize them away. Of course, this also
619 takes away the joy of antialiasing, so upgrading Ghostscript might not
620 be the worst idea after all.
621
622 The device names have changed over time, so when using an old
623 Ghostscript, you may have problems with the devices demanded by the
624 customizable variable `preview-image-creators'. In that case, make
625 sure they fit your version of Ghostscript, at least the entry
626 corresponding to the current value of `preview-image-type'. While not
627 being best in file size and image quality, setting
628 `preview-image-creators' to `jpeg' should probably be one of the best
629 bets for the purpose of checking basic operation, since that device
630 name has not changed in quite some time. But JPEG is not intended for
631 text, but for photographic images. On a more permanent time scale, the
632 best choice is to use PNG and complain to your suppliers if either
633 Emacs or Ghostscript fail to properly accommodate this format.
634
635 \1f
636 File: preview-latex.info, Node: Font problems with Dvips, Next: Emacs problems, Prev: Problems with Ghostscript, Up: Known problems
637
638 5.2 Font problems with Dvips
639 ============================
640
641 Some fonts have been reported to produce wrong characters with
642 preview-latex. preview-latex calls Dvips by default with the option
643 `-Pwww' in order to get scalable fonts for nice results. If you are
644 using antialiasing, however, the results might be sufficiently nice
645 with bitmapped fonts, anyway. You might try `-Ppdf' for another stab
646 at scalable fonts, or other printer definitions. Use
647
648 `M-x customize-variable <RET> preview-fast-dvips-command <RET>'
649 and
650 `M-x customize-variable <RET> preview-dvips-command <RET>'
651 in order to customize this.
652
653 One particular problem is that several printer setup files
654 (typically in a file called `/usr/share/texmf/dvips/config/config.pdf'
655 if you are using the `-Ppdf' switch) contain the `G' option for
656 `character shifting'. This option will result in `fi' being rendered
657 as `#' (British Pounds sign) in several fonts, unless your version of
658 Dvips has a long-standing bug in its implementation fixed (only very
659 recent versions of Dvips have).
660
661 \1f
662 File: preview-latex.info, Node: Emacs problems, Next: Too small bounding boxes, Prev: Font problems with Dvips, Up: Known problems
663
664 5.3 Emacs problems
665 ==================
666
667 * GNU Emacs versions
668
669 Don't use Emacsen older than 21.3 on X11-based systems. On most
670 other systems, you'll need at least Emacs 22.1 or one of the
671 developer versions leading up to it. Details can be found in
672 *note Prerequisites: (auctex)Prerequisites.
673
674 * Emacsen on Windows operating systems
675
676 For Emacs 21, no image support is available in Emacs under Windows.
677 Without images, preview-latex is useless. The current CVS version
678 of Emacs available from `http://savannah.gnu.org/projects/emacs'
679 now supports images including the PNG format, so Emacs 22 should
680 work out of the box once it is released. Precompiled versions are
681 available from `http://crasseux.com/emacs' and
682 `http://nqmacs.sf.net'.
683
684 For detailed installation instructions for Windows, see *note
685 Installation under MS Windows: (auctex)Installation under MS
686 Windows.
687
688 * XEmacs
689
690 There is are two larger problems known with older XEmacs releases.
691 One leads to seriously mispositioned baselines and previews
692 hanging far above other text on the same line. This should be
693 fixed as of XEmacs-21.4.9.
694
695 The other core bug causes a huge delay when XEmacs's idea of the
696 state of processes (like ghostscript) is wrong, and can lead to
697 nasty spurious error messages. It should be fixed in version
698 21.4.8.
699
700 Previews will only remain from one session to the next if you have
701 version 1.81 or above of the `edit-utils' package, first released
702 in the 2002-03-12 sumo tarball.
703
704 \1f
705 File: preview-latex.info, Node: Too small bounding boxes, Next: x-symbol interoperation, Prev: Emacs problems, Up: Known problems
706
707 5.4 Too small bounding boxes
708 ============================
709
710 The bounding box of a preview is determined by the LaTeX package using
711 the pure TeX bounding boxes. If there is material extending outside of
712 the TeX box, that material will be missing from the preview image.
713 This happens for the label-showing boxes from the `showkeys' package.
714 This particular problem can be circumvented by using the `showlabels'
715 option of the preview package.
716
717 In general, you should try to fix the problem in the TeX code, like
718 avoiding drawing outside of the picture with PSTricks.
719
720 One possible remedy is to set `preview-fast-conversion' to `Off'
721 (*note The Emacs interface::). The conversion will take more time, but
722 will then use the bounding boxes from EPS files generated by Dvips.
723
724 Dvips generally does not miss things, but it does not understand
725 PostScript constructs like `\resizebox' or `\rotate' commands, so will
726 generate rather wrong boxes for those. Dvips can be helped with the
727 `psfixbb' package option to preview (*note The LaTeX style file::),
728 which will tag the corners of the included TeX box. This will mostly
729 be convenient for _pure_ PostScript stuff like that created by
730 PSTricks, which Dvips would otherwise reserve no space for.
731
732 \1f
733 File: preview-latex.info, Node: x-symbol interoperation, Next: Middle-clicks paste instead of toggling, Prev: Too small bounding boxes, Up: Known problems
734
735 5.5 x-symbol interoperation
736 ===========================
737
738 Thanks to the work of Christoph Wedler, starting with version
739 `4.0h/beta' of x-symbol, the line parsing of AUCTeX and preview-latex
740 is fully supported. Earlier versions exhibit problems. However,
741 versions before 4.2.2 will cause a drastic slowdown of preview-latex's
742 parsing pass, so we don't recommend to use versions earlier than that.
743
744 If you wonder what x-symbol is, it is a package that transforms
745 various tokens and subscripts to a more readable form while editing and
746 offers a few input methods handy especially for dealing with math. Take
747 a look at `http://x-symbol.sourceforge.net'.
748
749 x-symbol versions up to 4.5.1-beta at least require an 8bit-clean TeX
750 implementation (meaning that its terminal output should not use
751 `^^'-started escape sequences) for cooperation with preview-latex.
752 Later versions may get along without it, like preview-latex does now.
753
754 If you experience problems with `circ.tex' in connection with both
755 x-symbol and Latin-1 characters, you may need to change your language
756 environment or, as a last resort, customize the variable
757 `LaTeX-command-style' by replacing the command `latex' with `latex
758 -translate-file=cp8bit'.
759
760 \1f
761 File: preview-latex.info, Node: Middle-clicks paste instead of toggling, Prev: x-symbol interoperation, Up: Known problems
762
763 5.6 Middle-clicks paste instead of toggling
764 ===========================================
765
766 This is probably the fault of your favorite package. `flyspell.el' and
767 `mouse-drag.el' are known to be affected in versions before Emacs 21.3.
768 Upgrade to the most recent version. What version of XEmacs might
769 contain the fixes is unknown.
770
771 `isearch.el' also shows this effect while searches are in progress,
772 but the code is such a complicated mess that no patch is in sight.
773 Better just end the search with `<RET>' before toggling and resume with
774 `C-s C-s' or similar afterwards. Since previews over the current match
775 will auto-open, anyway, this should not be much of a problem in
776 practice.
777
778 \1f
779 File: preview-latex.info, Node: For advanced users, Next: ToDo, Prev: Known problems, Up: Top
780
781 6 For advanced users
782 ********************
783
784 This package consists of two parts: a LaTeX style that splits the
785 output into appropriate parts with one preview object on each page, and
786 an Emacs-lisp part integrating the thing into Emacs (aided by AUCTeX).
787
788 * Menu:
789
790 * The LaTeX style file::
791 * The Emacs interface::
792 * The preview images::
793 * Misplaced previews::
794
795 \1f
796 File: preview-latex.info, Node: The LaTeX style file, Next: The Emacs interface, Prev: For advanced users, Up: For advanced users
797
798 6.1 The LaTeX style file
799 ========================
800
801 The main purpose of this package is the extraction of certain
802 environments (most notably displayed formulas) from LaTeX sources as
803 graphics. This works with DVI files postprocessed by either Dvips and
804 Ghostscript or dvipng, but it also works when you are using PDFTeX for
805 generating PDF files (usually also postprocessed by Ghostscript).
806
807 Current uses of the package include the preview-latex package for
808 WYSIWYG functionality in the AUCTeX editing environment, generation of
809 previews in LyX, as part of the operation of the ps4pdf package, the
810 tbook XML system and some other tools.
811
812 Producing EPS files with Dvips and its derivatives using the `-E'
813 option is not a good alternative: People make do by fiddling around
814 with `\thispagestyle{empty}' and hoping for the best (namely, that the
815 specified contents will indeed fit on single pages), and then trying to
816 guess the baseline of the resulting code and stuff, but this is at best
817 dissatisfactory. The preview package provides an easy way to ensure
818 that exactly one page per request gets shipped, with a well-defined
819 baseline and no page decorations. While you still can use the preview
820 package with the `classic'
821
822 dvips -E -i
823
824 invocation, there are better ways available that don't rely on Dvips
825 not getting confused by PostScript specials.
826
827 For most applications, you'll want to make use of the `tightpage'
828 option. This will embed the page dimensions into the PostScript or PDF
829 code, obliterating the need to use the `-E -i' options to Dvips. You
830 can then produce all image files with a single run of Ghostscript from
831 a single PDF or PostScript (as opposed to EPS) file.
832
833 Various options exist that will pass TeX dimensions and other
834 information about the respective shipped out material (including
835 descender size) into the log file, where external applications might
836 make use of it.
837
838 The possibility for generating a whole set of graphics with a single
839 run of Ghostscript (whether from LaTeX or PDFLaTeX) increases both
840 speed and robustness of applications. It is also feasible to use
841 dvipng on a DVI file with the options
842
843 -picky -noghostscript
844
845 to omit generating any image file that requires Ghostscript, then let a
846 script generate all missing files using Dvips/Ghostscript. This will
847 usually speed up the process significantly.
848
849 * Menu:
850
851 * Package options::
852 * Provided commands::
853
854 \1f
855 File: preview-latex.info, Node: Package options, Next: Provided commands, Prev: The LaTeX style file, Up: The LaTeX style file
856
857 6.1.1 Package options
858 ---------------------
859
860 The package is included with the customary
861
862 \usepackage[OPTIONS]{preview}
863
864 You should usually load this package as the last one, since it
865 redefines several things that other packages may also provide.
866
867 The following options are available:
868
869 `active'
870 is the most essential option. If this option is not specified,
871 the `preview' package will be inactive and the document will be
872 typeset as if the `preview' package were not loaded, except that
873 all declarations and environments defined by the package are still
874 legal but have no effect. This allows defining previewing
875 characteristics in your document, and only activating them by
876 calling LaTeX as
877
878 latex '\PassOptionsToPackage{active}{preview} \input{FILENAME}'
879
880 `noconfig'
881 Usually the file `prdefault.cfg' gets loaded whenever the
882 `preview' package gets activated. `prdefault.cfg' is supposed to
883 contain definitions that can cater for otherwise bad results, for
884 example, if a certain document class would otherwise lead to
885 trouble. It also can be used to override any settings made in
886 this package, since it is loaded at the very end of it. In
887 addition, there may be configuration files specific for certain
888 `preview' options like `auctex' which have more immediate needs.
889 The `noconfig' option suppresses loading of those option files,
890 too.
891
892 `psfixbb'
893 Dvips determines the bounding boxes from the material in the DVI
894 file it understands. Lots of PostScript specials are not part of
895 that. Since the TeX boxes do not make it into the DVI file, but
896 merely characters, rules and specials do, Dvips might include far
897 too small areas. The option `psfixbb' will include `/dev/null' as
898 a graphic file in the ultimate upper left and lower right corner
899 of the previewed box. This will make Dvips generate an
900 appropriate bounding box.
901
902 `dvips'
903 If this option is specified as a class option or to other
904 packages, several packages pass things like page size information
905 to Dvips, or cause crop marks or draft messages written on pages.
906 This seriously hampers the usability of previews. If this option
907 is specified, the changes will be undone if possible.
908
909 `pdftex'
910 If this option is set, PDFTeX is assumed as the output driver.
911 This mainly affects the `tightpage' option.
912
913 `xetex'
914 If this option is set, XeTeX is assumed as the output driver.
915 This mainly affects the `tightpage' option.
916
917 `displaymath'
918 will make all displayed math environments subject to preview
919 processing. This will typically be the most desired option.
920
921 `floats'
922 will make all float objects subject to preview processing. If you
923 want to be more selective about what floats to pass through to a
924 preview, you should instead use the `\PreviewSnarfEnvironment'
925 command on the floats you want to have previewed.
926
927 `textmath'
928 will make all text math subject to previews. Since math mode is
929 used throughly inside of LaTeX even for other purposes, this works
930 by redefining `\(', `\)' and `$' and the `math' environment
931 (apparently some people use that). Only occurences of these text
932 math delimiters in later loaded packages and in the main document
933 will thus be affected.
934
935 `graphics'
936 will subject all `\includegraphics' commands to a preview.
937
938 `sections'
939 will subject all section headers to a preview.
940
941 `delayed'
942 will delay all activations and redefinitions the `preview' package
943 makes until `\'`begin{document}'. The purpose of this is to cater
944 for documents which should be subjected to the `preview' package
945 without having been prepared for it. You can process such
946 documents with
947
948 latex '\RequirePackage[active,delayed,OPTIONS]{preview}
949 \input{FILENAME}'
950
951 This relaxes the requirement to be loading the `preview' package
952 as last package.
953
954 DRIVER
955 loads a special driver file `prDRIVER.def'. The remaining options
956 are implemented through the use of driver files.
957
958 `auctex'
959 This driver will produce fake error messages at the start and end
960 of every preview environment that enable the Emacs package
961 preview-latex in connection with AUCTeX to pinpoint the exact
962 source location where the previews have originated.
963 Unfortunately, there is no other reliable means of passing the
964 current TeX input position _in_ a line to external programs. In
965 order to make the parsing more robust, this option also switches
966 off quite a few diagnostics that could be misinterpreted.
967
968 You should not specify this option manually, since it will only be
969 needed by automated runs that want to parse the pseudo error
970 messages. Those runs will then use `\PassOptionsToPackage' in
971 order to effect the desired behaviour. In addition,
972 `prauctex.cfg' will get loaded unless inhibited by the `noconfig'
973 option. This caters for the most frequently encountered
974 problematic commands.
975
976 `showlabels'
977 During the editing process, some people like to see the label
978 names in their equations, figures and the like. Now if you are
979 using Emacs for editing, and in particular preview-latex, I'd
980 strongly recommend that you check out the RefTeX package which
981 pretty much obliterates the need for this kind of functionality.
982 If you still want it, standard LaTeX provides it with the
983 `showkeys' package, and there is also the less encompassing
984 `showlabels' package. Unfortunately, since those go to some pain
985 not to change the page layout and spacing, they also don't change
986 `preview''s idea of the TeX dimensions of the involved boxes. So
987 if you are using `preview' for determing bounding boxes, those
988 packages are mostly useless. The option `showlabels' offers a
989 substitute for them.
990
991 `tightpage'
992 It is not uncommon to want to use the results of `preview' as
993 graphic images for some other application. One possibility is to
994 generate a flurry of EPS files with
995
996 dvips -E -i -Pwww -o OUTPUTFILE.000 INPUTFILE
997
998 However, in case those are to be processed further into graphic
999 image files by Ghostscript, this process is inefficient since all
1000 of those files need to be processed one by one. In addition, it
1001 is necessary to extract the bounding box comments from the EPS
1002 files and convert them into page dimension parameters for
1003 Ghostscript in order to avoid full-page graphics. This is not
1004 even possible if you wanted to use Ghostscript in a _single_ run
1005 for generating the files from a single PostScript file, since
1006 Dvips will in that case leave no bounding box information anywhere.
1007
1008 The solution is to use the `tightpage' option. That way a single
1009 command line like
1010
1011 `gs -sDEVICE=png16m -dTextAlphaBits=4 -r300
1012 -dGraphicsAlphaBits=4 -dSAFER -q -dNOPAUSE
1013 -sOutputFile=OUTPUTFILE%d.png INPUTFILE.ps'
1014
1015 will be able to produce tight graphics from a single PostScript
1016 file generated with Dvips _without_ use of the options `-E -i', in
1017 a single run.
1018
1019 The `tightpage' option actually also works when using the `pdftex'
1020 option and generating PDF files with PDFTeX. The resulting PDF
1021 file has separate page dimensions for every page and can directly
1022 be converted with one run of Ghostscript into image files.
1023
1024 If neither `dvips' or `pdftex' have been specified, the
1025 corresponding option will get autodetected and invoked.
1026
1027 If you need this in a batch environment where you don't want to
1028 use `preview''s automatic extraction facilities, no problem: just
1029 don't use any of the extraction options, and wrap everything to be
1030 previewed into `preview' environments. This is how LyX does its
1031 math previews.
1032
1033 If the pages under the `tightpage' option are just too tight, you
1034 can adjust by setting the length `\PreviewBorder' to a different
1035 value by using `\setlength'. The default value is `0.50001bp',
1036 which is half of a usual PostScript point, rounded up. If you go
1037 below this value, the resulting page size may drop below `1bp',
1038 and Ghostscript does not seem to like that. If you need finer
1039 control, you can adjust the bounding box dimensions individually
1040 by changing the macro `\PreviewBbAdjust' with the help of
1041 `\renewcommand'. Its default value is
1042
1043 \newcommand \PreviewBbAdjust
1044 {-\PreviewBorder -\PreviewBorder
1045 \PreviewBorder \PreviewBorder}
1046
1047 This adjusts the left, lower, right and upper borders by the given
1048 amount. The macro must contain 4 TeX dimensions after another,
1049 and you may not omit the units if you specify them explicitly
1050 instead of by register. PostScript points have the unit `bp'.
1051
1052 `lyx'
1053 This option is for the sake of LyX developers. It will output a
1054 few diagnostics relevant for the sake of LyX' preview
1055 functionality (at the time of writing, mostly implemented for math
1056 insets, in versions of LyX starting with 1.3.0).
1057
1058 `counters'
1059 This writes out diagnostics at the start and the end of previews.
1060 Only the counters changed since the last output get written, and
1061 if no counters changed, nothing gets written at all. The list
1062 consists of counter name and value, both enclosed in `{}' braces,
1063 followed by a space. The last such pair is followed by a colon
1064 (`:') if it is at the start of the preview snippet, and by a
1065 period (`.') if it is at the end. The order of different
1066 diagnostics like this being issued depends on the order of the
1067 specification of the options when calling the package.
1068
1069 Systems like preview-latex use this for keeping counters accurate
1070 when single previews are regenerated.
1071
1072 `footnotes'
1073 This makes footnotes render as previews, and only as their
1074 footnote symbol. A convenient editing feature inside of Emacs.
1075
1076 The following options are just for debugging purposes of the package
1077 and similar to the corresponding TeX commands they allude to:
1078
1079 `tracingall'
1080 causes lots of diagnostic output to appear in the log file during
1081 the preview collecting phases of TeX's operation. In contrast to
1082 the similarly named TeX command, it will not switch to
1083 `\errorstopmode', nor will it change the setting of
1084 `\tracingonline'.
1085
1086 `showbox'
1087 This option will show the contents of the boxes shipped out to the
1088 DVI files. It also sets `\showboxbreadth' and `\showboxdepth' to
1089 their maximum values at the end of loading this package, but you
1090 may reset them if you don't like that.
1091
1092 \1f
1093 File: preview-latex.info, Node: Provided commands, Prev: Package options, Up: The LaTeX style file
1094
1095 6.1.2 Provided commands
1096 -----------------------
1097
1098 `\begin{preview}...\end{preview}'
1099 The `preview' environment causes its contents to be set as a
1100 single preview image. Insertions like figures and footnotes
1101 (except those included in minipages) will typically lead to error
1102 messages or be lost. In case the `preview' package has not been
1103 activated, the contents of this environment will be typeset
1104 normally.
1105
1106 `\begin{nopreview}...\end{nopreview}'
1107 The `nopreview' environment will cause its contents not to undergo
1108 any special treatment by the `preview' package. When `preview' is
1109 active, the contents will be discarded like all main text that
1110 does not trigger the `preview' hooks. When `preview' is not
1111 active, the contents will be typeset just like the main text.
1112
1113 Note that both of these environments typeset things as usual when
1114 preview is not active. If you need something typeset
1115 conditionally, use the `\ifPreview' conditional for it.
1116
1117 `\PreviewMacro'
1118 If you want to make a macro like `\includegraphics' (actually,
1119 this is what is done by the `graphics' option to `preview')
1120 produce a preview image, you put a declaration like
1121
1122 \PreviewMacro[*[[!]{\includegraphics}
1123
1124 or, more readable,
1125
1126 \PreviewMacro[{*[][]{}}]{\includegraphics}
1127
1128 into your preamble. The optional argument to `\PreviewMacro'
1129 specifies the arguments `\includegraphics' accepts, since this is
1130 necessary information for properly ending the preview box. Note
1131 that if you are using the more readable form, you have to enclose
1132 the argument in a `[{' and `}]' pair. The inner braces are
1133 necessary to stop any included `[]' pairs from prematurely ending
1134 the optional argument, and to make a single `{}' denoting an
1135 optional argument not get stripped away by TeX's argument parsing.
1136
1137 The letters simply mean
1138
1139 `*'
1140 indicates an optional `*' modifier, as in `\includegraphics*'.
1141
1142 `['
1143 ^^A] indicates an optional argument in brackets. This syntax
1144 is somewhat baroque, but brief.
1145
1146 `[]'
1147 also indicates an optional argument in brackets. Be sure to
1148 have encluded the entire optional argument specification in
1149 an additional pair of braces as described above.
1150
1151 `!'
1152 indicates a mandatory argument.
1153
1154 `{}'
1155 indicates the same. Again, be sure to have that additional
1156 level of braces around the whole argument specification.
1157
1158 `?'DELIMITER{TRUE CASE}{FALSE CASE}
1159 is a conditional. The next character is checked against
1160 being equal to DELIMITER. If it is, the specification TRUE
1161 CASE is used for the further parsing, otherwise FALSE CASE
1162 will be employed. In neither case is something consumed from
1163 the input, so {TRUE CASE} will still have to deal with the
1164 upcoming delimiter.
1165
1166 `@'{LITERAL SEQUENCE}
1167 will insert the given sequence literally into the executed
1168 call of the command.
1169
1170 `-'
1171 will just drop the next token. It will probably be most
1172 often used in the true branch of a `?' specification.
1173
1174 `#'{ARGUMENT}{REPLACEMENT}
1175 is a transformation rule that calls a macro with the given
1176 argument and replacement text on the rest of the argument
1177 list. The replacement is used in the executed call of the
1178 command. This can be used for parsing arbitrary constructs.
1179 For example, the `[]' option could manually be implemented
1180 with the option string `?[{#{[#1]}{[{#1}]}}{}'. PStricks
1181 users might enjoy this sort of flexibility.
1182
1183 `:'{ARGUMENT}{REPLACEMENT}
1184 is again a transformation rule. As opposed to `#', however,
1185 the result of the transformation is parsed again. You'll
1186 rarely need this.
1187
1188 There is a second optional argument in brackets that can be used to
1189 declare any default action to be taken instead. This is mostly for
1190 the sake of macros that influence numbering: you would want to keep
1191 their effects in that respect. The default action should use `#1'
1192 for referring to the original (not the patched) command with the
1193 parsed options appended. Not specifying a second optional argument
1194 here is equivalent to specifying `[#1]'.
1195
1196 `\PreviewMacro*'
1197 A similar invocation `\PreviewMacro*' simply throws the macro and
1198 all of its arguments declared in the manner above away. This is
1199 mostly useful for having things like `\footnote' not do their
1200 magic on their arguments. More often than not, you don't want to
1201 declare any arguments to scan to `\PreviewMacro*' since you would
1202 want the remaining arguments to be treated as usual text and
1203 typeset in that manner instead of being thrown away. An exception
1204 might be, say, sort keys for `\cite'.
1205
1206 A second optional argument in brackets can be used to declare any
1207 default action to be taken instead. This is for the sake of macros
1208 that influence numbering: you would want to keep their effects in
1209 that respect. The default action might use `#1' for referring to
1210 the original (not the patched) command with the parsed options
1211 appended. Not specifying a second optional argument here is
1212 equivalent to specifying `[]' since the command usually gets thrown
1213 away.
1214
1215 As an example for using this argument, you might want to specify
1216
1217 \PreviewMacro*\footnote[{[]}][#1{}]
1218
1219 This will replace a footnote by an empty footnote, but taking any
1220 optional parameter into account, since an optional paramter changes
1221 the numbering scheme. That way the real argument for the footnote
1222 remains for processing by preview-latex.
1223
1224 `\PreviewEnvironment'
1225 The macro `\PreviewEnvironment' works just as `\PreviewMacro' does,
1226 only for environments.
1227
1228 `\PreviewEnvironment*'
1229 And the same goes for `\PreviewEnvironment*' as compared to
1230 `\PreviewMacro*'.
1231
1232 `\PreviewSnarfEnvironment'
1233 This macro does not typeset the original environment inside of a
1234 preview box, but instead typesets just the contents of the
1235 original environment inside of the preview box, leaving nothing
1236 for the original environment. This has to be used for figures,
1237 for example, since they would
1238
1239 1. produce insertion material that cannot be extracted to the
1240 preview properly,
1241
1242 2. complain with an error message about not being in outer par
1243 mode.
1244
1245 `\PreviewOpen'
1246
1247 `\PreviewClose'
1248 Those Macros form a matched preview pair. This is for macros that
1249 behave similar as `\begin' and `\end' of an environment. It is
1250 essential for the operation of `\PreviewOpen' that the macro
1251 treated with it will open an additional group even when the preview
1252 falls inside of another preview or inside of a `nopreview'
1253 environment. Similarly, the macro treated with `PreviewClose'
1254 will close an environment even when inactive.
1255
1256 `\ifPreview'
1257 In case you need to know whether `preview' is active, you can use
1258 the conditional `\ifPreview' together with `\else' and `\fi'.
1259
1260
1261 \1f
1262 File: preview-latex.info, Node: The Emacs interface, Next: The preview images, Prev: The LaTeX style file, Up: For advanced users
1263
1264 6.2 The Emacs interface
1265 =======================
1266
1267 You can use `M-x customize-group <RET> preview-latex <RET>' in order to
1268 customize these variables, or use the menus for it. We explain the
1269 various available options together with explaining how they work
1270 together in making preview-latex work as intended.
1271
1272 `preview-LaTeX-command'
1273 When you generate previews on a buffer or a region, the command in
1274 `preview-LaTeX-command' gets run (that variable should only be
1275 changed with Customize since its structure is somewhat peculiar,
1276 though expressive). As usual with AUCTeX, you can continue
1277 working while this is going on. It is not a good idea to change
1278 the file until after preview-latex has established where to place
1279 the previews which it can only do after the LaTeX run completes.
1280 This run produces a host of pseudo-error messages that get parsed
1281 by preview-latex at the end of the LaTeX run and give it the
1282 necessary information about where in the source file the LaTeX
1283 code for the various previews is located exactly. The parsing
1284 takes a moment and will render Emacs busy.
1285
1286 `preview-LaTeX-command-replacements'
1287 This variable specifies transformations to be used before calling
1288 the configured command. One possibility is to have `\pdfoutput=0 '
1289 appended to every command starting with `pdf'. This particular
1290 setting is available as the shortcut
1291 `preview-LaTeX-disable-pdfoutput'. Since preview-latex can work
1292 with PDF files by now, there is little incentive for using this
1293 option, anymore (for projects not requiring PDF output, the added
1294 speed of `dvipng' might make this somewhat attractive).
1295
1296 `preview-required-option-list'
1297 `preview-LaTeX-command' uses `preview-required-option-list' in
1298 order to pass options such as `auctex', `active' and `dvips' to
1299 the `preview' package. This means that the user need (and should)
1300 not supply these in the document itself in case he wants to be
1301 able to still compile his document without it turning into an
1302 incoherent mass of little pictures. These options even get passed
1303 in when the user loads `preview' explicitly in his document.
1304
1305 The default includes an option `counters' that is controlled by the
1306 boolean variable
1307
1308 `preview-preserve-counters'
1309 This option will cause the `preview' package to emit information
1310 that will assist in keeping things like equation counters and
1311 section numbers reasonably correct even when you are regenerating
1312 only single previews.
1313
1314 `preview-default-option-list'
1315 `preview-default-preamble'
1316 If the document does not call in the package `preview' itself (via
1317 `\usepackage') in the preamble, the preview package is loaded using
1318 default options from `preview-default-option-list' and additional
1319 commands specified in `preview-default-preamble'.
1320
1321 `preview-fast-conversion'
1322 This is relevant only for DVI mode. It defaults to `On' and
1323 results in the whole document being processed as one large
1324 PostScript file from which the single images are extracted with
1325 the help of parsing the PostScript for use of so-called DSC
1326 comments. The bounding boxes are extracted with the help of TeX
1327 instead of getting them from Dvips. If you are experiencing
1328 bounding box problems, try setting this option to `Off'.
1329
1330 `preview-prefer-TeX-bb'
1331 If this option is `On', it tells preview-latex never to try to
1332 extract bounding boxes from the bounding box comments of EPS files,
1333 but rather rely on the boxes it gets from TeX. If you activated
1334 `preview-fast-conversion', this is done, anyhow, since there are no
1335 EPS files from which to read this information. The option
1336 defaults to `Off', simply because about the only conceivable
1337 reason to switch off `preview-fast-conversion' would be that you
1338 have some bounding box problem and want to get Dvips' angle on
1339 that matter.
1340
1341 `preview-scale-function'
1342 `preview-reference-face'
1343 `preview-document-pt-list'
1344 `preview-default-document-pt'
1345 `preview-scale-function' determines by what factor images should
1346 be scaled when appearing on the screen. If you specify a
1347 numerical value here, the physical size on the screen will be that
1348 of the original paper output scaled by the specified factor, at
1349 least if Emacs' information about screen size and resolution are
1350 correct. The default is to let `preview-scale-from-face'
1351 determine the scale function. This function determines the scale
1352 factor by making the size of the default font in the document
1353 match that of the on-screen fonts.
1354
1355 The size of the screen fonts is deduced from the font
1356 `preview-reference-face' (usually the default face used for
1357 display), the size of the default font for the document is
1358 determined by calling `preview-document-pt'. This function
1359 consults the members of `preview-document-pt-list' in turn until
1360 it gets the desired information. The default consults first
1361 `preview-parsed-font-size', then calls `preview-auctex-font-size' which
1362 asks AUCTeX about any size specification like `12pt' to the
1363 documentclass that it might have detected when parsing the
1364 document, and finally reverts to just assuming
1365 `preview-default-document-pt' as the size used in the document
1366 (defaulting to 10pt).
1367
1368 If you find that the size of previews and the other Emacs display
1369 clashes, something goes wrong. `preview-parsed-font-size' is
1370 determined at `\begin{document}' time; if the default font size
1371 changes after that, it will not get reported. If you have an
1372 outdated version of `preview.sty' in your path, the size might not
1373 be reported at all. If in this case AUCTeX is unable to find a
1374 size specification, and if you are using a document class with a
1375 different default value (like KomaScript), the default fallback
1376 assumption will probably be wrong and preview-latex will scale up
1377 things too large. So better specify those size options even when
1378 you know that LaTeX does not need them: preview-latex might
1379 benefit from them. Another possibility for error is that you have
1380 not enabled AUCTeX's document parsing options. The fallback
1381 method of asking AUCTeX about the size might be disabled in future
1382 versions of preview-latex since in general it is more reliable to
1383 get this information from the LaTeX run itself.
1384
1385 `preview-fast-dvips-command'
1386 `preview-dvips-command'
1387 The regular command for turning a DVI file into a single
1388 PostScript file is `preview-fast-dvips-command', while
1389 `preview-dvips-command' is used for cranking out a DVI file where
1390 every preview is in a separate EPS file. Which of the two
1391 commands gets used depends on the setting of
1392 `preview-fast-conversion'. The printer specified here by default
1393 is `-Pwww' by default, which will usually get you scalable fonts
1394 where available. If you are experiencing problems, you might want
1395 to try playing around with Dvips options (*note
1396 (dvips)Command-line options::).
1397
1398 The conversion of the previews into PostScript or EPS files gets
1399 started after the LaTeX run completes when Emacs recognizes the
1400 first image while parsing the error messages. When Emacs has
1401 finished parsing the error messages, it activates all detected
1402 previews. This entails throwing away any previous previews
1403 covering the same areas, and then replacing the text in its visual
1404 appearance by a placeholder looking like a roadworks sign.
1405
1406 `preview-nonready-icon-specs'
1407 This is the roadworks sign displayed while previews are being
1408 prepared. You may want to customize the font sizes at which
1409 preview-latex switches over between different icon sizes, and the
1410 ascent ratio which determines how high above the base line the
1411 icon gets placed.
1412
1413 `preview-error-icon-specs'
1414 `preview-icon-specs'
1415 Those are icons placed before the source code of an opened preview
1416 and, respectively, the image specs to be used for PostScript
1417 errors, and a normal open preview in text representation.
1418
1419 `preview-inner-environments'
1420 This is a list of environments that are regarded as inner levels
1421 of an outer environment when doing `preview-environment'. One
1422 example when this is needed is in
1423 `\begin{equation}\begin{split}...\end{split}\end{equation}', and
1424 accordingly `split' is one entry in `preview-inner-environments'.
1425
1426 `preview-use-balloon-help'
1427 If you turn this XEmacs-only option `on', then moving the mouse
1428 over previews and icons will show appropriate help texts. This
1429 works by switching on `balloon-help-mode' in the buffer if it is
1430 not already enabled. The default now is `off' since some users
1431 reported problems with their version of XEmacs. GNU Emacs has its
1432 corresponding `tooltip-mode' enabled by default and in usable
1433 condition.
1434
1435
1436 \1f
1437 File: preview-latex.info, Node: The preview images, Next: Misplaced previews, Prev: The Emacs interface, Up: For advanced users
1438
1439 6.3 The preview images
1440 ======================
1441
1442 `preview-image-type'
1443 `preview-image-creators'
1444 `preview-gs-image-type-alist'
1445 What happens when LaTeX is finished depends on the configuration of
1446 `preview-image-type'. What to do for each of the various settings
1447 is specified in the variable `preview-image-creators'. The options
1448 to pass into Ghostscript and what Emacs image type to use is
1449 specified in `preview-gs-image-type-alist'.
1450
1451 `preview-image-type' defaults to `png'. For this to work, your
1452 version of Ghostscript needs to support the `png16m' device. If
1453 you are experiencing problems here, you might want to reconfigure
1454 `gs-image-type-alist' or `preview-image-type'. Reconfiguring
1455 `preview-image-creators' is only necessary for adding additional
1456 image types.
1457
1458 Most devices make preview-latex start up a single Ghostscript
1459 process for the entire preview run (as opposed to one per image)
1460 and feed it either sections of a PDF file (if PDFLaTeX was used),
1461 or (after running Dvips) sections of a single PostScript file or
1462 separate EPS files in sequence for conversion into PNG format
1463 which can be displayed much faster by Emacs. Actually, not in
1464 sequence but backwards since you are most likely editing at the
1465 end of the document. And as an added convenience, any preview
1466 that happens to be on-screen is given higher priority so that
1467 preview-latex will first cater for the images that are displayed.
1468 There are various options customizable concerning aspects of that
1469 operation, see the customization group `Preview Gs' for this.
1470
1471 Another noteworthy setting of `preview-image-type' is `dvipng': in
1472 this case, the `dvipng'will get run on DVI output (see below for
1473 PDF). This is in general much faster than Dvips and Ghostscript.
1474 In that case, the option
1475
1476 `preview-dvipng-command'
1477 will get run for doing the conversion, and it is expected that
1478
1479 `preview-dvipng-image-type'
1480 images get produced (`dvipng' might be configured for other image
1481 types as well). You will notice that `preview-gs-image-type-alist'
1482 contains an entry for `dvipng': this actually has nothing to with
1483 `dvipng' itself but specifies the image type and Ghostscript device
1484 option to use when `dvipng' can't be used. This will obviously be
1485 the case for PDF output by PDFLaTeX, but it will also happen if
1486 the DVI file contains PostScript specials in which case the
1487 affected images will get run through Dvips and Ghostscript once
1488 `dvipng' finishes.
1489
1490 `preview-gs-options'
1491 Most interesting to the user perhaps is the setting of this
1492 variable. It contains the default antialiasing settings
1493 `-dTextAlphaBits=4' and `-dGraphicsAlphaBits=4'. Decreasing those
1494 values to 2 or 1 might increase Ghostscript's performance if you
1495 find it lacking.
1496
1497 Running and feeding Ghostscript from preview-latex happens
1498 asynchronously again: you can resume editing while the images arrive.
1499 While those pretty pictures filling in the blanks on screen tend to
1500 make one marvel instead of work, rendering the non-displayed images
1501 afterwards will not take away your attention and will eventually
1502 guarantee that jumping around in the document will encounter only
1503 prerendered images.
1504
1505 \1f
1506 File: preview-latex.info, Node: Misplaced previews, Prev: The preview images, Up: For advanced users
1507
1508 6.4 Misplaced previews
1509 ======================
1510
1511 If you are reading this section, the first thing is to check that your
1512 problem is not caused by x-symbol in connection with an installation not
1513 supporting 8-bit characters (*note x-symbol interoperation::). If not,
1514 here's the beef:
1515
1516 As explained previously, Emacs uses pseudo-error messages generated
1517 by the `preview' package in order to pinpoint the exact source location
1518 where a preview originated. This works in running text, but fails when
1519 preview material happens to lie in macro arguments, like the contents
1520 of `\emph'. Those macros first read in their entire argument, munge it
1521 through, perhaps transform it somehow, process it and perhaps then
1522 typeset something. When they finally typeset something, where is the
1523 location where the stuff originated? TeX, having read in the entire
1524 argument before, does not know and actually there would be no sane way
1525 of defining it.
1526
1527 For previews contained inside such a macro argument, the default
1528 behaviour of preview-latex is to use a position immediately after the
1529 closing brace of the argument. All the previews get placed there, all at
1530 a zero-width position, which means that Emacs displays it in an order
1531 that preview-latex cannot influence (currently in Emacs it is even
1532 possible that the order changes between runs). And since the placement
1533 of those previews is goofed up, you will not be able to regenerate them
1534 by clicking on them. The default behaviour is thus somewhat undesirable.
1535
1536 The solution (like with other preview problems) is to tell the LaTeX
1537 `preview' package how to tackle this problem (*note The LaTeX style
1538 file::). Simply, you don't need `\emph' do anything at all during
1539 previews! You only want the text math previewed, so the solution is to
1540 use `\PreviewMacro*\emph' in the preamble of your document which will
1541 make LaTeX ignore `\emph' completely as long as it is not part of a
1542 larger preview (in which case it gets typeset as usual). Its argument
1543 thus becomes ordinary text and gets treated like ordinary text.
1544
1545 Note that it would be a bad idea to declare
1546 `\PreviewMacro*[{{}}]\emph' since then both `\emph' as well as its
1547 argument would be ignored instead of previewed. For user-level macros,
1548 this is almost never wanted, but there may be internal macros where you
1549 might want to ignore internal arguments.
1550
1551 The same mechanism can be used for a number of other text-formatting
1552 commands like `\textrm', `\textit' and the like. While they all use the
1553 same internal macro `\text@command', it will not do to redefine just
1554 that, since they call it only after having read their argument in, and
1555 then it already is too late. So you need to disable every of those
1556 commands by hand in your document preamble.
1557
1558 Actually, we wrote all of the above just to scare you. At least all
1559 of the above mentioned macros and a few more are already catered for by
1560 a configuration file `prauctex.cfg' that gets loaded by default unless
1561 the `preview' package gets loaded with the `noconfig' option. You can
1562 make your own copy of this file in a local directory and edit it in
1563 case of need. You can also add loading of a file of your liking to
1564 `preview-default-preamble', or alternatively do the manual disabling of
1565 your favorite macro in `preview-default-preamble', which is
1566 customizable in the Preview Latex group.
1567
1568 \1f
1569 File: preview-latex.info, Node: ToDo, Next: Frequently Asked Questions, Prev: For advanced users, Up: Top
1570
1571 Appendix A ToDo
1572 ***************
1573
1574 * Support other formats than just LaTeX
1575
1576 plain TeX users and ConTeXt users should not have to feel left
1577 out. While ConTeXt is not supported yet by released versions of
1578 AUCTeX, at least supporting plain would help people, and be a start
1579 for ConTeXt as well. There are plain-based formats like MusiXTeX
1580 that could benefit a lot from preview-latex. The main part of the
1581 difficulties here is to adapt `preview.dtx' to produce stuff not
1582 requiring LaTeX.
1583
1584 * Support nested snippets
1585
1586 Currently you can't have both a footnote (which gets displayed as
1587 just its footnote number) and math inside of a footnote rendered
1588 as an image: such nesting might be achieved by rerunning
1589 preview-latex on the footnote contents when one opens the footnote
1590 for editing.
1591
1592 * Support other text properties than just images
1593
1594 Macros like `\textit' can be rendered as images, but the resulting
1595 humungous blob is not suitable for editing, in particular since the
1596 line filling from LaTeX does not coincide with that of Emacs. It
1597 would be much more useful if text properties just switched the
1598 relevant font to italics rather than replacing the whole text with
1599 an image. It would also make editing quite easier. Then there
1600 are things like footnotes that are currently just replaced by
1601 their footnote number. While editing is not a concern here (the
1602 number is not in the original text, anyway), it would save a lot
1603 of conversion time if no images were generated, but Emacs just
1604 displayed a properly fontified version of the footnote number.
1605 Also, this might make preview-latex useful even on text terminals.
1606
1607 * Find a way to facilitate Source Specials
1608
1609 Probably in connection with adding appropriate support to
1610 `dvipng', it would be nice if clicking on an image from a larger
1611 piece of source code would place the cursor at the respective
1612 source code location.
1613
1614 * Make `preview.dtx' look reasonable in AUCTeX
1615
1616 It is a bit embarrassing that `preview.dtx' is written in a manner
1617 that will not give either good syntax highlighting or good
1618 indentation when employing AUCTeX.
1619
1620 * Web page work
1621
1622 Currently, preview-latex's web page is not structured at all.
1623 Better navigation would be desirable, as well as separate News and
1624 Errata eye catchers.
1625
1626 * Manual improvements
1627
1628 - Pepper the manual with screen shots and graphics
1629
1630 This will be of interest for the HTML and TeX renditions of
1631 the texinfo manual. Since Texinfo now supports images as
1632 well, this could well be nice to have.
1633
1634 - Fix duplicates
1635
1636 Various stuff appears several times.
1637
1638
1639 * Implement rendering pipelines for Emacs
1640
1641 The current `gs.el' interface is fundamentally flawed, not only
1642 because of a broken implementation. A general batchable and
1643 daemonizable rendering infrastructure that can work on all kinds of
1644 preview images for embedding into buffers is warranted. The
1645 current implementation has a rather adhoc flavor and is not easily
1646 extended. It will not work outside of AUCTeX, either.
1647
1648 * Integrate into RefTeX
1649
1650 When referencing to equations and the like, the preview-images of
1651 the source rather than plain text should be displayed. If the
1652 preview in question covers labels, those should appear in the
1653 bubble help and/or a context menu. Apropos:
1654
1655 * Implement LaTeX error indicators
1656
1657 Previews on erroneous LaTeX passages might gain a red border or
1658 similar.
1659
1660 * Pop up relevant online documentation for frequent errors
1661
1662 A lot of errors are of the "badly configured" variety. Perhaps the
1663 relevant info pages should be delivered in addition to the error
1664 message.
1665
1666 * Implement a table editing mode where every table cell gets output
1667 as a separate preview. Alternatively, output the complete table
1668 metrics in a way that lets people click on individual cells for
1669 editing purposes.
1670
1671 * Benchmark and kill Emacs inefficiencies
1672
1673 Both the LaTeX run under Emacs control as well as actual image
1674 insertion in Emacs could be faster. CVS Emacs has improved in that
1675 respect, but it still is slower than desirable.
1676
1677 * Improve image support under Emacs
1678
1679 The general image and color handling in Emacs is inefficient and
1680 partly defective. This is still the case in CVS. One option
1681 would be to replace the whole color and image handling with GDK
1682 routines when this library is available, since it has been
1683 optimized for it.
1684
1685
1686 \1f
1687 File: preview-latex.info, Node: Frequently Asked Questions, Next: Copying this Manual, Prev: ToDo, Up: Top
1688
1689 Appendix B Frequently Asked Questions
1690 *************************************
1691
1692 * Menu:
1693
1694 * Introduction to FAQ::
1695 * Requirements::
1696 * Installation Trouble::
1697 * Customization::
1698 * Troubleshooting::
1699 * Other formats::
1700
1701 \1f
1702 File: preview-latex.info, Node: Introduction to FAQ, Next: Requirements, Prev: Frequently Asked Questions, Up: Frequently Asked Questions
1703
1704 B.1 Introduction
1705 ================
1706
1707 B.1.1 How can I contribute to the FAQ?
1708 --------------------------------------
1709
1710 Send an email with the subject:
1711 Preview FAQ
1712 to <auctex-devel@gnu.org>.
1713
1714 \1f
1715 File: preview-latex.info, Node: Requirements, Next: Installation Trouble, Prev: Introduction to FAQ, Up: Frequently Asked Questions
1716
1717 B.2 Requirements
1718 ================
1719
1720 B.2.1 Which version of (X)Emacs is needed?
1721 ------------------------------------------
1722
1723 See also the table at the end of the section.
1724
1725 preview-latex nominally requires GNU Emacs with a version of at
1726 least 21.1. However, Emacs 22 (currently under development) offers
1727 superior performance and wider platform support, and is even now the
1728 recommended platform to use.
1729
1730 While recent versions of XEmacs 21.4 are supported, doing this in a
1731 satisfactory manner has proven to be difficult due to technical
1732 shortcomings and differing API's which are hard to come by. If
1733 preview-latex is an important part of your editing workflow, you are
1734 likely to get better results and support by switching to Emacs. Of
1735 course, you can improve support for your favorite editor by giving
1736 feedback in case you encounter bugs.
1737
1738 B.2.2 Which versions of Ghostscript and AUCTeX are needed?
1739 ----------------------------------------------------------
1740
1741 We recommend to use GNU or AFPL Ghostscript with a version of at least
1742 7.07.
1743
1744 preview-latex has been distributed as part of AUCTeX since version
1745 11.80. If your version of AUCTeX is older than that, or if it does not
1746 contain a working copy of preview-latex, complain to wherever you got
1747 it from.
1748
1749 B.2.3 I have trouble with the display format...
1750 -----------------------------------------------
1751
1752 We recommend keeping the variable `preview-image-type' set to `dvipng'
1753 (if you have it installed) or `png'. This is the default and can be
1754 set via the Preview/Customize menu.
1755
1756 All other formats are known to have inconveniences, either in file
1757 size or quality. There are some Emacs versions around not supporting
1758 PNG; the proper way to deal with that is to complain to your Emacs
1759 provider. Short of that, checking out PNM or JPEG formats might be a
1760 good way to find out whether the lack of PNG format support might be
1761 the only problem with your Emacs.
1762
1763 B.2.4 For which OS does preview work?
1764 -------------------------------------
1765
1766 It is known to work under the X Window System for Linux and for several
1767 flavors of Unix: we have reports for HP and Solaris.
1768
1769 There are several development versions of Emacs around for native
1770 MacOS Carbon, and preview-latex is working with them, too.
1771
1772 With Windows, Cygwin and native ports of XEmacs should work.
1773 preview-latex will not work with any native version 21 of Emacs under
1774 Windows: you need to get a hold of Emacs 22 which is at the time of
1775 this writing not released but available as a developer snapshot.
1776
1777 The entry "X11/Unix" currently means Linux, Solaris or HP/UX, as
1778 well as the X-specific version for Mac/OSX.
1779
1780 OS Emacs version XEmacs version
1781 X11/Unix 21.1 21.4.9
1782 Win9x cygwin 21.3.50? 21.4.8
1783 Win9x native 22.1 21.4.8
1784 MacOSX native 22.1 -
1785
1786 \1f
1787 File: preview-latex.info, Node: Installation Trouble, Next: Customization, Prev: Requirements, Up: Frequently Asked Questions
1788
1789 B.3 Installation Trouble
1790 ========================
1791
1792 B.3.1 I just get `LaTeX found no preview images'.
1793 -------------------------------------------------
1794
1795 The reason for this is that LaTeX found no preview images in the
1796 document in question.
1797
1798 One reason might be that there are no previews to be seen. If you
1799 have not used preview-latex before, you might not know its manner of
1800 operation. One sure-fire way to test if you just have a document where
1801 no previews are to be found is to use the provided example document
1802 `circ.tex' (you will have to copy it to some directory where you have
1803 write permissions). If the symptom persists, you have a problem, and
1804 the problem is most likely a LaTeX problem. Here are possible reasons:
1805
1806 Filename database not updated
1807 Various TeX distributions have their own ways of knowing where the
1808 files are without actually searching directories. The normal
1809 preview-latex installation should detect common tools for that
1810 purpose and use them. If this goes wrong, or if the files get
1811 installed into a place where they are not looked for, the LaTeX
1812 run will fail.
1813
1814 An incomplete manual installation
1815 This should not happen if you followed installation instructions.
1816 Unfortunately, people know better all the time. If only
1817 `preview.sty' gets installed without a set of supplementary files
1818 also in the `latex' subdirectory, preview-latex runs will not
1819 generate any errors, but they will not produce any previews,
1820 either.
1821
1822 An outdated `preview' installation
1823 The `preview.sty' package is useful for more than just
1824 preview-latex. For example, it is part of TeXlive. So you have
1825 to make sure that preview-latex does not get to work with outdated
1826 style and configuration files: some newer features will not work
1827 with older TeX style files, and really old files will make
1828 preview-latex fail completely. There usual is a local `texmf'
1829 tree, or even a user-specific tree that are searched before the
1830 default tree. Make sure that the first version of those files
1831 that gets found is the correct one.
1832
1833 B.3.2 I have problems with the XEmacs installation
1834 --------------------------------------------------
1835
1836 Please note that the XEmacs installation is different, since XEmacs has
1837 a package system that gets used here. Please make sure that you read
1838 and follow the installation instructions for XEmacs.
1839
1840 \1f
1841 File: preview-latex.info, Node: Customization, Next: Troubleshooting, Prev: Installation Trouble, Up: Frequently Asked Questions
1842
1843 B.4 Customization
1844 =================
1845
1846 B.4.1 Why don't I get balloon help like in the screen shots?
1847 ------------------------------------------------------------
1848
1849 Some users have reported problems with their XEmacs version, so balloon
1850 help is no longer switched on by default. Use the Preview/Customize
1851 menu or `<M-x> customize-variable' in order to customize
1852 `preview-use-balloon-help' to `On'. This only concerns XEmacs:
1853 tooltips under GNU Emacs are enabled by default and unproblematic.
1854
1855 B.4.2 How to include additional environments like `enumerate'
1856 -------------------------------------------------------------
1857
1858 By default, preview-latex is intended mainly for displaying
1859 mathematical formulas, so environments like `enumerate' or `tabular'
1860 (except where contained in a float) are not included. You can include
1861 them however manually by adding the lines:
1862
1863 \usepackage[displaymath,textmath,sections,graphics,floats]{preview}
1864 \PreviewEnvironment{enumerate}
1865
1866 in your document header, that is before
1867
1868 \begin{document}
1869 In general, `preview' should be loaded as the last thing before the
1870 start of document.
1871
1872 Be aware that
1873
1874 \PreviewEnvironment{...}
1875
1876 does not accept a comma separated list! Also note that by putting
1877 more and more
1878
1879 \PreviewEnvironment{...}
1880
1881 in your document, it will look more and more like a DVI file preview
1882 when running preview-latex. Since each preview is treated as one large
1883 monolithic block by Emacs, one should really restrict previews to those
1884 elements where the improvement in visual representation more than makes
1885 up for the decreased editability.
1886
1887 B.4.3 What if I don't want to change the document?
1888 --------------------------------------------------
1889
1890 The easiest way is to generate a configuration file in the current
1891 directory. You can basically either create `prdefault.cfg' which is
1892 used for any use of the `preview' package, or you can use
1893 `prauctex.cfg' which only applies to the use from with Emacs. Let us
1894 assume you use the latter. In that case you should write something like
1895
1896 \InputIfFileExists{preview/prauctex.cfg}{}{}
1897 \PreviewEnvironment{enumerate}
1898
1899 in it. The first line inputs the system-wide default configuration
1900 (the file name should match that, but not your own `prauctex.cfg'),
1901 then you add your own stuff.
1902
1903 B.4.4 Suddenly I get gazillions of ridiculous pages?!?
1904 ------------------------------------------------------
1905
1906 When preview-latex works on extracting its stuff, it typesets each
1907 single preview on a page of its own. This only happens when actual
1908 previews get generated. Now if you want to configure preview-latex in
1909 your document, you need to add your own `\usepackage' call to `preview'
1910 so that it will be able to interpret its various definition commands.
1911 It is an error to add the `active' option to this invocation: you don't
1912 want the package to be active unless preview-latex itself enables the
1913 previewing operation (which it will).
1914
1915 B.4.5 Does preview-latex work with presentation classes?
1916 --------------------------------------------------------
1917
1918 preview-latex should work with most presentation classes. However,
1919 since those classes often have macros or pseudo environments
1920 encompassing a complete slide, you will need to use the customization
1921 facilities of `preview.sty' to tell it how to resolve this, whether you
1922 want no previews, previews of whole slides or previews of inner
1923 material.
1924
1925 \1f
1926 File: preview-latex.info, Node: Troubleshooting, Next: Other formats, Prev: Customization, Up: Frequently Asked Questions
1927
1928 B.5 Troubleshooting
1929 ===================
1930
1931 B.5.1 Preview causes all sort of strange error messages
1932 -------------------------------------------------------
1933
1934 When running preview-latex and taking a look at either log file or
1935 terminal output, lots of messages like
1936
1937 ! Preview: Snippet 3 started.
1938 <-><->
1939
1940 l.52 \item Sie lassen sich als Funktion $
1941 y = f(x)$ darstellen.
1942 ! Preview: Snippet 3 ended.(491520+163840x2494310).
1943 <-><->
1944
1945 l.52 \item Sie lassen sich als Funktion $y = f(x)$
1946 darstellen.
1947
1948 appear (previous versions generated messages looking even more like
1949 errors). Those are not real errors (as will be noted in the log file).
1950 Or rather, while they *are* really TeX error messages, they are
1951 intentional. This currently is the only reliable way to pass the
1952 information from the LaTeX run of preview-latex to its Emacs part about
1953 where the previews originated in the source text. Since they are
1954 actual errors, you will also get AUCTeX to state
1955 Preview-LaTeX exited as expected with code 1 at Wed Sep 4 17:03:30
1956 after the LaTeX run in the run buffer. This merely indicates that
1957 errors were present, and errors will always be present when
1958 preview-latex is operating. There might be also real errors, so in
1959 case of doubt, look for them explicitly in either run buffer or the
1960 resulting `.log' file.
1961
1962 B.5.2 Why do my DVI and PDF output files vanish?
1963 ------------------------------------------------
1964
1965 In order to produce the preview images preview-latex runs LaTeX on the
1966 master or region file. The resulting DVI or PDF file can happen to
1967 have the same name as the output file of a regular LaTeX run. So the
1968 regular output file gets overwritten and is subsequently deleted by
1969 preview-latex.
1970
1971 B.5.3 My output file suddenly only contains preview images?!
1972 ------------------------------------------------------------
1973
1974 As mentioned in the previews FAQ entry, preview-latex might use the
1975 file name of the original output file for the creation of preview
1976 images. If the original output file is being displayed with a viewer
1977 when this happens, you might see strange effects depending on the
1978 viewer, e.g. a message about the file being corrupted or the display of
1979 all the preview images instead of your typeset document. (Also *Note
1980 Customization::.)
1981
1982 \1f
1983 File: preview-latex.info, Node: Other formats, Prev: Troubleshooting, Up: Frequently Asked Questions
1984
1985 B.6 preview-latex when not using LaTeX
1986 ======================================
1987
1988 B.6.1 Does preview-latex work with PDFLaTeX?
1989 ---------------------------------------------
1990
1991 Yes, as long as you use AUCTeX's own PDFLaTeX mode and have not messed
1992 with `TeX-command-list'.
1993
1994 B.6.2 Does preview-latex work with `elatex'?
1995 --------------------------------------------
1996
1997 No problem here. If you configure your AUCTeX to use `elatex', or
1998 simply have `latex' point to `elatex', this will work fine. Modern TeX
1999 distributions use eTeX for LaTeX, anyway.
2000
2001 B.6.3 Does preview-latex work with ConTeXt?
2002 -------------------------------------------
2003
2004 In short, no. The `preview' package is LaTeX-dependent. Adding
2005 support for other formats requires volunteers.
2006
2007 B.6.4 Does preview-latex work with plain TeX?
2008 ---------------------------------------------
2009
2010 Again, no. Restructuring the `preview' package for `plain' operation
2011 would be required. Volunteers welcome.
2012
2013 In some cases you might get around by making a wrapper pseudo-Master
2014 file looking like the following:
2015
2016 \documentclass{article}
2017 \usepackage{plain}
2018 \begin{document}
2019 \begin{plain}
2020 \input myplainfile
2021 \end{plain}
2022 \end{document}
2023
2024 \1f
2025 File: preview-latex.info, Node: Copying this Manual, Next: Index, Prev: Frequently Asked Questions, Up: Top
2026
2027 Appendix C Copying this Manual
2028 ******************************
2029
2030 The copyright notice for this manual is:
2031
2032 This manual is for preview-latex, a LaTeX preview mode for AUCTeX
2033 (version 11.86 from 2010-02-21).
2034
2035 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
2036 Foundation, Inc.
2037
2038 Permission is granted to copy, distribute and/or modify this
2039 document under the terms of the GNU Free Documentation License,
2040 Version 1.3 or any later version published by the Free Software
2041 Foundation; with no Invariant Sections, no Front-Cover Texts and
2042 no Back-Cover Texts. A copy of the license is included in the
2043 section entitled "GNU Free Documentation License."
2044
2045 The full license text can be read here:
2046
2047 * Menu:
2048
2049 * GNU Free Documentation License:: License for copying this manual.
2050
2051 \1f
2052 File: preview-latex.info, Node: GNU Free Documentation License, Up: Copying this Manual
2053
2054 C.1 GNU Free Documentation License
2055 ==================================
2056
2057 Version 1.3, 3 November 2008
2058
2059 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software
2060 Foundation, Inc. `http://fsf.org/'
2061
2062 Everyone is permitted to copy and distribute verbatim copies
2063 of this license document, but changing it is not allowed.
2064
2065 0. PREAMBLE
2066
2067 The purpose of this License is to make a manual, textbook, or other
2068 functional and useful document "free" in the sense of freedom: to
2069 assure everyone the effective freedom to copy and redistribute it,
2070 with or without modifying it, either commercially or
2071 noncommercially. Secondarily, this License preserves for the
2072 author and publisher a way to get credit for their work, while not
2073 being considered responsible for modifications made by others.
2074
2075 This License is a kind of "copyleft", which means that derivative
2076 works of the document must themselves be free in the same sense.
2077 It complements the GNU General Public License, which is a copyleft
2078 license designed for free software.
2079
2080 We have designed this License in order to use it for manuals for
2081 free software, because free software needs free documentation: a
2082 free program should come with manuals providing the same freedoms
2083 that the software does. But this License is not limited to
2084 software manuals; it can be used for any textual work, regardless
2085 of subject matter or whether it is published as a printed book.
2086 We recommend this License principally for works whose purpose is
2087 instruction or reference.
2088
2089 1. APPLICABILITY AND DEFINITIONS
2090
2091 This License applies to any manual or other work, in any medium,
2092 that contains a notice placed by the copyright holder saying it
2093 can be distributed under the terms of this License. Such a notice
2094 grants a world-wide, royalty-free license, unlimited in duration,
2095 to use that work under the conditions stated herein. The
2096 "Document", below, refers to any such manual or work. Any member
2097 of the public is a licensee, and is addressed as "you". You
2098 accept the license if you copy, modify or distribute the work in a
2099 way requiring permission under copyright law.
2100
2101 A "Modified Version" of the Document means any work containing the
2102 Document or a portion of it, either copied verbatim, or with
2103 modifications and/or translated into another language.
2104
2105 A "Secondary Section" is a named appendix or a front-matter section
2106 of the Document that deals exclusively with the relationship of the
2107 publishers or authors of the Document to the Document's overall
2108 subject (or to related matters) and contains nothing that could
2109 fall directly within that overall subject. (Thus, if the Document
2110 is in part a textbook of mathematics, a Secondary Section may not
2111 explain any mathematics.) The relationship could be a matter of
2112 historical connection with the subject or with related matters, or
2113 of legal, commercial, philosophical, ethical or political position
2114 regarding them.
2115
2116 The "Invariant Sections" are certain Secondary Sections whose
2117 titles are designated, as being those of Invariant Sections, in
2118 the notice that says that the Document is released under this
2119 License. If a section does not fit the above definition of
2120 Secondary then it is not allowed to be designated as Invariant.
2121 The Document may contain zero Invariant Sections. If the Document
2122 does not identify any Invariant Sections then there are none.
2123
2124 The "Cover Texts" are certain short passages of text that are
2125 listed, as Front-Cover Texts or Back-Cover Texts, in the notice
2126 that says that the Document is released under this License. A
2127 Front-Cover Text may be at most 5 words, and a Back-Cover Text may
2128 be at most 25 words.
2129
2130 A "Transparent" copy of the Document means a machine-readable copy,
2131 represented in a format whose specification is available to the
2132 general public, that is suitable for revising the document
2133 straightforwardly with generic text editors or (for images
2134 composed of pixels) generic paint programs or (for drawings) some
2135 widely available drawing editor, and that is suitable for input to
2136 text formatters or for automatic translation to a variety of
2137 formats suitable for input to text formatters. A copy made in an
2138 otherwise Transparent file format whose markup, or absence of
2139 markup, has been arranged to thwart or discourage subsequent
2140 modification by readers is not Transparent. An image format is
2141 not Transparent if used for any substantial amount of text. A
2142 copy that is not "Transparent" is called "Opaque".
2143
2144 Examples of suitable formats for Transparent copies include plain
2145 ASCII without markup, Texinfo input format, LaTeX input format,
2146 SGML or XML using a publicly available DTD, and
2147 standard-conforming simple HTML, PostScript or PDF designed for
2148 human modification. Examples of transparent image formats include
2149 PNG, XCF and JPG. Opaque formats include proprietary formats that
2150 can be read and edited only by proprietary word processors, SGML or
2151 XML for which the DTD and/or processing tools are not generally
2152 available, and the machine-generated HTML, PostScript or PDF
2153 produced by some word processors for output purposes only.
2154
2155 The "Title Page" means, for a printed book, the title page itself,
2156 plus such following pages as are needed to hold, legibly, the
2157 material this License requires to appear in the title page. For
2158 works in formats which do not have any title page as such, "Title
2159 Page" means the text near the most prominent appearance of the
2160 work's title, preceding the beginning of the body of the text.
2161
2162 The "publisher" means any person or entity that distributes copies
2163 of the Document to the public.
2164
2165 A section "Entitled XYZ" means a named subunit of the Document
2166 whose title either is precisely XYZ or contains XYZ in parentheses
2167 following text that translates XYZ in another language. (Here XYZ
2168 stands for a specific section name mentioned below, such as
2169 "Acknowledgements", "Dedications", "Endorsements", or "History".)
2170 To "Preserve the Title" of such a section when you modify the
2171 Document means that it remains a section "Entitled XYZ" according
2172 to this definition.
2173
2174 The Document may include Warranty Disclaimers next to the notice
2175 which states that this License applies to the Document. These
2176 Warranty Disclaimers are considered to be included by reference in
2177 this License, but only as regards disclaiming warranties: any other
2178 implication that these Warranty Disclaimers may have is void and
2179 has no effect on the meaning of this License.
2180
2181 2. VERBATIM COPYING
2182
2183 You may copy and distribute the Document in any medium, either
2184 commercially or noncommercially, provided that this License, the
2185 copyright notices, and the license notice saying this License
2186 applies to the Document are reproduced in all copies, and that you
2187 add no other conditions whatsoever to those of this License. You
2188 may not use technical measures to obstruct or control the reading
2189 or further copying of the copies you make or distribute. However,
2190 you may accept compensation in exchange for copies. If you
2191 distribute a large enough number of copies you must also follow
2192 the conditions in section 3.
2193
2194 You may also lend copies, under the same conditions stated above,
2195 and you may publicly display copies.
2196
2197 3. COPYING IN QUANTITY
2198
2199 If you publish printed copies (or copies in media that commonly
2200 have printed covers) of the Document, numbering more than 100, and
2201 the Document's license notice requires Cover Texts, you must
2202 enclose the copies in covers that carry, clearly and legibly, all
2203 these Cover Texts: Front-Cover Texts on the front cover, and
2204 Back-Cover Texts on the back cover. Both covers must also clearly
2205 and legibly identify you as the publisher of these copies. The
2206 front cover must present the full title with all words of the
2207 title equally prominent and visible. You may add other material
2208 on the covers in addition. Copying with changes limited to the
2209 covers, as long as they preserve the title of the Document and
2210 satisfy these conditions, can be treated as verbatim copying in
2211 other respects.
2212
2213 If the required texts for either cover are too voluminous to fit
2214 legibly, you should put the first ones listed (as many as fit
2215 reasonably) on the actual cover, and continue the rest onto
2216 adjacent pages.
2217
2218 If you publish or distribute Opaque copies of the Document
2219 numbering more than 100, you must either include a
2220 machine-readable Transparent copy along with each Opaque copy, or
2221 state in or with each Opaque copy a computer-network location from
2222 which the general network-using public has access to download
2223 using public-standard network protocols a complete Transparent
2224 copy of the Document, free of added material. If you use the
2225 latter option, you must take reasonably prudent steps, when you
2226 begin distribution of Opaque copies in quantity, to ensure that
2227 this Transparent copy will remain thus accessible at the stated
2228 location until at least one year after the last time you
2229 distribute an Opaque copy (directly or through your agents or
2230 retailers) of that edition to the public.
2231
2232 It is requested, but not required, that you contact the authors of
2233 the Document well before redistributing any large number of
2234 copies, to give them a chance to provide you with an updated
2235 version of the Document.
2236
2237 4. MODIFICATIONS
2238
2239 You may copy and distribute a Modified Version of the Document
2240 under the conditions of sections 2 and 3 above, provided that you
2241 release the Modified Version under precisely this License, with
2242 the Modified Version filling the role of the Document, thus
2243 licensing distribution and modification of the Modified Version to
2244 whoever possesses a copy of it. In addition, you must do these
2245 things in the Modified Version:
2246
2247 A. Use in the Title Page (and on the covers, if any) a title
2248 distinct from that of the Document, and from those of
2249 previous versions (which should, if there were any, be listed
2250 in the History section of the Document). You may use the
2251 same title as a previous version if the original publisher of
2252 that version gives permission.
2253
2254 B. List on the Title Page, as authors, one or more persons or
2255 entities responsible for authorship of the modifications in
2256 the Modified Version, together with at least five of the
2257 principal authors of the Document (all of its principal
2258 authors, if it has fewer than five), unless they release you
2259 from this requirement.
2260
2261 C. State on the Title page the name of the publisher of the
2262 Modified Version, as the publisher.
2263
2264 D. Preserve all the copyright notices of the Document.
2265
2266 E. Add an appropriate copyright notice for your modifications
2267 adjacent to the other copyright notices.
2268
2269 F. Include, immediately after the copyright notices, a license
2270 notice giving the public permission to use the Modified
2271 Version under the terms of this License, in the form shown in
2272 the Addendum below.
2273
2274 G. Preserve in that license notice the full lists of Invariant
2275 Sections and required Cover Texts given in the Document's
2276 license notice.
2277
2278 H. Include an unaltered copy of this License.
2279
2280 I. Preserve the section Entitled "History", Preserve its Title,
2281 and add to it an item stating at least the title, year, new
2282 authors, and publisher of the Modified Version as given on
2283 the Title Page. If there is no section Entitled "History" in
2284 the Document, create one stating the title, year, authors,
2285 and publisher of the Document as given on its Title Page,
2286 then add an item describing the Modified Version as stated in
2287 the previous sentence.
2288
2289 J. Preserve the network location, if any, given in the Document
2290 for public access to a Transparent copy of the Document, and
2291 likewise the network locations given in the Document for
2292 previous versions it was based on. These may be placed in
2293 the "History" section. You may omit a network location for a
2294 work that was published at least four years before the
2295 Document itself, or if the original publisher of the version
2296 it refers to gives permission.
2297
2298 K. For any section Entitled "Acknowledgements" or "Dedications",
2299 Preserve the Title of the section, and preserve in the
2300 section all the substance and tone of each of the contributor
2301 acknowledgements and/or dedications given therein.
2302
2303 L. Preserve all the Invariant Sections of the Document,
2304 unaltered in their text and in their titles. Section numbers
2305 or the equivalent are not considered part of the section
2306 titles.
2307
2308 M. Delete any section Entitled "Endorsements". Such a section
2309 may not be included in the Modified Version.
2310
2311 N. Do not retitle any existing section to be Entitled
2312 "Endorsements" or to conflict in title with any Invariant
2313 Section.
2314
2315 O. Preserve any Warranty Disclaimers.
2316
2317 If the Modified Version includes new front-matter sections or
2318 appendices that qualify as Secondary Sections and contain no
2319 material copied from the Document, you may at your option
2320 designate some or all of these sections as invariant. To do this,
2321 add their titles to the list of Invariant Sections in the Modified
2322 Version's license notice. These titles must be distinct from any
2323 other section titles.
2324
2325 You may add a section Entitled "Endorsements", provided it contains
2326 nothing but endorsements of your Modified Version by various
2327 parties--for example, statements of peer review or that the text
2328 has been approved by an organization as the authoritative
2329 definition of a standard.
2330
2331 You may add a passage of up to five words as a Front-Cover Text,
2332 and a passage of up to 25 words as a Back-Cover Text, to the end
2333 of the list of Cover Texts in the Modified Version. Only one
2334 passage of Front-Cover Text and one of Back-Cover Text may be
2335 added by (or through arrangements made by) any one entity. If the
2336 Document already includes a cover text for the same cover,
2337 previously added by you or by arrangement made by the same entity
2338 you are acting on behalf of, you may not add another; but you may
2339 replace the old one, on explicit permission from the previous
2340 publisher that added the old one.
2341
2342 The author(s) and publisher(s) of the Document do not by this
2343 License give permission to use their names for publicity for or to
2344 assert or imply endorsement of any Modified Version.
2345
2346 5. COMBINING DOCUMENTS
2347
2348 You may combine the Document with other documents released under
2349 this License, under the terms defined in section 4 above for
2350 modified versions, provided that you include in the combination
2351 all of the Invariant Sections of all of the original documents,
2352 unmodified, and list them all as Invariant Sections of your
2353 combined work in its license notice, and that you preserve all
2354 their Warranty Disclaimers.
2355
2356 The combined work need only contain one copy of this License, and
2357 multiple identical Invariant Sections may be replaced with a single
2358 copy. If there are multiple Invariant Sections with the same name
2359 but different contents, make the title of each such section unique
2360 by adding at the end of it, in parentheses, the name of the
2361 original author or publisher of that section if known, or else a
2362 unique number. Make the same adjustment to the section titles in
2363 the list of Invariant Sections in the license notice of the
2364 combined work.
2365
2366 In the combination, you must combine any sections Entitled
2367 "History" in the various original documents, forming one section
2368 Entitled "History"; likewise combine any sections Entitled
2369 "Acknowledgements", and any sections Entitled "Dedications". You
2370 must delete all sections Entitled "Endorsements."
2371
2372 6. COLLECTIONS OF DOCUMENTS
2373
2374 You may make a collection consisting of the Document and other
2375 documents released under this License, and replace the individual
2376 copies of this License in the various documents with a single copy
2377 that is included in the collection, provided that you follow the
2378 rules of this License for verbatim copying of each of the
2379 documents in all other respects.
2380
2381 You may extract a single document from such a collection, and
2382 distribute it individually under this License, provided you insert
2383 a copy of this License into the extracted document, and follow
2384 this License in all other respects regarding verbatim copying of
2385 that document.
2386
2387 7. AGGREGATION WITH INDEPENDENT WORKS
2388
2389 A compilation of the Document or its derivatives with other
2390 separate and independent documents or works, in or on a volume of
2391 a storage or distribution medium, is called an "aggregate" if the
2392 copyright resulting from the compilation is not used to limit the
2393 legal rights of the compilation's users beyond what the individual
2394 works permit. When the Document is included in an aggregate, this
2395 License does not apply to the other works in the aggregate which
2396 are not themselves derivative works of the Document.
2397
2398 If the Cover Text requirement of section 3 is applicable to these
2399 copies of the Document, then if the Document is less than one half
2400 of the entire aggregate, the Document's Cover Texts may be placed
2401 on covers that bracket the Document within the aggregate, or the
2402 electronic equivalent of covers if the Document is in electronic
2403 form. Otherwise they must appear on printed covers that bracket
2404 the whole aggregate.
2405
2406 8. TRANSLATION
2407
2408 Translation is considered a kind of modification, so you may
2409 distribute translations of the Document under the terms of section
2410 4. Replacing Invariant Sections with translations requires special
2411 permission from their copyright holders, but you may include
2412 translations of some or all Invariant Sections in addition to the
2413 original versions of these Invariant Sections. You may include a
2414 translation of this License, and all the license notices in the
2415 Document, and any Warranty Disclaimers, provided that you also
2416 include the original English version of this License and the
2417 original versions of those notices and disclaimers. In case of a
2418 disagreement between the translation and the original version of
2419 this License or a notice or disclaimer, the original version will
2420 prevail.
2421
2422 If a section in the Document is Entitled "Acknowledgements",
2423 "Dedications", or "History", the requirement (section 4) to
2424 Preserve its Title (section 1) will typically require changing the
2425 actual title.
2426
2427 9. TERMINATION
2428
2429 You may not copy, modify, sublicense, or distribute the Document
2430 except as expressly provided under this License. Any attempt
2431 otherwise to copy, modify, sublicense, or distribute it is void,
2432 and will automatically terminate your rights under this License.
2433
2434 However, if you cease all violation of this License, then your
2435 license from a particular copyright holder is reinstated (a)
2436 provisionally, unless and until the copyright holder explicitly
2437 and finally terminates your license, and (b) permanently, if the
2438 copyright holder fails to notify you of the violation by some
2439 reasonable means prior to 60 days after the cessation.
2440
2441 Moreover, your license from a particular copyright holder is
2442 reinstated permanently if the copyright holder notifies you of the
2443 violation by some reasonable means, this is the first time you have
2444 received notice of violation of this License (for any work) from
2445 that copyright holder, and you cure the violation prior to 30 days
2446 after your receipt of the notice.
2447
2448 Termination of your rights under this section does not terminate
2449 the licenses of parties who have received copies or rights from
2450 you under this License. If your rights have been terminated and
2451 not permanently reinstated, receipt of a copy of some or all of
2452 the same material does not give you any rights to use it.
2453
2454 10. FUTURE REVISIONS OF THIS LICENSE
2455
2456 The Free Software Foundation may publish new, revised versions of
2457 the GNU Free Documentation License from time to time. Such new
2458 versions will be similar in spirit to the present version, but may
2459 differ in detail to address new problems or concerns. See
2460 `http://www.gnu.org/copyleft/'.
2461
2462 Each version of the License is given a distinguishing version
2463 number. If the Document specifies that a particular numbered
2464 version of this License "or any later version" applies to it, you
2465 have the option of following the terms and conditions either of
2466 that specified version or of any later version that has been
2467 published (not as a draft) by the Free Software Foundation. If
2468 the Document does not specify a version number of this License,
2469 you may choose any version ever published (not as a draft) by the
2470 Free Software Foundation. If the Document specifies that a proxy
2471 can decide which future versions of this License can be used, that
2472 proxy's public statement of acceptance of a version permanently
2473 authorizes you to choose that version for the Document.
2474
2475 11. RELICENSING
2476
2477 "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
2478 World Wide Web server that publishes copyrightable works and also
2479 provides prominent facilities for anybody to edit those works. A
2480 public wiki that anybody can edit is an example of such a server.
2481 A "Massive Multiauthor Collaboration" (or "MMC") contained in the
2482 site means any set of copyrightable works thus published on the MMC
2483 site.
2484
2485 "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
2486 license published by Creative Commons Corporation, a not-for-profit
2487 corporation with a principal place of business in San Francisco,
2488 California, as well as future copyleft versions of that license
2489 published by that same organization.
2490
2491 "Incorporate" means to publish or republish a Document, in whole or
2492 in part, as part of another Document.
2493
2494 An MMC is "eligible for relicensing" if it is licensed under this
2495 License, and if all works that were first published under this
2496 License somewhere other than this MMC, and subsequently
2497 incorporated in whole or in part into the MMC, (1) had no cover
2498 texts or invariant sections, and (2) were thus incorporated prior
2499 to November 1, 2008.
2500
2501 The operator of an MMC Site may republish an MMC contained in the
2502 site under CC-BY-SA on the same site at any time before August 1,
2503 2009, provided the MMC is eligible for relicensing.
2504
2505
2506 ADDENDUM: How to use this License for your documents
2507 ====================================================
2508
2509 To use this License in a document you have written, include a copy of
2510 the License in the document and put the following copyright and license
2511 notices just after the title page:
2512
2513 Copyright (C) YEAR YOUR NAME.
2514 Permission is granted to copy, distribute and/or modify this document
2515 under the terms of the GNU Free Documentation License, Version 1.3
2516 or any later version published by the Free Software Foundation;
2517 with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
2518 Texts. A copy of the license is included in the section entitled ``GNU
2519 Free Documentation License''.
2520
2521 If you have Invariant Sections, Front-Cover Texts and Back-Cover
2522 Texts, replace the "with...Texts." line with this:
2523
2524 with the Invariant Sections being LIST THEIR TITLES, with
2525 the Front-Cover Texts being LIST, and with the Back-Cover Texts
2526 being LIST.
2527
2528 If you have Invariant Sections without Cover Texts, or some other
2529 combination of the three, merge those two alternatives to suit the
2530 situation.
2531
2532 If your document contains nontrivial examples of program code, we
2533 recommend releasing these examples in parallel under your choice of
2534 free software license, such as the GNU General Public License, to
2535 permit their use in free software.
2536
2537 \1f
2538 File: preview-latex.info, Node: Index, Prev: Copying this Manual, Up: Top
2539
2540 Index
2541 *****
2542
2543