ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
hey, ok, i'm not sure if this is the right forum but whatever
i have a little script that i wrote that prints out a crapload of addresses (something around 2500)
now i'd rather not have to sit there cut them out and paste them onto a label. instead i would like to be able to format them all so that they can print on the backs of these flyers i am going to send out (there will be something like 2 or 3 flyers per page of paper).
is there any way to somehow spool this to a printer, or a practical way of formatting this information so that it requires as little work as possible on my part?
i only really know perl so thats what i'm using right now to just show all the addresses.
and if you ask how i can just randomly generate 2500 addresses its because its going to be on campus and addresses are just sequential by building.
right, latex is what is known as a typesetter, in a program like abiword you do the formatting by pressing keys and menus tex is more like html, you include commands in the document to describe how the document is formatted.
just to test if its working create the following file
and call it something.tex at the command line type latex something.tex followed by xdvi something.dvi
you should see an a4 page with the word hello written at the top. the idea is to write a perl script that creates a tex file full of your addresses and the appropriate formatting that once compiled will be exactly what you want and you can print it out.
i'm not sure if this is the right thing or not (i'm thinking it is because i went into my folder and double clicked on something.dvi and it said hello). i just want to make sure this output is what correct output is:
[akropp@localhost tex]$ latex something.txt xdvi something.dvi
This is TeX, Version 3.14159 (Web2C 7.4.5)
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, b
asque, italian, portuges, russian, spanish, nohyphenation, loaded.
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo)) (./something.aux) 
Output written on something.dvi (1 page, 220 bytes).
Transcript written on something.log.
[akropp@localhost tex]$ ls
something.aux something.dvi something.log something.txt
actually kev, i found some good tex tutorials. but i'm still not sure how to implement them with perl. unless you are saying that i format the output of the perl file in tex standards and then compile that tex file. actually i'm gonna try that tomorrow and let you know how it all goes
i dont really know what im talking about here but sk8guitar wants 2-3 addresses per page so the spacing needs to be right. i dont think you can do this with a2ps/enscript but as i say im not sure. also i dont think the amount of work to do this in latex is hard at all see the above link to a sample tex file.