[pstricks] Nested \multido{}

Herbert Voss LaTeX at zedat.fu-berlin.de
Wed Jul 6 08:16:58 CEST 2005


Rich Shepard wrote:
> On Tue, 5 Jul 2005, Herbert Voss wrote:
> 
>> \multido{}{9}{\makebox[7mm]{\psovalbox[linecolor=blue]{\rule{0.35em}{0pt}}}}\\[2mm]} 
>>
> 
>   This line is not working as intended.

then I do not understand, what you really want ...
Attached what I get with

\hspace*{1.2\omrx}\multido{\nColumn=1+1}{\nC}{\makebox[\omrx]{\nColumn}}

%% Make nR rows of 9 ovals for answers
\psset{linecolor=blue}
\def\xstrut{\rule{0.35em}{0pt}}
\multido{\nRow=1+1}{\nR}{%
    \makebox[\omrx]{\nRow}
    \multido{}{9}{\makebox[7mm]{\psovalbox{\xstrut}}}\\[2mm]
}

however, there is no real need to use PSTricks here,
scaling the letter o does the same, see second attached
png file. The source follows

Herbert


\documentclass{article}
\usepackage{palatino}
\usepackage{multido,graphicx,xcolor}
\parindent=0pt
\newlength{\omrx}
\setlength{\omrx}{7mm}
%% number of questions (rows)
\newcommand{\nR}{20}
%% number of choices (columns)
\newcommand{\nC}{9}

\def\OLeft{\scalebox{1.2}[0.6]{\color{blue}\huge O}}

\begin{document}
\sffamily
\makebox[\nC\omrx]{PREFER FIRST}

%% Put headings on columns
\hspace*{1.2\omrx}\multido{\nColumn=1+1}{\nC}{\makebox[\omrx]{\nColumn}}

%% Make nR rows of 9 ovals for answers
\multido{\nRow=1+1}{\nR}{%
   \makebox[\omrx]{\nRow}
   \multido{}{9}{\makebox[7mm]{\OLeft}}\\[2mm]
}
\end{document}


-------------- next part --------------
A non-text attachment was scrubbed...
Name: rich.png
Type: image/png
Size: 5833 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20050706/1d2292c6/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rich2.png
Type: image/png
Size: 11742 bytes
Desc: not available
Url : http://tug.org/pipermail/pstricks/attachments/20050706/1d2292c6/attachment-0001.png 


More information about the PSTricks mailing list