Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Which package allows for tabular data over columns and pages?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Justin C  
View profile  
 More options Oct 11 2012, 12:08 pm
Newsgroups: comp.text.tex
From: Justin C <justin.1...@purestblue.com>
Date: Thu, 11 Oct 2012 16:50:32 +0100
Local: Thurs, Oct 11 2012 11:50 am
Subject: Which package allows for tabular data over columns and pages?

I'm trying to create a price-list, the data does not
require much space, I can (in a word processor) fit
two columns to a page. The data needs to be in a
tabular format and the tables need to flow down one
column, down the next and onto the next page. One
section, using a word processor, currently runs to
eight sides of A4. I'm trying to find a package that
can handle tabular across columns and pages.

I've been looking at tabular, supertabular,
longtable, ltxtable (which looks like beta, and
doesn't appear to have been touched since 1995).

I'm not having a lot of luck.

We require our tabular data to be in a visible grid
(description and price with an empty 'cell' into
which a quantity can be written so that it can be
used as an order form):

----------------------------------
|Qty|Description           |Price|
----------------------------------
|   |Blue suede shoes      |27.00|
----------------------------------
|   |Banana (bruised)      | 0.23|
----------------------------------
|   |Cheese (stinky 200g)  | 3.34|
----------------------------------

If you can't think of a suitable package, can you
think of an alternative way to proceed?

Thank you for any help you can give.

   Justin.

--
Justin C, by the sea.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carson Chittom  
View profile  
 More options Oct 11 2012, 1:33 pm
Newsgroups: comp.text.tex
From: Carson Chittom <car...@wistly.net>
Date: Thu, 11 Oct 2012 12:31:24 -0500
Local: Thurs, Oct 11 2012 1:31 pm
Subject: Re: Which package allows for tabular data over columns and pages?

Justin C <justin.1...@purestblue.com> writes:
> I'm trying to create a price-list, the data does not
> require much space, I can (in a word processor) fit
> two columns to a page. The data needs to be in a
> tabular format and the tables need to flow down one
> column, down the next and onto the next page. One
> section, using a word processor, currently runs to
> eight sides of A4. I'm trying to find a package that
> can handle tabular across columns and pages.

> I've been looking at tabular, supertabular,
> longtable, ltxtable (which looks like beta, and
> doesn't appear to have been touched since 1995

I am the farthest thing from an expert you could find, but I do notice
that you haven't mentioned the multicol package.  Maybe worth a shot?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Luecking  
View profile  
 More options Oct 11 2012, 3:03 pm
Newsgroups: comp.text.tex
From: Dan Luecking <LookIn...@uark.edu>
Date: Thu, 11 Oct 2012 14:01:26 -0500
Local: Thurs, Oct 11 2012 3:01 pm
Subject: Re: Which package allows for tabular data over columns and pages?
On Thu, 11 Oct 2012 16:50:32 +0100, Justin C

This works for me:

\documentclass[a4paper,twocolumn]{article}
\usepackage{array}
\usepackage{supertabular}
\begin{document}

\tablehead{%
  \hline
  Qty&Description           &Price\\%

}

\tabletail{\hline}
\tablelasttail{}
%
\begin{supertabular}{|c|l|r|}
\hline
     &Blue suede shoes      &27.00\\
\hline
     &Banana (bruised)      & 0.23\\
\hline
     &Cheese (stinky 200g)  & 3.34\\
\hline
%.
%.
%.
% for a total of 132 lines
\end{supertabular}                            

Dan
To reply by email, change LookInSig to luecking


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Enrico Gregorio  
View profile  
 More options Oct 11 2012, 4:33 pm
Newsgroups: comp.text.tex
From: Enrico Gregorio <Facile.da.trov...@in.rete.it>
Date: Thu, 11 Oct 2012 22:33:33 +0200
Local: Thurs, Oct 11 2012 4:33 pm
Subject: Re: Which package allows for tabular data over columns and pages?

\usepackage{longtable}
...
\begin{longtable}{|c|l|r|}
\hline
Qty & Description & Price \\
\hline
\endhead
& Blue suede shoes & 27.00 \\
\hline
& Banana (bruised) & 0.23 \\
\hline
& Cheese (stinky 200g) & 3.34 \\
\hline
...
\end{longtable}

Ciao
Enrico


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Flynn  
View profile  
 More options Oct 11 2012, 7:15 pm
Newsgroups: comp.text.tex
From: Peter Flynn <pe...@silmaril.ie>
Date: Fri, 12 Oct 2012 00:15:17 +0100
Local: Thurs, Oct 11 2012 7:15 pm
Subject: Re: Which package allows for tabular data over columns and pages?
On 11/10/12 16:50, Justin C wrote:

Many years ago, Barbara Beeton gave me the most valuable piece of advice
I have ever had about TeX: when possible, let paragraph-mode do it for you.

Repeated blocks in this format over many pages are sometimes best done
as boxes.

///Peter

\documentclass{article}
\usepackage{multicol,array,calc}
\newlength{\shoulder}
\newlength{\rulesize}
\newlength{\qty}
\newlength{\price}
\newlength{\desc}
\newenvironment{pricelist}[1][99.00]{%
  \begin{multicols*}{2}%
  \setlength{\shoulder}{\fboxsep}%
  \setlength{\rulesize}{\fboxrule}%
  \settowidth{\qty}{Qty}\addtolength{\qty}{2\shoulder}%
  \settowidth{\price}{#1}\addtolength{\price}{2\shoulder}%
  \setlength{\desc}{\columnwidth - \qty - \price - 4\rulesize}%
  \parindent0pt
  \offinterlineskip
  \raggedright

}{%

  \par\hrule height\rulesize\end{multicols*}%
}

\def\strut{\vrule height1.1em depth.666ex width0pt}
\makeatletter
\newcommand{\entry}[3][\relax]{%
  \vbox{%
    \hrule height\rulesize
    \hbox to\columnwidth{%
      \vrule width\rulesize
      \hbox to\qty{\hfil#1\hfil}%
      \vrule width\rulesize
      \hbox to\desc{\hspace{\shoulder}%
        \vbox{\hsize\desc\advance\hsize by-2\shoulder
              \fontsize{\f@size}{\f@size}\selectfont
              \raggedright\strut#2\strut\par}%
        \hfil}%
      \vrule width\rulesize
      \hbox to\price{\hfil#3\hspace{\shoulder}}%
      \vrule width\rulesize
    }%
  }\ignorespaces
}

\makeatother
\newcommand{\heading}[3]{%
  \entry[\textbf{#1}]{\textbf{#2}}{\textbf{#3}}%
}

\begin{document}
\section*{Price List}
\fboxsep6pt
\fboxrule1pt
\raggedcolumns
\begin{pricelist}[\textbf{Price}]
  \heading{Qty}{Description}{Price}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
\hrule height\rulesize\columnbreak
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
  \entry{Banana (bruised)}{0.23}
  \entry{Cheese (stinky 200g)}{3.34}
  \entry{Blue suede shoes}{27.00}
\end{pricelist}
\end{document}

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oleg Paraschenko  
View profile  
 More options Oct 12 2012, 2:11 am
Newsgroups: comp.text.tex
From: Oleg Paraschenko <ole...@gmail.com>
Date: Thu, 11 Oct 2012 23:11:37 -0700 (PDT)
Local: Fri, Oct 12 2012 2:11 am
Subject: Re: Which package allows for tabular data over columns and pages?
Hello,

On Thursday, October 11, 2012 6:08:02 PM UTC+2, Justin C wrote:

...

> If you can't think of a suitable package,

I suggest the package cals.

http://www.ctan.org/tex-archive/macros/latex/contrib/cals
http://mirrors.ctan.org/macros/latex/contrib/cals/examples/demo.pdf

> --

> Justin C, by the sea.

--
Oleg Parashchenko  olpa@ http://uucode.com/
http://uucode.com/blog/  XML, TeX, Python, Mac, Chess

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin C  
View profile  
 More options Oct 12 2012, 7:08 am
Newsgroups: comp.text.tex
From: Justin C <justin.1...@purestblue.com>
Date: Fri, 12 Oct 2012 11:53:19 +0100
Local: Fri, Oct 12 2012 6:53 am
Subject: Re: Which package allows for tabular data over columns and pages?
On 2012-10-11, Justin C <justin.1...@purestblue.com> wrote:

> I'm trying to create a price-list, ... written so that it can be
> used as an order form):

> ----------------------------------
>|Qty|Description           |Price|
> ----------------------------------
>|   |Blue suede shoes      |27.00|
> ----------------------------------
>|   |Banana (bruised)      | 0.23|
> ----------------------------------
>|   |Cheese (stinky 200g)  | 3.34|
> ----------------------------------

[snip]

Thank you all for such a quick response. I shall investigate all
suggestions and report back.

Thinking back, I was trying to run before I could walk. I was
specifying too many parameters in the document to begin with
(fonts, print area/size) rather than getting to the meat and
getting the tables across columns and pages. I'll go back to
the root problem and then, when that works, look at the 'look'
of the document.

Thanks again, I'm sure I shan't be gone for long!

   Justin.

--
Justin C, by the sea.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin C  
View profile  
 More options Oct 16 2012, 7:13 am
Newsgroups: comp.text.tex
From: Justin C <justin.1...@purestblue.com>
Date: Tue, 16 Oct 2012 12:13:32 +0100
Local: Tues, Oct 16 2012 7:13 am
Subject: Re: Which package allows for tabular data over columns and pages?
On 2012-10-11, Carson Chittom <car...@wistly.net> wrote:

While this may work (I've not looked very far into it), the work
involved in creating the layout I want looks like a lot more than
with other packages suggested.

I'll keep this one on the back-burner should I hit an insumountable
problem elsewhere.

Thank you for the suggestion.

   Justin.

--
Justin C, by the sea.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin C  
View profile  
 More options Oct 16 2012, 7:23 am
Newsgroups: comp.text.tex
From: Justin C <justin.1...@purestblue.com>
Date: Tue, 16 Oct 2012 12:23:34 +0100
Local: Tues, Oct 16 2012 7:23 am
Subject: Re: Which package allows for tabular data over columns and pages?
On 2012-10-11, Peter Flynn <pe...@silmaril.ie> wrote:

[snip]

> \end{pricelist}
> \end{document}

The problem I find with this one is that one must manually
specify a column break; this is something I'm trying to
avoid, I really need to be able to throw my listing at
LaTeX and have it handled for me. Having to calculate page
breaks manually isn't going to reduce our work-load.

Thank you for the suggestion, but I think supertabular
has been the best suggestion so far for this problem.

   Justin.

--
Justin C, by the sea.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin C  
View profile  
 More options Oct 16 2012, 7:11 am
Newsgroups: comp.text.tex
From: Justin C <justin.1...@purestblue.com>
Date: Tue, 16 Oct 2012 12:11:53 +0100
Local: Tues, Oct 16 2012 7:11 am
Subject: Re: Which package allows for tabular data over columns and pages?
On 2012-10-11, Enrico Gregorio <Facile.da.trov...@in.rete.it> wrote:

This errors, I've Googled and, from what I can find, longtable and
\documentclass[twocolumn]{article} are not compatible.

I've had most success so far with supertabular, I'm still testing
the other suggestions.

   Justin.

--
Justin C, by the sea.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James  
View profile  
 More options Oct 17 2012, 9:43 am
Newsgroups: comp.text.tex
From: James <jjpuzz...@wowway.com>
Date: Wed, 17 Oct 2012 06:43:21 -0700 (PDT)
Local: Wed, Oct 17 2012 9:43 am
Subject: Re: Which package allows for tabular data over columns and pages?
On Oct 11, 12:08 pm, Justin C <justin.1...@purestblue.com> wrote:

> I'm trying to create a price-list, the data does not
> require much space, I can (in a word processor) fit
> two columns to a page. The data needs to be in a
> tabular format and the tables need to flow down one
> column, down the next and onto the next page.

snip

> If you can't think of a suitable package, can you
> think of an alternative way to proceed?

I'm a big user of Latex for writing technical reports, but for
situations like this, I prefer to use the asymptote program
(asymptote.sourceforge.net).  It's a vector graphics language that
uses Latex for the typesetting.  Asymptote is great for placing text
and graphics exactly where you want it on the page.  The language
syntax is very similar to c++, so experience in that language will
give you a good jump-start.  Here's sample code that - when processed
with Asymptote - will create a pdf of your list.

Good luck and I hope this isn't considered off-topic.
James

texpreamble("\usepackage{charter}");
texpreamble("\usepackage{textcomp}");

unitsize(1inch);

real wPage = 8.5; // paper width
real hPage = 11.0; // paper height
real border = 0.5; // paper margin
real wGap = 0.5; // gap between columns
real wText = wPage - 2 * border; // printable width
real hText = hPage - 2 * border; // printable height
real wColumn = (wText - wGap) / 2.0; // width of a each column

real wQuantity = 0.35; // width of the quantity box
real wPrice = 0.7; // width of the price box
real wItem = wColumn - wQuantity - wPrice; // width of the item name
box

int rowsPerColumn = 25;

real hItem = hText / rowsPerColumn; // height of each row

// Fill a rectangle of the desired page size with the
// coordinate system origin at the bottom left corner
// of the printable area.
fill(shift(-border,-border)*scale(wPage,hPage)*unitsquare, white);

struct Item // Item structure, an Item consists of a product/price
pair
{
    string name;
    real price;
    void operator init(string name, real price)
    {
        this.name=name;
        this.price=price;
    }

}

Item[] items; // the items array will contain all the products/prices

// Fill items array.  Note that Asymptote has functions for reading
// data from a file as well.
items.push(Item("Blue suede shoes"    ,27.00));
items.push(Item("Banana (bruised)"    , 0.23));
items.push(Item("Cheese (stinky 200g)", 3.34));
items.append(items); // double array size to 6 entries
items.append(items); // 12 entries
items.append(items); // 24 entries
items.append(items); // 48 entries
items.append(items); // 96 entries

for (int i = 0; i < items.length; ++i) // loop thru items
{
    // add a page break if necessary
    if (i > 0 && i % (2 * rowsPerColumn) == 0) { newpage(); }

    // calculate the (x,y) page position for this item
    pair position = ((((int) (i / rowsPerColumn)) % 2) * (wColumn +
wGap),
        hText - hItem / 2.0 - hItem * (i % rowsPerColumn));

    // draw boxes for this item
    draw(shift(position)*scale(wColumn,hItem)*
        shift(0,-0.5)*unitsquare);
    draw(shift(position+(wQuantity,0))*scale(wItem,hItem)*
        shift(0,-0.5)*unitsquare);

    // typeset the item name
    label(baseline(items[i].name), position+(wQuantity,0), E);

    // typeset the price with dollar sign or cent sign
    if (items[i].price > 0.99)
    {
        label(baseline(format("\$%#.2f",
            items[i].price)+"\phantom{\textcent}"),
            position+(wColumn,0), W);
    }
    else
    {
        label(baseline(string(items[i].price*100)+"\textcent"),
            position+(wColumn,0), W);
    }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nignasi  
View profile  
 More options Oct 18 2012, 4:00 am
Newsgroups: comp.text.tex
From: nignasi <nign...@gmail.com>
Date: Thu, 18 Oct 2012 01:00:55 -0700 (PDT)
Local: Thurs, Oct 18 2012 4:00 am
Subject: Re: Which package allows for tabular data over columns and pages?
If you already have your data within a text file, I'd suggest pgfplotstable package, (which is part of pgfplots package) to process them.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »