Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need advice for generating large PDF output from HTML
#6
I presently have a LaTeX document which has a chapter consisting of 10+ pages of tabular information. To avoid problems with page breaking, I formatted the column entries in a nontraditional way. I created a poor man's table with fixed-width column entries and a fixed separation between columns. Since you are producing the LaTeX code from a script, it should be no trouble to implement a scheme like this should you decide to.

Each line in the "table" goes like this.
\noindent{\makebox[\mycolwidth][l]{text in col 1}\hspace{\colseparation}\makebox[\mycolwidth][l]{text in col 2}\hspace{\mycolwidth} ...}

with repeated use of \makebox[\mycolwidth][l]{...} to print the column's contents and \hspace{\colseparation} to force a specific space between the columns.

At the end of each line I have
\par\vspace{0.25\baselineskip}

There is one column entry that can span multiple lines. For that one I use
\parbox[t]{\myparboxwidth}{Text in a multi-line paragraph.}
instead of \makebox


At the beginning define
\newlength{\mycolwidth}
\settowidth{\mycolwidth}{The longest column contents you actually have}
\newlength{\colseparation}
\setlength{\colseparation}{0.5em} % or whatever horizontal separation you want
\newlength{\myparboxwidth}
\setlength{\myparboxwidth}{1.55in}

I use the same width columns for most of my table. If you have different widths, define \mycolwidth1, \mycolwidth2, and so on as needed.

There is no need to define a floating environment. The formatting is insensitive to extra blank lines between these single, long lines for each row.


The \begin{tabbing} \end{tabbing} environment may work just fine and be simpler though. It is supposed to work well over page breaks.
Reply


Messages In This Thread
Re: Need advice for generating large PDF output from HTML - by TheTominator - 01-26-2008, 08:16 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)