summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-WYGexpts.html
blob: 2acbac7c55ed994b45efff4b7f2a23727a2d8cb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<head>
<title>UK TeX FAQ -- question label WYGexpts</title>
</head><body>
<h3>The TeX document preparation environment</h3>
<p/>&#8220;<a href="FAQ-notWYSIWYG.html">Why TeX is not WYSIWYG</a>&#8221;
outlines the reasons (or excuses) for the huge disparity of user
interface between &#8220;typical&#8221; TeX environments and commercial word
processors.
<p/>Nowadays, at last, there is a range of tools available that try either
to bridge or to close the gap.  One range modestly focuses on
providing the user with a legible source document.  At the other
extreme we have <a href="http://www.texmacs.org"><i>TeXmacs</a></i>,
a document processor using
TeX&#8217;s algorithms and fonts for both editor display and printing.
<i>TeXmacs</i> does not use the TeX
language itself (though among other formats, LaTeX may be exported
and imported).  A bit closer to LaTeX is
<a href="http://www.lyx.org/">LyX</a>, which has its own
editor display and file formats as well, but does its print output by
exporting to LaTeX.  The editor display merely resembles the
printed output, but you have the possibility of entering arbitrary
LaTeX code.  If you use constructs that LyX does not
understand, it will just display them as source text marked red, but
will properly export them.
<p/>Since a lot of work is needed to create an editor from scratch that
actually is good at editing (as well as catering for TeX), it is
perhaps no accident that several approaches have been implemented
using the extensible <i>emacs</i> editor.  The low end of the
prettifying range is occupied by syntax highlighting: marking TeX
tokens, comments and other stuff with special colours.
Many free editors (including <i>emacs</i>) can cater for TeX in
this way.  Under Windows, one of the more popular editors with such
support is the
Shareware product <a href="http://www.winedt.com/"><i>winedt</a></i>.
Continuing the range of
tools prettifying your input, we have the <i>emacs</i> package
<a href="http://x-symbol.sourceforge.net"><i>x-symbol</a></i>, which does
the WYSIWYG part of its work by replacing single TeX tokens and
accented letter sequences with appropriate-looking characters on the
screen.
<p/>A different type of tool focuses on making update and access to
previews of the typeset document more immediate.  A recent addition
in several viewers, editors and TeX executables are so-called
&#8216;source specials&#8217; for cross-navigation.  When TeX compiles a
document, it will upon request insert special markers for every input
line into the typeset output.  The markers are interpreted by the DVI
previewer which can be made to let its display track the page
corresponding to the editor input position, or to let the editor jump
to a source line corresponding to a click in the preview window.
<p/>An <i>emacs</i> package that combines this sort of editor movement
tracking with automatic fast recompilations (through the use of dumped
formats) is
<a href="http://pauillac.inria.fr/whizzytex/"><i>WhizzyTeX</a></i>
 which is best used with a previewer by the
same author.
<p/>Another <i>emacs</i> package called
<a href="http://preview-latex.sourceforge.net"><i>preview-latex</a></i>
tries to solve
the problem of visual correlation between source and previews in a
more direct way: it uses a LaTeX package to chop the document source
into interesting fragments (like figures, text or display math) which
it runs through LaTeX and replaces the source text of those
fragments with the corresponding rendered output images.  Since it
does not know about the structure of the images, at the actual cursor
position the source text is displayed while editing rather than the
preview.  This approach is more or less a hybrid of the source
prettifying and fast preview approaches since it works in the source
buffer but uses actual previews rendered by LaTeX.
<p/>A more ambitious contender is called TeXlite.  This
system is only available on request from its author;
it continuously updates its screen with the help of a special version
of TeX dumping its state in a compressed format at each page and
using hooks into TeX&#8217;s line breaking mechanism for reformatting
paragraphs on the fly.  That way, it can render the output from the
edited TeX code with interactive speed on-screen, and it offers the
possibility of editing directly in the preview window.
<p/>That many of these systems occupy slightly different niches can be
seen by comparing the range of the
<i>emacs</i>-based solutions ranging from syntax highlighting to instant
previewing: all of them can be activated at the same time without
actually interfering in their respective tasks.
<p/>The different approaches offer various choices differing in the
immediacy of their response, the screen area they work on (source or
separate window), degree of correspondence of the display to the final
output, and the balance they strike between visual aid and visual
distraction.
<dl>
<dt><tt><i>preview-latex</i></tt><dd>Distributed as part of <a href="http://mirror.ctan.org/support/auctex">support/auctex</a>; <a href="http://mirror.ctan.org//help/Catalogue/entries/preview-latex.html">catalogue entry</a>
<dt><tt><i>texmacs</i></tt><dd>Browse <a href="http://mirror.ctan.org/systems/unix/TeXmacs">systems/unix/TeXmacs</a>; <a href="http://mirror.ctan.org//help/Catalogue/entries/texmacs.html">catalogue entry</a>
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=WYGexpts">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=WYGexpts</a>
</body>