I am trying to typeset a small document to help me with the creation of archives. I want to create a number of title cards to put on the fronts of the folders, and then, using the same data, make a list of all the folders.
So far, I used the mailmerge package and two separate files --- one for the cards, the other for the list, but since there are sometimes a lot of corrections to be made to the titles, it becomes quite cumbersome. Moreover, some people from other departments, who are not LaTeX-literary, asked me to show them how to use it, so I want to keep it as simple as possible.
I have been trying with the formlett package, because it has an organised structure of the input, but I cannot seem to make it print the table. All I get is the first page of , when it should look like .
Here is the actual code (sorry for the bulkiness):
Code: Select all
\documentclass[a4paper,12pt,draft]{article}
\usepackage[polish]{babel}
\usepackage[OT1,OT4]{fontenc}
\usepackage{xltxtra}
\usepackage{paralist}
\usepackage{tabularx}
%\usepackage{supertabular}
\usepackage{formlett}
\usepackage{longtable}
\usepackage[left=1.5cm,right=1.5cm,top=2cm,bottom=2cm]{geometry}
\setmainfont[Mapping=tex-text]{%
%Times New Roman}
%Gill Sans MT}
Arial}
\sloppy
\pagestyle{plain}
\makeatletter
\renewcommand{\@evenfoot}{\hfill\thepage/\pageref{LastPage}\hfill}
\renewcommand{\@oddfoot}{\@evenfoot}
\makeatother
\newcounter{Numer}
\newcounter{Teczki}
\def\urzad{Urząd Gminy i~Miasta Dobczyce}
\def\referat{Referat Inwestycji, Rolnictwa i~Gospodarki Komunalnej}
\def\tworca{Joanna Mus}
\begin{document}
\beginletter%---------------------------------- This part is responsible for title cards, and it works
\NOPAGENUMBERS\parindent=0pt
{\centering\bf\urzad\\\vspace{3mm}
\centering\referat\\\normalfont}
\vspace{2cm}
{\bf Znak:} \paras[1]\hfill {\bf Kat. akt:} \paras[2]
\vspace{2cm}
%\setlength{\floatsep}{0pt}
{\centering\large\bf \paras[3]\\}
\vspace{15mm}\begin{compactitem}\small
\paras[4]
\end{compactitem}\normalsize
\vfill
\checkparas[2][2]{LET}
\iftrue \ifemptyparas \else
\ifnum \cachedata=1 \else {\centering Tom \paras[1][2]/\paras[2][2]\\} \fi \fi
\vfill
\checkparas[2][3]{LET}
{\centering\large\bf Roczne daty krańcowe akt: od \paras[1][3] do \iftrue \ifemptyparas \paras[1][3] \else \paras[2][3] \fi\\}
\vfill
{\large\bf Sygnatura akt:} %\rule{5cm}{0.1pt}
\vspace{3cm}\null
\newpage
\endletter%---------------------------------- End of title cards
\parindent=0pt\footnotesize
\textbf{\urzad\\
\referat}
\vspace{5mm}
\textbf{\centering Spis zdawczo-odbiorczy akt nr\rule{2cm}{0.1pt}\\}
\vspace{5mm}\scriptsize
\newcolumntype{C}{>{\centering}p{1cm}}%
\begin{longtable}{|r|c|m{5cm}|C|C|C|m{1.5cm}|m{1.5cm}|}\hline
\centering\textbf{LP} &\textbf{Znak teczki} &\centering\textbf{Tytuł teczki/tomu} &\textbf{Daty skrajne} &\textbf{Kate\-goria akt} &\textbf{Liczba teczek} &\centering\textbf{Miejsce przechowywania akt w~składnicy} &\centering\textbf{Data zniszczenia lub przekazania do~arch. państwowego}\\\tabularnewline\hline%\endhead
\beginletter%---------------------------------- The problem lies somewhere from here...
\stepcounter{Numer}\arabic{Numer} &\paras[1] &\textbf{\paras[3]}\par\begin{compactitem}\paras[4]\end{compactitem} &\paras[1][3] \checkparas[2][3]{LET}\iftrue \ifemptyparas \paras[1][3] \else \paras[2][3] \fi &\paras[2] &\checkparas[2][2]{LET}\iftrue \ifemptyparas 1\stepcounter{Teczki} \else \cachedata\addtocounter{Teczki}{\cachedata} \fi &&\tabularnewline\hline
\endletter%---------------------------------- ... to here.
\end{longtable}
\vspace{1cm}\noindent\footnotesize
Spis zakończono na pozycji \arabic{Numer}.\\
Ilość teczek w~spisie: \arabic{Teczki}.\\
Sporządził: \tworca.\\
Dobczyce, \today
\vspace{1cm}\noindent\normalsize
\null\hfill Przekazujący:\label{LastPage}\hspace{8cm} Przyjmujący:\hfill\null
\newpage
\beginpilemode
%Znak;Kategoria;Tytuł;
% Treść
%+Tom;Ilość tomów+Data początkowa;Data końcowa!
IRGK.V.6140/--/2002;B5;Lasy komunalne;
\item Korespondencja w~sprawie wycięcia drzew
\item Wnioski o~wydanie świadectwa świadectwa legalności pozyskania drewna i~wydane świadectwa
+1;2+2002;!
IRGK.IV.6210/--/2002;B5;Pozwolenia wodno-prawne;
\item Decyzje w~sprawie wydania pozwolenia na pobór wody ze studni wierconych
\item Zawiadomienie o~wszczęciu postępowania administracyjnego o~wydanie pozwolenia na pobór wody podziemnej i~jej zrzut
+1;+2002;!
\endpilemode
\end{document}