  LinuxDoc+Emacs+Ispell-HOWTO
  : Philippe MARTIN (feloy@wanadoo.fr)
    : Sbastien Blondeel (Sebastien.Blon
  deel@lifl.fr),    Alex Ott
  ott@phtd.tpu.edu.ru

  v0.4, 27  1998

          
    Linux HOWTOs     Linux Documenta
  tion Project.       , 
  Emacs  Ispell.

  ______________________________________________________________________

  Table of Contents


  1. 

     1.1  
     1.2 
     1.3 
     1.4 

  2. 

     2.1 SGML
     2.2  
     2.3 (TT

  3.   

     3.1 From a text document

  4. 

     4.1    
        4.1.1  8- 
        4.1.2  8- 
           4.1.2.1 
           4.1.2.2 
        4.1.3  8-  SGML
     4.2  SGML
     4.3  PSGML
     4.4 
        4.4.1  auto-fill

  5. Ispell

     5.1     
     5.2      
     5.3   
     5.4      
     5.5    

  6. "" 

     6.1   
        6.1.1  
        6.1.2  

  7. 



  ______________________________________________________________________

   ::      , 
  .

  11..  

  11..11..   

    Philippe Martin 1998
  /        GNU
  General Public Licence,  2   .


  11..22..  

    Sbastien Blondeel,   "
  "       Emacs setup.  
            
     .


  11..33..  

       ,    
   .      .
           
    .       , 
          .


  11..44..  

        :

    Sgml-tools  0.99,

    Emacs  19.34,

    Ispell  3.1,

      Emacs      
         Emacs,  iso-sgml,
        XEmacs,  psgml,  
      .



  22..  

  22..11..  SSGGMMLL

  _S_t_a_n_d_a_r_d _G_e_n_e_r_a_l_i_s_e_d _M_a_r_k_-_u_p _L_a_n_g_u_a_g_e,  SSGGMMLL,   
    .

  , -     _______,  
     ,   
   ,       
   ,      
    .

    _D_o_c_u_m_e_n_t _T_y_p_e _D_e_f_i_n_i_t_i_o_n _(_D_T_D_, ___________ ____
  __________).       
  ,        .


       ,  ,     ,
        .   ,   :
      ????  To use the same example again,
  I'm sure that upon reading my idea of a recipe, you recognised yours,
  or your favourite cook's. Nevertheless, they actually look different:
  mine have a picture in the upper left corner of the bathroom cupboard,
  and the ingredients list can be found in the back garden, between the
  swimming pool and the barbecue. Yours?

     , -  
  ,          
  .

  22..22..    LLiinnuuxxDDoocc

      ,    ,
     Linux.

        :   
  ,     ,    . 
     (???  abstract) (    
      ,    
      ),   ,  
  ,        ,   
  .

     , , .     
    ,      
  ,  ,     
    ..

     ,      
     , ,    ,
    ,         ..

  22..33..  SSGGMMLL--TToooollss

  SSGGMMLL--TToooollss      
     .       
   ,   _P_o_s_t_S_c_r_i_p_t.   
       Web,    _H_T_M_L.   
          Windows,  
     _R_T_F,      
   .       
     .


  SGML-Tools    FTP  
  ftp://ftp.lip6.fr/pub/sgml-tools/

  33..    

  33..11..  FFrroomm aa tteexxtt ddooccuummeenntt

         SGML    
   ,     :


  1.       :







       <!doctype linuxdoc system>
       <article>
       <title>Title Goes Here</title>
       <author>
         name of author, author's e-mail, etc.
       </author>
       <date>
        version and date
       </date>





  2.         
     ,      <abstract> 
     </abstract>.


  3.    <toc>,   __________.

  4.          
       :


      <sect> 



     </sect>   .

   ::      ,  
  .


  5.      .     
         <sect1>      </sect1> 
      .

  6.     4    ,
      <sectN>  </sectN>,  N= 2, 3,  4    
      .

  7.       <p>.

  8.      ,   
      <it>  </it> (______), <bf>  </bf> ( ),  <tt>
      </tt> (  ).

  9.     :

               :

              -   
              -   
              -   
              -  




      :




            :
         <itemize>
         <item>  
         <item>  
         <item>  
         <item> 
         </itemize>




  10.
          ,  - ,
         , :


            <verb>
             10 REM Oh my God what's this?
             20 REM I thought this had long disappeared!
             30 PRINT "I am back to";
             40 PRINT "save the world."
             50 INPUT "From whom, do you reckon? ",M$
             60 IF M$="Bill" THEN PRINT "Thou art wise.":GOTO PARADISE
             70 ELSE PRINT "You ain't got a clue...":GOTO RICHMOND
             </verb>




  11.
      ,    SGML  
     .      ,  
         SSGGMMLL--TToooollss,   
          LLiinnuuxxDDoocc.

  44..   EEmmaaccss

  44..11..     

           - 
    ,     
  .     Emacs,  
    .


  44..11..11..   88-- 

    Emacs  8- ,  
        .emacs:

      (standard-display-european 1)
      (load-library "iso-syntax")





     Emacs  ,    8-
  ,      iso-ascii ((load-
  library "iso-ascii")),   Emacs  
     .





  44..11..22..   88-- 

         ,  
      .     ,  
     :


  44..11..22..11..   iissoo--aacccc

   iso-acc  Emacs    8-  
  7- .

         .emacs  :

        (load-library "iso-acc")




  ,   Emacs   ,   
  ,  Meta-x iso-accents-mode.

          _c_a_f_  ''  e. 
  ,       (??? accent),  
        (   
  ).     :



  ` : Grave

  ^ : Circumflex

  " : Dieresis

  ~ : ,  cedilla,     (cf iso-acc.el).

  / :  ,  ..


        ,     
  ,       
  ,   _l_'__l__p_h_a_n_t,  l ' _<_s_p_c_> ' e l ' e ...

          iso-acc.el.


  44..11..22..22..  _<_M_e_t_a_>

       8-   
   _<_M_e_t_a_> ( _<_A_l_t_>). ,  _<_M_e_t_a_>-i   
  .

   Emacs   _<_M_e_t_a_>   , 
     ,      
      .

     :


        (global-set-key "\ei" '(lambda () (interactive) (insert ?\351)))
                           _                                      ___




   ,       .emacs, 
        _<_M_e_t_a_>-i.  
          ,
     ii    335511   (   
    ISO-8859-1).

  !!      
   .


  44..11..33..   88--  SSGGMMLL

   SGML,         
  . ,     &&eeaaccuuttee;;.  
  ,    SGML   8-  
      .    
    .  ,    
  .

   iso-sgml      
    Emacs,       ,  
  8-    SGML-.

   ,  ,      
  Emacs,     ,   8-  
    .

          
      .emacs:


        (setq sgml-mode-hook
        '(lambda () "Defaults for SGML mode."
         (load-library "iso-sgml")))





  44..22..   SSGGMMLL

       ..ssggmmll, Emacs  
   ssggmmll.    ,      
  Meta-x sgml-mode,  ,     
   .emacs:


        (setq auto-mode-alist
        (append '(("\.sgml$"  . sgml-mode))
                  auto-mode-alist))





      ,    8-
  .   Meta-x sgml-name-8bit-mode (  
  _S_G_M_L_/_T_o_g_g_l_e _8_-_b_i_t _i_n_s_e_r_t_i_o_n),      8-
   --  ,    SGML form,    &&......;;.


           SGML, 
   Meta-x sgml-tags-invisible (   _S_G_M_L_/_T_o_g_g_l_e _T_a_g
  _V_i_s_i_b_i_l_i_t_y).


  44..33..   PPSSGGMMLL

   PSGML        SGML 
   Emacs.

   psgml-linuxdoc      
      _L_i_n_u_x_D_o_c.


  44..44..  

  44..44..11..   aauuttoo--ffiillll

    ,       
  ,      _<_R_e_t_u_r_n_>   
   ,        .
      _<_R_e_t_u_r_n_>     ,
         .

         ,  
        .

   aauuttoo--ffiillll    :   
     , (  70-),   
     .

       ,    
   80 :


         (setq sgml-mode-hook
               '(lambda () "Defaults for SGML mode."
                   (auto-fill-mode)
                   (setq fill-column 80)))





  55..  IIssppeellll

         Emacs,  
    IIssppeellll     Emacs.


  55..11..      

     Emacs ,      
   ,    ( 
   ).   ,   , 
   ,    Ispell.   
    .     
  ,  Ispell   ,     
    ,   ,    .


       Ispell    , 
     .ispell-dico-perso   
     ,       
  .emacs file:






         (setq sgml-mode-hook
         '(lambda () "Defauts for SGML mode."
         (setq ispell-personal-dictionary "~/.ispell-dico-perso")
         (ispell-change-dictionary "francais")
         ))





  55..22..       

       ,      
         .   
  ,   ,       (
  ).

      (  Lisp) ,  , 
    ,     
   ,     . (   ,
    !)

  ,     ,    
      (   ).  
     ,   Ispell   
     :


        <!-- Local IspellDict: english -->
        <!-- Local IspellPersDict: ~/emacs/.ispell-english -->





          .emacs,  
      ,     
      ,    .


  55..33..    

     ,    Meta-x ispell-
  buffer.        :


        Ctrl-Spc (mark-set-command),

        ,

      Meta-x ispell-region.


   Emacs  Ispell.  Ispell   ,
     ( )    
  :


    ssppcc   

    ii        ,

    aa       

    AA          

    rr     

    RR       
     ,

    xx  ,      ,

    XX        ,
         ;   
     ,     Meta-x ispell-continue,

    ??   .


   ispell        , 
       ,      .
          .


  55..44..       

   ii        ,  
     AA      

     --   ,  
     ,   Ispell  , 
      .      ,
         ,   
   .

         ,  , 
      ,    
  ,      ( 
  ),     ,     
   (  _L_i_n_u_x),        
    ;      
   ,   ,   , -
         ( 
  ,  Ispell    : `_W_h_e_n _t_h_e
  _g_o_i_n_g _g_e_t_s _t_o_f_, _t_h_e _t_o_f _g_e_t _g_o_i_n_g (-- _T_o_f   
   _C_h_r_i_s_t_o_p_h_e.--)


  55..55..     

  Ispell        .   
    iissppeellll--mmiinnoorr--mmooddee.    
  Meta-x ispell-minor-mode. Ispell  ________ ________ ______,
       ,    .


    _______   (     
  ),         
       Meta-x set-variable RET visible-bell RET t
  RET.          .emacs 
   Emacs :


         (setq visible-bell t)







  66..  """" 

  66..11..    

  Emacs   ___________     
  ( , ,      ..).


   aauuttooiinnsseerrtt   :   
     Emacs,   ,  
    ___________ .


      ___________ ,   
    (LinuxDoc),   ,  , 
  .


          .  
    ,    ,  
      eelliisspp.


  66..11..11..   

      Emacs  auto-insert  
  ,    aauuttooiinnsseerrtt,   
  auto-insert-alist,   .   
       .  ,
        ~/insert/,  
    auto-insert-directory,   
      .


        .emacs   
  ~/emacs/sgml-insert.sgml      SGML:


        (add-hook 'find-file-hooks 'auto-insert)
        (load-library "autoinsert")
        (setq auto-insert-directory "~/emacs/")
        (setq auto-insert-alist
              (append '((sgml-mode .  "sgml-insert.sgml"))
                      auto-insert-alist))





       ~/emacs/sgml-insert.sgml  ,
    ,   Emacs  
  -   ( foobar.sgml). Emacs  
       ,   
   ,    .


  66..11..22..   

       ,   
   auto-insert-alist   ,  
      .    ,
  ,        , 
  ~/emacs/sgml-header.el. (     .emacs
   ,      ):


        (add-hook 'find-file-hooks 'auto-insert)
        (load-library "autoinsert")
        (add-to-list 'load-path "~/emacs")
        (load-library "sgml-header")
        (setq auto-insert-alist
              (append '(((sgml-mode .  "SGML Mode") . insert-sgml-header))
                      auto-insert-alist))





      ``appendix''   insert-sgml-header.



  GG..   iinnsseerrtt--ssggmmll--hheeaaddeerr

         
   Linux Documentation Project  .    
      ,    
  .


      ,  _m_i_n_i_-_b_u_f_f_e_r,
   ,    ,   . not.


     .    ,  
        .   ,
  ,       (  
    ).


       .   ,  
    _R_e_t_u_r_n,     .   
  ,          .


         ,  
  ,         
       .       
  ,     .























  (defun insert-sgml-header ()
    "Inserts the header for a LinuxDoc document"
    (interactive)
    (let (title author email home translator email-translator home-translator date
                starting-point)
      (setq title (read-from-minibuffer "Title: "))
      (if (> (length title) 0)
          (progn
            (setq date (read-from-minibuffer "Date: ")
                  author (read-from-minibuffer "Author: ")
                  email (read-from-minibuffer "Author e-mail: ")
                  home (read-from-minibuffer "Author home page: http://")
                  translator (read-from-minibuffer "Translator: "))
            (insert "<!doctype linuxdoc system>\n<article>\n<title>")
            (insert title)
            (insert "</title>\n<author>\nAuthor: ") (insert author) (insert "<newline>\n")
            (if (> (length email) 0)
                (progn
                  (insert "<htmlurl url=\"mailto:")
                  (insert email) (insert "\" name=\"") (insert email)
                  (insert "\"><newline>\n")))
            (if (> (length home) 0)
                (progn
                  (insert "<htmlurl url=\"http://")
                  (insert home) (insert "\" name=\"") (insert home)
                  (insert "\">\n<newline>")))
            (if (> (length translator) 0)
                (progn
                  (setq email-translator (read-from-minibuffer "Translator e-mail: ")
                        home-translator (read-from-minibuffer "Translator home page: http://"))
                  (insert "Translator : ")
                  (insert translator)
                  (insert "<newline>\n")
                  (if (> (length email-translator) 0)
                      (progn
                        (insert "<htmlurl url=\"mailto:")
                        (insert email-translator) (insert "\" name=\"")
                        (insert email-translator)
                        (insert "\"><newline>\n")))
                  (if (> (length home-translator) 0)
                      (progn
                        (insert "<htmlurl url=\"http://")
                        (insert home-translator) (insert "\" name=\"")
                        (insert home-translator)
                        (insert "\"><newline>\n")))))
            (insert "</author>\n<date>\n")
            (insert date)
            (insert "\n</date>\n\n<abstract>\n")
            (setq point-beginning (point))
            (insert "\n</abstract>\n<toc>\n\n<sect>\n<p>\n\n\n</sect>\n\n</article>\n")
            (goto-char point-beginning)
            ))))














