[OS X TeX] Staggering

Jeffrey J Weimer weimerj at email.uah.edu
Wed Mar 7 00:28:44 CET 2007


On Mar 6, 2007, at 2:40 PM, Alain Schremmer wrote:

> Is there a more elegant way, both in source and in output, to typeset

Ooops! Spoke too soon. Here's the correction ...

\usepackage{forloop,calc}
\newcounter{myc}
\newcounter{ic}
\newlength{\mlen}
\newcommand{\brmultiply}[3]{%
	\setcounter{myc}{#1}%
	\begin{center}%
	\forloop{ic}{#1}{\value{myc}<#3}{%	
		\hspace{\mlen}$\underbrace{\themyc\times#2}$ \\%
		\setcounter{myc}{#2*\value{myc}}%
		\addtolength{\mlen}{20pt}}%
	\addtolength{\mlen}{-20pt}%
	\hspace{\mlen}#3\end{center}%
	}

Also, the \begin{center}...\end{center} coding does not quite follow  
your centering. Your coding has the last value centered on the page,  
and numbers above are offset to the left. The above centers the  
answer based on the first line, and numbers are offset to the right  
thereafter. I'd have to think a bit about where and how to put the  
setlength and addtolength commands in the forloop structure to  
accomplish your result. Perhaps someone else here will see the answer.

--
J. J. Weimer, Chemistry / Chemical & Materials Engineering
University of Alabama in Huntsville, MSB 125, 301 Sparkman Dr
Huntsville, AL 35899                phone: 256-824-6954



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list