ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
Code:
[akropp@localhost tex]$ latex something.txt xdvi something.dvi
This is TeX, Version 3.14159 (Web2C 7.4.5)
(./something.txt
LaTeX2e <2001/06/01>
Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, b
asque, italian, portuges, russian, spanish, nohyphenation, loaded.
(/usr/share/texmf/tex/latex/base/article.cls
Document Class: article 2001/04/21 v1.4e Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size10.clo)) (./something.aux) [1]
(./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
your perl script wants to produce something like This if i understand what you want. I know nothing about printing but to get you a bit further than the dvi you want
With (La)TeX you can produce very pretty reports, but it takes a lot of work. a2ps and enscript turn plain text files into postscript with a minimum of fuz. No need for dvips either.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.