[texhax] Documents with multi-line headers, and mostly a multi-page table contents

Gordon Haverland ghaverla at materialisations.com
Sun Apr 10 03:54:07 CEST 2011


I've played with TeX and LaTeX a long time (1985?), never had a 
need to ask a question.  Hopefully someone can help.

I'm trying to generate "reports" out of a database, and nominally 
I will have a Perl program read the database and write LaTeX 
source, which will get processed by pdflatex to produce PDFs.

The original reports consist of a header on each page, and the 
body of the document almost entirely consists of a multipage 
table.  The document ends with a Notes section (which is either a 
list or a table).

The header varies from report to report, the one I am playing with 
has a header that is 14 lines long.  Which is not quite what 
fancyhdr seems to be comfortable with.

The header looks like a bunch of stacked rectangles.  The upper-
left rectangle will eventually contain a SVG letterhead.  Running 
pdflatex multiple times produces the body table being about the 
width of the header, but not exactly.

 1) The upper-right rectangle should have the text near the right 
border.  I can force this by inserting a hspace, but I think I 
don't need to.  I don't understand why 'r' justification doesn't 
place the text at the right.
 1a) When I first started playing with this, the LastPage 
reference worked.  Now it doesn't work (I just get ?? for 
 2) The 3rd line contains 3 rectangular areas.  The right most 
rectangle has the same problem as the first line.
 3) The middle rectangle is supposed to be centered.
 4) The left rectangle has always started some distance below the 
line that defines the box for the table.  I've never had tables do 
this before, but I would like the content to start at the top of 
the space, and not 1 or 2 lines down.
 5) Running pdflatex multiple times, the hyperref link from a note 
in the header (which will be on every page) doesn't resolve.
 6) Quirk: it would be nice to have the same border width for the 
double lines around the header box.

A couple of "minimal" files are below.

Thanks for any suggestions.







      EngineeringLetterhead & {
              {\large{\bf A}} \\
              Rev. 3 \\
              \hfill January, 2009 \\
              \thepage~of~\pageref{LastPage} \\
          } \\

    \begin{tabularx}{\msinnerbox}{|X|} \hline
        {\large{\bf Piping Material Specification}}

    \begin{tabularx}{\msinnerbox}{|X|r|r|} \hline
      {\bf Some title\newline}
      Some really long content that just goes on forever.  But
      what is it really?  I don't know. \vfill
          & {
              \multicolumn{5}{c}{\bf Pressure Limits} \\
              1965       & kPa      & @ &       -29 & 
\textdegree{C} \\
              {\sl 280} & {\sl psi} & @ & {\sl -20} & {\sl 
\textdegree{F}} \\
              1172       & kPa      & @ &       260 & 
\textdegree{C} \\
              {\sl 170} & {\sl psi} & @ & {\sl 500} & {\sl 
\textdegree{F}} \\
          } & {
                  {\bf B31.3 Piping} \\
                  Class \\
                  {\bf 150} \\
          } \\
      Note: 1\ref{n:1} & & \\

    \begin{tabularx}{\msinnerbox}{|X|X|X|} \hline
      CA: 1.6mm ({\sl 0.0625in\/}) &
        PWHT: Code &
          Tubing Class: CLC \\
      Radiography: 10\% &
        Material Group: 1.1 &
          Branch Table: 1 \\







\begin{tabularx}{\msinnerbox}{X} \hline
 {\label{n:1}1: This is note 1.} \\
 {\label{n:2}2: This is note 2.} \\

  \caption*{Valves: ASME B16.5, B16.10} \\
  \hline % \toprule
  Type & NPS (in) & Rating & Joint & Material & Tag & Notes \\
  \hline % \midrule
  % \cmidrule{7-7}

  \hline % \bottomrule

  {\bf Gate Valve} \\
  API 602 & 0.5 to 1.5 & 150 Class & RF & A105-N, TR 8, bolted 
bonnet, OS\&Y, solid wedge & GABCD0 & 2\ref{n:2} \\
          & 2 to 12    & 150 Class & RF & A216-WCB, TR 8, welded 
bonnet, OS\&Y, flexible wedge & FEDK3 & \\
          & 14 to 24   & 150 Class & SW & A216-WCB, TR 8, welded 
bonnet, OS\&Y, flexible wedge, gear oper. & ABCD5 & \\

More information about the texhax mailing list