0

I have been experimenting with textpos to understand some of the nitty gritty

So for each new page the text has to be nested within a \newpage command, am I correct?

If I am right this would become quite cumbersome after some time

Is there a better way to create an environment or new command so that the new boxes can be created faster?

In case if I want to add a box in between at a later date will the other boxes readjust or will I have to manually move each and reposition--cumbersome?

\documentclass{article}
\usepackage{lipsum}
\usepackage{afterpage}
\usepackage[showboxes,absolute]{textpos}
\usepackage[step=1cm,arrows=false,firstcolor=blue,secondcolor=red]{pagegrid}

\begin{document}
\afterpage{\newpage
\begin{textblock*}{3cm}(2cm,2cm)
  \raggedright
  AON for CHT
  \end{textblock*}
\begin{textblock*}{3cm}(3cm,2.5cm)
  \raggedright
  11 Nov 2019
\end{textblock*}
\begin{textblock*}{3cm}(2cm,3cm)
  \raggedright
  AON for DEO
\end{textblock*}
\null
\newpage}

\afterpage{\newpage
\setlength{\TPHorizModule}{30mm}
 \setlength{\TPVertModule}{\TPHorizModule}
 \textblockorigin{10mm}{10mm} % start everything near the top-left corner
 \setlength{\parindent}{0pt}
 \begin{textblock}{3}(0,0)
 This block is 3 modules wide,  and is placed with its top left corner
 at the ‘origin’ on the page. Note that the length of the block is not
 specified in the arguments -- the box will be as long as necessary to
 accomodate the text inside it. You need to examine the output of the
 text to adjust the positioning of the blocks on the page.
 \end{textblock}

 \begin{textblock}{2}(2,1)
 \textblocklabel{block two}
 Here is another, slightly narrower, block, at position (2,1) on the page.
 \end{textblock}

 \begin{textblock}{3}[0.5,0.5](2,3)
 This block is at position (2,3), but because the optional argument
 [0.5,0.5] has been given, it is the centre of the block which is
 located at that point, rather than the top-left corner.
 \end{textblock}
\null
\newpage}

 \end{document}

The desired output

enter image description here

The output should off course scroll over to the next page automatically or will I have to split the page manually?

I think this package has been made for working optimally on a single page only--is that true?

EDIT: The object is to have the subject in the first column then the date under it thereafter the second column shows the description related to the main subject of the the first column and after that in the last column is the name of the staff to whom the work is assigned

js bibra
  • 21,280
  • 1
    Why are you putting everything in place with textpos? That seems a strange design choice indeed. It would drive me nuts. – cfr Nov 17 '19 at 05:06
  • Textpos is indeed intended to support placement a page at a time. Also, in absolute mode, \newpage won't work unless there's some non-textblock content on the page (see the manual for discussion). As @cfr says, it's a little unclear what your core question is. – Norman Gray Nov 17 '19 at 13:03
  • Please see EDIT above – js bibra Nov 17 '19 at 13:27
  • Since you write about columns in your question, why not use a table/tabular? – leandriis Nov 17 '19 at 13:33
  • which is better--table minipage parbox mbox – js bibra Nov 17 '19 at 13:34
  • If (noting your edit) the goal is to create a multi-page tabular layout, then (a) the longtable package might be of interest. And (b) note that textpos not in absolute mode places boxes relative to the current position, so that a combination of textblock, textblock, ..., \hbox to 0pt{}\vskip Xpt, ...and repeat (ie, placing some textblocks, then skipping to the next location down), might get close to what you want, and will naturally page-break. – Norman Gray Nov 17 '19 at 13:41
  • 1
    Sounds like a tabular would be best, as @leandriis suggests. (A table isn't suitable here, but longtable, perhaps with multirow might be. Or makecell, possibly. These aren't necessarily mutually exclusive.) flowfram is another possibility, but I don't see why a tabular isn't enough. It sounds pretty straightforward to be honest, what you need. – cfr Nov 17 '19 at 23:31

0 Answers0