home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.text.tex
- Path: sparky!uunet!mcsun!inesc.inesc.pt!thor!njm
- From: njm@thor.inesc.pt (Nuno Joao Mamede)
- Subject: HELP on LaTeX macro
- Message-ID: <1992Nov19.112431.7525@inesc.pt>
- Sender: usenet@inesc.pt (USENET News System)
- Nntp-Posting-Host: thor.inesc.pt
- Organization: INESC - Portugal
- Date: Thu, 19 Nov 1992 11:24:31 GMT
- Lines: 41
-
- Dear hackers,
-
- I would like to use a command in LaTeX with an argument specifying how
- many times other command shoud be executed.
- How can I define such a loop in LaTeX (TeX)?
-
-
- The idea is to substitute a bunch of commands:
-
- \newcommand{\oneline} {\hspace*{0.1cm} \hrulefill\hspace*{0.1cm}
- \vspace*{0.2cm}\\}
- \newcommand{\twolines} {\oneline \oneline}
- \newcommand{\fivelines} {\twolines \twolines}
- \newcommand{\eightlines} {\fivelines \twolines \oneline}
- \newcommand{\tenlines} {\fivelines \fivelines}
-
- by a single one:
-
- \newcommand{\manylines}[1] { ........}
- % the argument specifies how many times the command \oneline is executed.
-
-
- Example:
- \manylines{5} is equivalent to \fivelines
-
-
-
- Thank you,
- Nuno Mamede
-
- --
-
- Nuno J. Mamede INESC - Instituto de Engenharia de
- njm@inesc.pt Sistemas e Computadores
- Tel: +351(1)3100234 Rua Alves Redol 9
- Fax: +351(1)525843 1000 Lisboa / Portugal
- --
- Nuno J. Mamede INESC - Instituto de Engenharia de
- njm@inesc.pt Sistemas e Computadores
- Tel: +351(1)3100234 Rua Alves Redol 9
- Fax: +351(1)525843 1000 Lisboa / Portugal
-