[pstricks] Need Advice on \multido

Rich Shepard rshepard at appl-ecosys.com
Thu Jun 30 02:04:00 CEST 2005


   I've read the multido doc and I understand the concepts in there. However,
I'm having difficulty applying what I understand to my developing form. The
code is below.

   What I want to do is print \psovalbox a specified number of times across
the page width, and repeat that for a specified number of lines. Above the
boxes I'll want a row of text that explains the value of each oval, and on
the left side I'll want a row number (to correspond to each question number).

   The first \psovalbox in the code is there because that's what I used to get
an open oval to print; it will be removed once I really understand what I'm
doing. Adding the \multido line causes an empty display when I try to view
the PostScript in LyX. I tried adding a dimension and space to the command
(\multido{\d=7mm,7mm}{10}{stuff}) but that still results in an empty file.

Pointers greatly appreciated,

Rich

-- 
Dr. Richard B. Shepard, President
Applied Ecosystem Services, Inc. (TM)
<http://www.appl-ecosys.com>   Voice: 503-667-4517   Fax: 503-667-8863
===========================================================================
%% LyX 1.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[letterpaper,twoside,english]{article}
\usepackage{palatino}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\pagestyle{empty}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\date{}
\usepackage{pstricks, multido, graphicx}
\setlength{\textwidth}{7in}
\setlength{\textheight}{9in}
\setlength{\oddsidemargin}{-5mm}
\setlength{\evensidemargin}{-5mm}
\setlength{\topmargin}{-5mm}
\setlength{\headheight}{0pt}
\setlength{\headsep}{0pt}
\setlength{\footskip}{0pt}
\setlength{\parindent}{0pt}
\newlength{\omrx}
\setlength{\omrx}{1.6em}
\newcommand{\omrbox}{\makebox[\omrx]{%
    \psovalbox[boxsep=false, linecolor=black]{\rule{0.35em}{0pt}}}}
\newcommand{\row}[2]{\raisebox{0.75ex}{\multido{}{#1}{#2}}}
%% identifying information
\newcommand{\infoline}{some text for project ID here}
%% number of questions (rows)
\newcommand{\nR}{10}
%% number of choices (columns)
\newcommand{\nC}{5}
%% project name
\newcommand{\headlabel}{EIS Project Name}
%%\newcommand{\footlabel}{Paper 80/21 June 2001}
\newlength{\thick}
\newlength{\thin}
\newlength{\antibleed}
\newlength{\bheight}
\setlength{\thick}{1.2mm}
\setlength{\thin}{0.6mm}
\setlength{\antibleed}{0.02mm}
\setlength{\bheight}{8mm}
\addtolength{\thick}{-\antibleed}
\addtolength{\thin}{-\antibleed}
\newcommand{\s}{\hspace{\thin}\hspace{\antibleed}}
\renewcommand{\S}{\hspace{\thick}\hspace{\antibleed}}
\renewcommand{\b}{\rule{\thin}{\bheight}}
\newcommand{\B}{\rule{\thick}{\bheight}}

\usepackage{babel}
\makeatother
\begin{document}
{
\sffamily
\makebox[\textwidth][s]{% Place box across whole page.
\raisebox{6mm}[0pt][0pt]{\infoline}
\includegraphics[scale=0.5]{aesi-logo.eps}}
\begin{pspicture}(0,0)
   \makebox[7mm]{\psovalbox[boxsep=false,linecolor=blue]{\rule{0.35em}{0pt}}}
\end{pspicture}
\begin{pspicture}(0,0)
   \multido{}{10}{\makebox[7mm]{psovalbox[linecolor=blue]{%
   \rule{0.35em}{0pt}}
\end{pspicture}
}
\end{document}




More information about the PSTricks mailing list