home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / text / tex / 13313 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.7 KB  |  53 lines

  1. Newsgroups: comp.text.tex
  2. Path: sparky!uunet!mcsun!inesc.inesc.pt!thor!njm
  3. From: njm@thor.inesc.pt (Nuno Joao Mamede)
  4. Subject: HELP on LaTeX macro
  5. Message-ID: <1992Nov19.112431.7525@inesc.pt>
  6. Sender: usenet@inesc.pt (USENET News System)
  7. Nntp-Posting-Host: thor.inesc.pt
  8. Organization: INESC - Portugal
  9. Date: Thu, 19 Nov 1992 11:24:31 GMT
  10. Lines: 41
  11.  
  12. Dear hackers,
  13.  
  14. I would like to use a command in LaTeX with an argument specifying how
  15. many times other command shoud be executed.
  16. How can I define such a loop in LaTeX (TeX)?
  17.  
  18.  
  19. The idea is to substitute a bunch of commands: 
  20.  
  21.      \newcommand{\oneline}    {\hspace*{0.1cm} \hrulefill\hspace*{0.1cm}
  22.                                                      \vspace*{0.2cm}\\}
  23.      \newcommand{\twolines}   {\oneline \oneline}
  24.      \newcommand{\fivelines}  {\twolines \twolines}
  25.      \newcommand{\eightlines} {\fivelines \twolines \oneline}
  26.      \newcommand{\tenlines}   {\fivelines \fivelines}
  27.  
  28.   by a single one:
  29.  
  30.      \newcommand{\manylines}[1] {  ........}
  31.      % the argument specifies how many times the command \oneline is executed.
  32.  
  33.  
  34. Example:
  35.              \manylines{5}  is equivalent to \fivelines
  36.  
  37.  
  38.  
  39. Thank you,
  40. Nuno Mamede
  41.  
  42. --
  43.  
  44. Nuno J. Mamede                         INESC - Instituto de Engenharia de
  45. njm@inesc.pt                                   Sistemas e Computadores
  46. Tel: +351(1)3100234                    Rua Alves Redol 9
  47. Fax: +351(1)525843                     1000 Lisboa / Portugal
  48. -- 
  49. Nuno J. Mamede                         INESC - Instituto de Engenharia de
  50. njm@inesc.pt                                   Sistemas e Computadores
  51. Tel: +351(1)3100234                    Rua Alves Redol 9
  52. Fax: +351(1)525843                     1000 Lisboa / Portugal
  53.