![]() |
Writing simple documents | ![]() |
As soon as you have performed the preparatory actions as explained
above, you can start typing. The usual English characters and
punctuation symbols can easily be obtained on most keyboards.
Accented characters from foreign languages can systematically be
obtained using the escape key. For instance, “é”
is obtained by typing A-' e. Similarly, we obtain
“à” via A-‘ a and so on.
Long words at borders of successive lines are automatically
hyphenated. In order to hyphenate foreign languages correctly, you
should specify the language of the document in the menu
At the left hand side of the footer, you see the document style, the
text properties at the current cursor position. Initially, it
displays “generic text roman 10”, which means that you
type in text mode using a 10 point roman font and the generic
document style. You can change the text properties (font, font size,
color, language) in the
At the right hand side of the footer, the character or object (like a change in the text properties) just before the cursor is displayed. We also display all environments which are active at the cursor position. This information should help you to orient yourself in the document.
Usually, long documents have a structure: they are organized in
chapters, sections and subsections, they contain different types of
text, such as regular text, citations, footnotes, theorems, etc.
After selecting a document style in
Currently, four standard document styles have been implemented:
letter, article, book and seminar. The seminar style is used for
making transparencies. As soon as you have selected such a style,
you can organize your text into sections (see
When you get more acquainted with TeXmacs, it is possible to add your own new environments in your own style file. Assume for instance that you often make citations and that you want those to appear in italic, with left and right margins of 1cm. Instead of manually changing the text and paragraph properties each time you make a citation, it is better to create a citation environment. Not only it will be faster to create a new citation when doing so, but it is also possible to systematically change the layout of your citations throughout the document just by changing the definition of the citation environment. The latter situation occurs for instance if you discover a posteriori that you prefer the citations to appear in a smaller font.
The simplest examples of structure in a text are content-based tags.
In
|
||||||||||||||||||||||||||||||||||||||||||
Using
Now comes the sublist:
The default tag is rendered in a different way depending on the level of nesting. At the outermost level, we used the • tag, at the second level ∘, and so on. When you are inside a list, notice that pressing return automatically starts a new item. If you need items which are several paragraphs long, then you may always use S-return in order to start a new paragraph.
Enumerate environments, which are started using
The last type of lists are descriptive lists. They are started using
In a similar way as content-based tags, environments are used to
mark portions of text with a special meaning. However, while content-based tags usually enclose small portions of text,
environments often enclose portions that are several paragraphs
long. Frequently used environments in mathematics are
You may enter environments using
Other frequently used environments with a similar rendering as
theorems, but which do not emphasize the enclosed text, are
As a general rule, TeXmacs takes care of the layout of your text.
Therefore, although we did not want to forbid this possibility, we
do not encourage you to typeset your document visually. For
instance, you should not insert spaces or blank lines as substitutes
for horizontal and vertical spaces between words and lines; instead,
additional space should be inserted explicitly using
Several types of explicit spacing commands have been implemented. First of all, you can insert rigid spaces of given widths and heights. Horizontal spaces do not have a height and are either stretchable or not. The length of a stretchable spaces depends on the way a paragraph is hyphenated. Furthermore, it is possible to insert tabular spaces. Vertical spaces may be inserted either at the start or the end of a paragraph: the additional vertical space between two paragraphs is the maximum of the vertical space after the first one and the vertical space before the second one (contrary to TeX, this prevents from superfluous space between two consecutive theorems).
As to the paragraph layout, the user may specify the paragraph style (justified, left ragged, centered or right ragged), the paragraph margins and the left (resp. right) indentation of the first (resp. last) line of a paragraph. The user also controls the spaces between paragraphs and successive lines in paragraphs.
You can specify the page layout in the
In TeXmacs, fonts have five main characteristics:
Notice that in the font selection system of LaTeX 2ε, the
font name and family are only one (namely, the family). Notice also
that the base font size is specified for the entire document in
Since there are many keyboard shortcuts, it is important to have some ways of classifying them in several categories, in order to make it easier to memorize them. As a general rule, keyboard shortcuts which fall in the same category are identified by a common prefix. The main such common prefixes are:
We recall that the particular modifier keys which are used in order
to obtain the M- and H- prefixes can
be configured in
Some standard keyboard actions which are valid in all modes are:
To write a text in an european language with a keyboard which does have the appropriate special keys, you can use the following shortcuts to create accented characters. Note that they are active regardless of the current language setting.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Special characters can also be created in any language context:
|
||||||||||||||||||||||||||||||||||||||||
When you press the " key, an appropriate quote
will be inserted. The quote character is chosen according to the
current language and the surrounding text. If the chosen quoting
style is not appropriate, you can change it in
|
||||||||||||||||
“English” quotes are considered ligatures of two successive backticks or apostrophes. They can be created with ‘ ‘ and ' ' but these are not actual keyboard commands: the result is two characters displayed specially, not a special single character.
Some shortcuts are available in specific language contexts. You can
set the text language for the whole document with
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Language-specific shortcuts override generic shortcuts; for example, you cannot easily type “ø” in hungarian context.
TeXmacs allows you to enter LaTeX commands directly from the keyboard as follows. You first hit the \-key in order to enter the hybrid LaTeX/TeXmacs command mode. Next you type the command you wish to execute. As soon as you finished typing your command, the left footer displays something like
<return>: action to be undertaken
When you hit the return-key at this stage, your command will be executed. For instance, in math-mode, you may create a fraction by typing \ f r a c return.
If the command you have typed is not a (recognized) LaTeX command, then we first look whether the command is an existing TeXmacs macro, function or environment (provided by the style file). If so, the corresponding macro expansion, function application or environment application is created (with the right number of arguments). Otherwise, it is assumed that your command corresponds to an environment variable and we ask for its value. The \-key is always equivalent to one of the commands M-i l, M-i e, M-i a, M-i # or M-i v.
To insert a literal \ (backslash) character, you can use the S-F5 \ sequence.
Certain more complex objects can have several states during the editing process. Examples of such dynamic objects are labels and references, because the appearance of the reference depends on a dynamically determined number. Many other examples of dynamic markup can be found in the documentation about writing style files.
When entering a dynamic object like a label using M-!, the default state is inactive. This inactive state enables you to type the information which is relevant to the dynamic object, such as the name of the label in our case. Certain dynamic objects take an arbitrary number of parameters, and new ones can be inserted using tab.
⟨label|pythagoras⟩ |
When you finished typing the relevant information for your dynamic object, you may type return in order to activate the object. An active dynamic object may be deactivated by placing your cursor just behind the object and hitting backspace.
It is possible for the user to modify the keyboard behaviour. In order to do so, we suggest first to look at the files in the directory $TEXMACS_PATH/progs/keyboard, where the standard keyboard behaviour is defined. Then you may redefine the keyboard behaviour in your private initialization file.