Go to content Go to menu

In the course of organizing my electronics workbench, I needed to label my resistor collection. I happend upon a cache of vacutainer test tubes at my college surplus store and built a rack for them.

I found cheep sticky labels on 4“x6” paper at the dollar store that were the right size for my testtubes. Next I had to generate the labels. LaTeX does typesetting very very well, and everything else not as well. One of the thousands of packages for LaTeX is a label making script. This script makes it easy to format batches of sticky labels from a text file. I used ruby to generate LaTeX code for all the labels in the ER-24 range, and then had latex execute the ruby script. Note that you must allow latex to execute shell commands in by running it this way: pdflatex -shell-escape resistorlabels.tex

The labels came out pretty nice I think:

A pdf example for 4“x6” label paper: resistorlabels-ER24-4×6.pdf

The full source code which you can modify to suit your needs: resistorlabels.zip

LaTeX is a typesetting language. I call it “word for nerds” I started using it for homework and reports when I went back to school for ECE. It can be a bit challenging at first, but the results are worth the effort.

The key to getting started with LaTeX is to start with a template for the type of document you are writing. I goggled “latex homework template” and found many.

Once you have the template, open it up in your favorite text editor and fill in your name, the class name, etc.

To convert LaTeX source file into a pdf run “pdflatex myhomework.tex” This will either produce errors which you need to fix or it will create a pdf in your working directory.

Example hw for Physics (pdf): hw6.pdf

Src of example(zip): hw6.zip