[pstricks] Enumerate lists inside "tables"?

Michael Sharpe msharpe at ucsd.edu
Fri Jun 17 02:16:00 CEST 2011


On Jun 15, 2011, at 7:27 PM, Hubert Lam wrote:

> Hi all
>  
> I’m pretty sure it’s been asked to death – are there any packages that assist with enumerated lists inside tables?
>  
> I want to typeset some syllabus/program documents, and at the same time, from that source, modify the document to have tickboxes for each dot point/enumerated item for other teachers to tick off.
>  
> Document for teachers:
>  
> <image001.png>
>  
> The version of this document which I would like to have tickboxes (currently typed up in Word using whole stack of tables etc.)
>  
> Can anyone suggest where to start? I’m completely stumped at how LaTeX is far more difficult than Word in this regard – and I would consider myself an “experienced” user of 8 years.
>  
> (I post this to the PSTricks forum so that someone might be able to help with drawing a quasi table using psline or something like that)
>  
> Thanks
>  
> Hubert

This should not be considered as a serious answer except perhaps for the \tickbox macro, as you can accomplish what you want with an ordinary table, as others have pointed out. However, as you asked on the pstricks list, you should not be surprised to get a pstricks solution. It uses the new pst-layout package, which is useful only for one-page quasi-tabular layouts.

Michael

%&latex 
\documentclass[dvips,10pt]{article} 
\usepackage[margin=1in]{geometry}
\usepackage[dvipsnames]{pstricks} 
\usepackage{pst-layout} 
\pagestyle{empty}
\def\tickbox{\leaders\hbox to 1em{\hss.\hss}\hfill\fbox{\phantom{M}}\hbox to.5in{}}
\setlength\parindent{0pt} 
\begin{document} 
% C-1, C-2, R0 are predefined---do not change 
\NumPoints=8 % ignore higher indices 
\PointName(1)={TR}\PointPos(1)={PSPtr}%TR is another name for top right corner
\PointName(2)={R1}\PointPos(2)={(R0)-(0,.25)}% .25cm down from top left 
\PointName(3)={C1}\PointPos(3)={PSPtl}% left edge
% vertical division line positions
\PointName(4)={C2}\PointPos(4)={(PSPtl)+(.75,0)}% left edge + .75in
\PointName(5)={C3}\PointPos(5)={(PSPtl)+(1.75,0)}% left edge + 1.75in
\PointName(6)={C4}\PointPos(6)={(PSPtl)+(4.75,0)}% left edge + 4.75in
\PointName(7)={C5}\PointPos(7)={(PSPtl)+(.2,0)}% left edge + 1.75in
\PointName(8)={R2}\PointPos(8)={(PSPtl)-(0,.42)}% top left, downin

\def\MaxR{2}% 2 additional row nodes
\def\MaxC{5}% 4 additional column positions will be defined 
% can refer to point R1C4, for example
\NumFragments=5 % 
\Frag(1)={\textbf{Year 8}}\FragRefPt(1)={Bl}%Baseline, left
\FragPos(1)={(R1C1)+(.1,0)} 
\Frag(2)={\textbf{Topic 2}}\FragRefPt(2)={Bl}%Baseline, left
\FragPos(2)={(R1C2)+(.1,0)} 
\Frag(3)={\textbf{Percentages, Calculator and Indices}}\FragRefPt(3)={Bl}%Baseline, left
\FragPos(3)={(R1C3)+(.1,0)} 
\Frag(4)={\textbf{Time: 5--7 periods}}\FragRefPt(4)={Bl}%Baseline, left
\FragPos(4)={(R1C4)+(.1,0)} 
\Frag(5)={\begin{minipage}{\textwidth}
\hspace*{.1in}
\textbf{Syllabus Outcome: NS4.3, NS5.1.1}
\begin{itemize}
  \item \strut oh\tickbox
  \item \strut no\tickbox
\end{itemize}
\hrule
\begin{enumerate}
  \item \strut oh\tickbox
  \item \strut no\tickbox
\end{enumerate}
\pnode(0,0){BL}% place node at left edge to indicate bottom of box
\end{minipage}}
\FragRefPt(5)={tl}%Baseline, left
\FragPos(5)={(R2C0)-(0,.1)} 

\psset{unit=1in,picwidth=\textwidth,picheight=\textheight} 
\begin{pslayout} 
\psframe(PSPtr)(R0 | BL)
\psline(R2)(PSPtr | R2)
\psline(C2)(R2C2)
\psline(C3)(R2C3)
\psline(C4)(R2C4)
\end{pslayout}

\end{document}




More information about the PSTricks mailing list