|
The GNU TeXmacs manual |
|
Overview
General
Question 1. What is TeXmacs?
-
is a free scientific text editor, which was both inspired by
TeX and GNU Emacs.
-
allows you to write structured documents via a wysiwyg
(what-you-see-is-what-you-get) and user friendly interface.
-
lets you create new styles.
-
implements high-quality typesetting algorithms and TeX fonts,
which helps you to produce professionally looking documents.
-
is suitable as an interface for computer algebra systems, as
the high typesetting quality goes through for automatically
generated formulas.
-
can be highly customized as it supports the Guile/Scheme extension language.
-
lets you export your documents to PS and PDF and offers both
import and export to HTML, LaTeX, Scheme, Verbatim and Xml. We
would very much appreciate your help for writing
and improving converters for TeXmacs documents.
Question 2. For what typical
purposes do people use TeXmacs?
Answer. TeXmacs can be used for
-
Books and Articles. They can be written fully within TeXmacs.
If your publisher requires a certain LaTeX style for an
article, then as a last step you can export your document to
LaTeX and make the final modifications there.
-
Presentations.
-
Interface to computer algebra systems and other scientific
software.
-
Webpages. For example the TeXmacs webpage is maintained as
TeXmacs documents, which are exported to HTML.
Question 3. What Operation Systems
are supported?
Answer. TeXmacs can be easily installed on
all major systems. There are rpm and
Debian packages as well as binaries available for Linux.
For Mac OS X there is a Fink
package. For MS Windows, a Cygwin
package is available.
Work is in progress to rewrite the graphical user interface of
TeXmacs, so that it becomes more portable. Your help
might actually be very useful here.
Question 4. What are the system
requirements?
Answer. A reasonably fast machine is
recommended. Having said this, I (Andreas) am typing this on a
Pentium III 450Mhz under Cygwin, and TeXmacs is still useable
here, although not overly reactive.
Question 5. I have already learned
TeX/LaTeX and Emacs, do I have to learn all over
again?
Answer. You will find out, that much
LaTeX-knowledge can be reused. For example, you can start a
section by typing \section[return] or you get
α1 by typing $\alpha_1$. Note
that there are even shorter ways provided, for example
$a[tab]$ gives you an alpha as well, so you might
want to migrate after a while. Styles like article, book or
seminar, as known from LaTeX, are provided as well. Furthermore,
many Emacs shortcuts like C-x
C-s for saving a file, or C-_ for undo
will work.
Question 6. I have a question,
where should I ask it?
Answer. The best place is the TeXmacs user
mailing list. Search this list and the FAQ beforehand, to ensure
your question was not asked before.
Question 7. Is it free
Software?
Answer. TeXmacs falls under the GNU public
licence.
System Appearance and Behavior
Question 8. TeXmacs hangs when
opening a document for a while and my disk is being filled with
files?
Answer. This behaviour is normal. TeXmacs
calls Metafont in order to generate fonts
which are not yet present. The first time you launch TeXmacs, many
fonts may therefore have to be generated. In order to avoid this,
you may download some pregenerated fonts.
Question 9. How can I see the
LaTeX or TeX code corresponding to what I see on the screen?
Answer. This question is due to a
fundamental misunderstanding about TeXmacs. Indeed, TeXmacs is not
based on TeX/LaTeX, although it does support (not yet
perfect) conversion to and from LaTeX. Furthermore, in
theory at least, there is actually no need anymore to look at
something like the TeX source, since TeXmacs is guaranteed to be
fully WYSIWYG. Conversion to LaTeX may only be useful, when
transmitting an accepted paper to the publisher of a journal.
Question 10. Why don't you use a
common graphical user interface like GTK for your scrollbars, menus,
and so on?
Answer. When I (Joris) started to develop
TeXmacs about four years ago, the common graphical user
interfaces were not as good as nowadays. Moreover, I wanted the
GUI to support some special features, like TeX fonts in the
menus. Nevertheless, now that graphical user interfaces did
become much better, I plan to switch to guile-gtk as soon as
possible. Using Guile-gtk in combination with TeXmacs has three
main advantages:
-
One has full access to the GTK widget set, which includes
menus, scrollable windows, file choosers, iconbars, etc.
-
Guile-gtk provides you with a very flexible and customizable
way to use these widgets.
-
The incorporation of Guile-gtk in TeXmacs should be natural,
since TeXmacs already supports the Guile/Scheme extension language.
Question 11. Trying to start
TeXmacs remotely over a ssh connection, I get an error, while
e.g. xclock works without a problem?
Answer. If you get an error message
including the following:
Fatal error: I failed to connect to Xserver in
'x_display_rep::x_display_rep
then execute export DISPLAY=127.0.0.1:10.0 on
the remote machine and make sure your /etc/hosts file is sound,
i.e. it contains the line 127.0.0.1
localhost and the IP information about the local and remote
machine.
Question 12. TeXmacs is unusually
slow while editing?
Answer. Graphics card drivers with poor 2D
performance can slow TeXmacs down termendously.
If you are running TeXmacs under X on a system with an ATI
graphics card and are using ATI's proprietary drivers (the
driver called fglrx), you can achieve a
significant speedup by
-
either running an X server such as Xgl that performs
2D operations using the 3D API of the graphics card driver,
-
or switching to an open source graphics card driver
such as ati or radeon which
have a far better 2D performance than fglrx.
Note that if you try both at the same time, you will slow your
system down even more, instead of speeding it up.
Windows/Cygwin specific
Question 13. What to do with
Cygwin specific questions?
Question 14. How to associate .tm
files with TeXmacs?
Answer. Create a file texmacs.bat
with the following content:
rem cmdow @ /hid
c:\cygwin\bin\bash –login -c "texmacs \"‘cygpath -u "%1"‘\""
Ensure that it lies in your PATH. Now you can
associate .tm files with this batch file.
If you want to hide the black Cygwin window when TeXmacs is
started, then download cmdow from http://www.commandline.co.uk/cmdow/,
drop cmdow.exe e.g. in your C:\WINDOWS\system32 directory (this applies to
Windows XP installed on C:\)
and uncomment (i.e. remove “rem” from)
the first line of texmacs.bat.
Question 15. How to get spell
checking working?
Answer. Install the Cygwin package aspell.
Execute in a shell:
cd /usr/bin
ln -s /usr/share/aspell/ispell ispell
Question 16. My Windows username
contains spaces. Will this cause problems?
Answer. It is strongly recommended to have a
Windows username without spaces. Please make a new account, as
simply changing the username could be insufficient.
Usage
Question 17. How to mark/select a
whole paragraph?
Answer. Clicking once on a word will place
the cursor there, clicking twice marks this word, clicking thrice
will mark the paragraph and so on; eventually, the whole document
will be selected.
Question 18. Spell checking always
starts at the beginning of the document?
Answer. Mark a region, and spell checking
will be restricted to this selection.
Question 19. How can I insert an
OpenOffice.org table?
-
Create a PostScript image of your table using OpenOffice
(File→Print→Print to file). Name the
file, for example, “table1.ps”.
-
Convert the PostScript file to an Encapsulated PostScript file
(.eps) using ps2epsi in a
shell. Just type: “ps2epsi table1.ps
table1.eps”.
-
Insert or link the image table.eps in the
TeXmacs document.
Question 20. How can I insert the
number of pages?
Answer. Put a label on the last page of
your document and use the pageref primitive in
order to produce the corresponding number.
Question 21. How can I resize an
image?
Answer. Put your cursor right behind the
image and press backspace. You will see the name
of the image, followed by six other fields. The two fields after
the name of the image are respectively its width and its height.
You may for instance set the width to 5cm and the
height to 27mm. When leaving the width open, it
will automatically be determined as a function of the height (and
vice versa). When leaving both fields open, the image will be
reproduced at its original size. Notice that a width of 1par
will span your image over the paragraph width.
Microtypography
Question 22. There is too much
space after an abbreviation like wrt. or
etc.?
Answer. This is because TeXmacs thinks, that
the sentence ends after the dot in the abbreviation. To resolve
this a posteriori, mark the abbreviation and press
A-a. To care for this while writing:
A-a etc. [right].
Question 23. How to add
unbreakable space?
Answer. Type M-/ after the
space.
Remaining legacy questions
Question 24. A publisher sent me a
giant LaTeX preamble I'm supposed to put in in order to prepare a book
for them. What is the best way of putting it in and figuring if it
will work?
Answer. I recommand to convert the preamble
to TeXmacs and to put the result in a TeXmacs style file. However,
the result will probably be disappointing, because conversion
between TeX/LaTeX and TeXmacs is not yet perfect and style files
are particularly problematic. What you can also do is write a
TeXmacs style file by your own which supports the major extra
constructs you want to use from the editors style file. When you
convert your book to LaTeX, you next use the editors style. Some
layout will probably need to be redone at that stage, but this
should actually be the work of the editor... Please look in the
TeXmacs help for more information about convertions between
TeXmacs and LaTeX.
© 1998–2002 Andreas Seidl, Joris van der Hoeven
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled
"GNU Free Documentation License".