<TeXmacs|0.3.5.6>

<style|manual>

<\body>
  <assign|chapternr|1><chapter|Writing a simple text>

  <section|Starting TeXmacs up>

  Assume that you have started up TeXmacs, so that you have a window like
  below on your screen:

  <expand|big-figure|<postscript|../Images/start.png|/2|/2||||>|Window which
  appears when starting TeXmacs up.>

  Before you start typing a new text, we recommend you to perform the
  following steps:

  <\itemize>
    <item>Give your text a name under which it will be saved. This will
    enable be you to find your document back.

    <item>Select the language of your document.

    <item>Select the document style (letter, article, book, etc.).
  </itemize>

  In this chapter, we will only describe the first step. In <hlink|chapter
  4|../Part1/Chapter4.html>, we will discuss how to type texts in foreign
  languages. In <hlink|chapter 5|../Part2/Chapter5.html>, we discuss the
  importance of document styles. The default document style is a <with|font
  shape|italic|letter>.

  <section|Giving your document a name>

  We recommend you to give your document a name before you start to edit it,
  by saving it under a new name. This is achieved by selecting the <menu|save
  buffer as> item in the <postscript|../Xpms/tm_save.png|/2|/2||||> icon menu
  or the <menu|save as> item in the <menu|file> menu: press the left mouse
  button on <postscript|../Xpms/tm_save.png|/2|/2||||>, move your cursor to
  <menu|save buffer as> while maintaining the left mouse button pressed, and
  release the left mouse button.

  <expand|big-figure|<postscript|../Images/saveas-1.png|/2|/2||||>|Giving
  your document a name by saving it under a new name.>

  Notice that you could have achieved the same thing by simultaneously
  pressing the <with|font family|tt|shift> and the <with|font family|tt|F3>
  keys, as suggested by the <with|font shape|italic|help balloon>. This help
  balloon automatically shows up when leaving the mouse pointer on the
  <menu|save buffer as> for a while. After you released the left mouse
  button, a new window of the following form pops up:

  <expand|big-figure|<postscript|../Images/saveas-2.png|/2|/2||||>|The
  file-chooser can be used to browse your directory tree.>

  This window is also called a <with|font shape|italic|file browser>, because
  you can interactively choose a <with|font shape|italic|file name> and a
  directory where to save your file, by using the keyboard or the mouse. In
  the example, <with|font family|tt|..>, <with|font family|tt|images>,
  <with|font family|tt|phonetic> and <with|font family|tt|test> are the
  parent directory and subdirectories of the current directory. The file
  <with|font family|tt|demo.tm> is an already existing TeXmacs file in the
  current directory. The buttons <menu|home> and <menu|texts> can be used to
  return to your home directory or a special directory for TeXmacs documents.

  In order to finish the action of giving our text a name, we just type
  <with|font family|tt|test.tm> in the <menu|File:> field and press on
  <menu|Ok>:

  <expand|big-figure|<postscript|../Images/saveas-3.png|/2|/2||||>|Entering
  the name <with|font family|tt|test.tm> and clicking on the <menu|ok>
  button.>

  We notice that you should always let your file name end by the <with|font
  family|tt|.tm> <with|font shape|italic|suffix>, so that anyone can
  recognize that your file is a TeXmacs document. After giving your text a
  name, your main window should look like

  <expand|big-figure|<postscript|../Images/saveas-4.png|/2|/2||||>|Your
  document has been saved under the name <with|font family|tt|test.tm>.>

  First of all, you may notice the change of the title of your window.
  Furthermore, a message on the footer confirms the name change.

  <section|Writing a simple text>

  Once you have given your document a name, you may start to type your text.
  In <hlink|chapter 4|../Part1/Chapter4.html>, we will explain how to type
  special characters, which are necessary for writing texts in foreign
  languages. The following is a sample text, which you may try to type as an
  exercise:

  <expand|big-figure|<postscript|../Images/simple-1.png|/2|/2||||>|Typing a
  simple text using TeXmacs.>

  When you are done with typing, we recommend you to first save your
  document, using the <with|font series|bold|save buffer> item in the
  <postscript|../Xpms/tm_save.png|/2|/2||||> icon menu, or by pressing the
  <with|font family|tt|F3> key. A message on the footer should confirm the
  success of this operation:

  <expand|big-figure|<postscript|../Images/simple-2.png|/2|/2||||>|We just
  save the simple text for security.>

  For your safety, TeXmacs actually <with|font shape|italic|autosaves> your
  document every two minutes. If you forgot to save your document before
  closing TeXmacs, or if your computer is unpowered for some reason, then you
  will be prompted whether you want to retrieve the last unsaved changes in
  your document as soon as you try to load it. Again a message on the footer
  confirms autosaving:

  <expand|big-figure|<postscript|../Images/simple-3.png|/2|/2||||>|TeXmacs
  automatically <with|font shape|italic|autosaves> your document every two
  minutes.>

  When you are done with typing, you usually want to print your document out.
  This can be done by selecting the <menu|print all> item in the
  <postscript|../Xpms/tm_print.png|/2|/2||||> icon menu, or by pressing the
  <with|font family|tt|F4> key. Before printing, it might be that you want to
  setup your printer, by pushing the <menu|setup printer> item in the
  <postscript|../Xpms/tm_print.png|/2|/2||||> icon menu. You will then be
  prompted for the printing command you want to use (like <with|font
  family|tt|lpr>), the paper type of your printer (like <with|font
  family|tt|a4> in Europe or <with|font family|tt|letter> in the USA) and the
  printer's precision in dots per inch (<with|font family|tt|600> is
  default).

  In order to retrieve your text after closing TeXmacs, you first have to
  push the <menu|load buffer> item in the
  <postscript|../Xpms/tm_load.png|/2|/2||||> icon menu or hit the <with|font
  family|tt|F2> key. Next, you may select your file using the file browser.
  In our example, the file <with|font family|tt|test.tm> indeed appears in
  the file browser and we may retrieve it by rapidly clicking twice on it.

  <expand|big-figure|<postscript|../Images/load.png|/2|/2||||>|Retrieving the
  simple text from the disk.>

  \;
</body>

<\initial>
  <\collection>
    <associate|paragraph width|150mm>
    <associate|odd page margin|30mm>
    <associate|shrinking factor|4>
    <associate|page right margin|30mm>
    <associate|page top margin|30mm>
    <associate|reduction page right margin|25mm>
    <associate|paragraph hyphenation|professional>
    <associate|reduction page bottom margin|15mm>
    <associate|page type|a4>
    <associate|reduction page left margin|25mm>
    <associate|even page margin|30mm>
    <associate|page bottom margin|30mm>
    <associate|reduction page top margin|15mm>
  </collection>
</initial>

<\references>
  <\collection>
    <associate|toc-1|<tuple|2|?>>
    <associate|toc-2|<tuple|2.1|?>>
    <associate|toc-3|<tuple|2.2|?>>
    <associate|toc-4|<tuple|2.3|?>>
  </collection>
</references>

<\auxiliary>
  <\collection>
    <\associate|toc>
      <vspace*|1fn><with|font series|<quote|bold>|2 Writing a simple
      text><value|toc-dots><pageref|toc-1><vspace|0.5fn>

      2.1 Starting TeXmacs up<value|toc-dots><pageref|toc-2>

      2.2 Giving your document a name<value|toc-dots><pageref|toc-3>

      2.3 Writing a simple text<value|toc-dots><pageref|toc-4>
    </associate>
  </collection>
</auxiliary>
